[jboss-user] [EJB 3.0] - injection SFSB to SLSB

mindflyer do-not-reply at jboss.com
Tue Apr 1 04:29:30 EDT 2008


I have SLSB (TdwsPrinter) and SFSB (AdminPrintTask). TdwsPrinter uses AdminPrintTask (it invokes methods and then @Remove method). Sometimes they work correctly, sometimes I see error such as "Could not find SFSB jboss.j2ee:service=EJB3,name=AdminPrintTask; key: 3j001-pmol3k-fee00im0-1-fee4izq1-20". 
I investigated in debug mode and saw that JBoss injects reference to AdminPrintTask only when JBoss creates instance of TdwsPrinter. This proxy-object has guid of instance of AdminPrintTask - and when I invoke TdwsPrinter second time then JBoss can't find AdminPrintTask with old guid because that instance was destroyed. 
I thought that container must reset state of SLSB after each invoking. 
May be, Do I use injection incorrectly?

@Stateful(name="AdminPrintTask")
  | @Remote(AdminPrintTask.class)
  | @Local(AdminPrintTask.class)
  | @Cache(DestroyOveragedCache.class)
  | @CacheConfig(maxSize = 2000, idleTimeoutSeconds = 1800, name = "topdog2.ejb3:service=EJB3SFSBCache")
  | @SecurityDomain("td2")
  | @PermitAll
  | @Depends({"topdog2.reports:target=BirtService,protocol=local,service=proxyFactory,type=adaptor"})
  | public class AdminPrintTaskBean implements AdminPrintTask {
  | ...
  | }
  | 
  | 
  | @Stateless(name="TdwsPrinter")
  | @Local(TdwsPrinter.class)
  | @SecurityDomain("td2")
  | @PermitAll
  | @Depends({"topdog2.reports:target=BirtService,protocol=local,service=proxyFactory,type=adaptor"})
  | public class TdwsPrinterBean implements TdwsPrinter {
  | 	@EJB(mappedName = "AdminPrintTask/local")
  | 	private AdminPrintTask taskBuilder;
  | ...
  | }

PS: JBoss 4.2.2

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140356



More information about the jboss-user mailing list