Thank you both for the answers.
So stateful beans should work, okay, great.
I understand that the field with the EJB annotation unfortunately has to be static. That
could make it harder to use the same code in an app client and in an J2EE server. Okay,
maybe you can use always static fields.
What I am still not sure about is whether you can use an EJB annotation in classes others
than the main class. That's what I meant with real-world application: the main class
creates another class that creates another class etc. that contains a (static) EJB field.
You never have all EJB fields in your main class! I guess that if the class loader only
loads the main class, and injection works only before program start, it cannot work.
Regards
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4184416#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...