I am trying to inject a session bean into another session bean (in this particular case its the same session bean), and I get this error:
org.jboss.weld.exceptions.UnsatisfiedResolutionException: WELD-001308 Unable to resolve any beans for Types: [interface com.windriver.dsm.labmanagement.ejb.stub.GeneralSession]; Bindings: [@javax.enterprise.inject.New(value=com.windriver.dsm.labmanagement.ejb.stub.GeneralSession.class)]
This is how I am trying to do it:
@Stateless
@TransactionManagement(value=TransactionManagementType.CONTAINER)
@TransactionAttribute(value=TransactionAttributeType.REQUIRED)
@Local(GeneralSessionLocal.class)
@Remote(GeneralSession.class)
public class GeneralSessionBean extends CRUDSessionBase
{
@Inject @New
Instance<GeneralSession> generalSessionInstance;
// ...
}
I get this error when I call generalSessionInstance.get();. Can anyone help?