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 Stateless Session bean / Simple java bean ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Stateless Session bean / Simple java bean ?" Watch "Stateless Session bean / Simple java bean ?" New topic
Author

Stateless Session bean / Simple java bean ?

santhosh kolathur
Greenhorn

Joined: May 21, 2001
Posts: 3
Hi all,
The application I build have a few complex transactions involved which I'm planning to do using a stateless session bean. I'm using weblogic. I have a very short period of time and so (also new to EJB) decided not to go for entity beans considering 'not so good' experiences (mainly performance wise) of my colleagues. Now, is it really advantageous to use a stateless session bean instead of a normal bean ? What are the advantages I get if I use a stateless session bean over normal beans for database transactions ? It would be great if somebody could give me a reply fast (a lil detailed if possible).
------------------
San..


San..
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15662
    
  15

Your number one advantage is the ability to spread functionality over multiple hosts. A regular JavaBean is confined to its containing VM, an EJB can be in any VM, including one on a remote host. This can be a significant advantage for large workloads where you'd be running the function on multiple (clustered) hosts.
For less ambitious projects, EJBs still have advantages such as managed transactions and concurrency controls.
On the other hand, while regular JavaBeans don't get the industrial-strength infrastructure of EJBs, they don't have the overhead. And they're slightly easier to use in JSP's, where they're supported by the useBean directive.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Stateless Session bean / Simple java bean ?
 
Similar Threads
Entity Beans and Bean Managed Transactions
Two connections in one transaction?
Hibernate and stateless session beans
Session Facade with stateless session beans
Stateless session beans