File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Will the singleton use on EJBObject cause problem? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Will the singleton use on EJBObject cause problem?" Watch "Will the singleton use on EJBObject cause problem?" New topic
Author

Will the singleton use on EJBObject cause problem?

Allan Stone
Greenhorn

Joined: Oct 21, 2005
Posts: 24
For stateless session beans, beans are not tied to EJBObject until the client calls a business method. And the container manages the bean creation if needed.

Then, how about EJBObject, should an application create an EJBObject instance every time it needs to call a business method?

If two or more clients invoke business method on the same instance of EJBObject simultaneously, what will happen?


Practice make perfect.<br /> <br />SC-(JP/WCD/BCD/EA)
Vinay Raj
Ranch Hand

Joined: Jun 19, 2006
Posts: 81
It is definitely not recommended way of using session beans. Two or more clients invoke business method on the same instance of EJBObject simultaneously can be done via user developed multi-threaded program, which is a strict no-no in EJBs. The obvious problem areas would be transaction, security management.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Will the singleton use on EJBObject cause problem?
 
Similar Threads
ejbFind question
EJBObject management
Session bean create method.
Getting EJBObject for SLSB in ejbCreate()
What does remove() means for a stateless session bean?