I have an EJB I am using as an event handler. When I inject my JBOSS Rules 
workingMemory into it, all is well; I have declared it in components.xml. Here 
is the code:

  | @Stateful
  | @Name("indexPage")
  | @Scope(org.jboss.seam.ScopeType.SESSION)
  | public class IndexPageBean implements IndexPage {
  | 
  |     @Logger
  |     private Log log;
  | 
  |     @In
  |     FacesMessages facesMessages;
  |     
  |     @In WorkingMemory wmUnderwriting;
  | .
  | .
  | .
  | 

HOWEVER - what I would like to do INSTEAD is use another seam component and 
inject the WorkingMemory into it instead of the event handler above. Here is my 
proposed code


  | @Name("UnderwritingService")
  | public class UnderwritingService
  | {
  | //TODO - NOTE -  I changed the ant build script to include all .drl files
  |     // I.E., security.drl is now *.drl
  |     
  |      @In
  |      WorkingMemory  wmUnderwriting;
  | .
  | .
  | .
  | 

The problem I am having is that when I manually instantiate this comopnent from 
the first comoponent, the workingMemory object is null. I dont understand, 
because it is NOT nulll whe it is injected into the EJB event handler, but it 
IS null when injected instead into the service component that I instantiate 
from the event handler. I am not understnading why injection works for the EJB 
and not for the pojo service component

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066351#4066351

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066351
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to