[jboss-user] [JBoss Seam] - Re: Asynchronous JavaBean method not getting called

gbc@gmx.de do-not-reply at jboss.com
Mon Aug 27 12:54:07 EDT 2007


Hello damianharvey,

as far as i know, an asynchronous call will only work if called by interface:

I had a Stateless SessionBean with an annotated asynchronous Method being calld via

  | ...
  | new StatelessSessionBean().asynchMethod();
  | ...
  | 

and i didn't work, so I changed to:

  | ...
  | @In(create=true) StatelessSessionBeanLocal statelessSessionBean;
  | 
  | public void someMethod() {
  |    statelessSessionBean.asynchMethod();
  | }
  | 

and it works.

So...

- Make class a Seam Component with @Name
- Try adding an Interface (even if not needed anywhere else) with annotated method
- Use @In at calling side to let seam inject the class
- You may add @Scope(ScopeType.SESSION) to the class

Good luck, just sharing my expiriences...

Greetz, GHad


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

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



More information about the jboss-user mailing list