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 Declaration of a session bean 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 "Declaration of a session bean" Watch "Declaration of a session bean" New topic
Author

Declaration of a session bean

PNS Subramanian
Ranch Hand

Joined: Jul 13, 2004
Posts: 150
During the development of a stateless session bean - how different would the application behaviour be, if the session bean gets declared as Stateful in the deployment descriptor ? Apart from a performance hit, would there be any side effects. I dont see much myself - but would like to know if this is correct indeed.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

It depends on how you think of the bean during development. If you develop it to be stateless, there wouldn't be any side effects other than performance (and the fact that you could run out of beans) because you wouldn't be storing any data in the bean. Of course, it wouldn't accomplish anything either.

If you develop it to be stateful, you will have a lot of problems because the data will be shared in unpredictable ways.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
PNS Subramanian
Ranch Hand

Joined: Jul 13, 2004
Posts: 150
Thanks Jeanne.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Declaration of a session bean