[jboss-user] [EJB 3.0 Users] - Re: EJB 3.0 lookup from Pojo and Injection

Wolfgang Knauf do-not-reply at jboss.com
Tue Dec 1 08:09:41 EST 2009


Hi,

by definition, the management of EJB class instances (created by "new MyBean()" calls) is a matter of the server and totally undefined for your own client code. So, you can never expect to get instance of a previous method call. This is also true for stateful session beans, but here the server will restore the instance variables state for you.

Please provide us with more details of your architecture. Currently, I don't get the point what is happening in "AccountServiceBean". If it contains some business method, which stores it's results in a member variable, I would advice you to convert the bean to some POJO/helper class, and return the instance of this class from "SimplePojo.search".

Hope this helps

Wolfgang

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

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



More information about the jboss-user mailing list