Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

When to use EnterpriseBeans  RSS feed

 
Venkateswara Rao
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have many modules in my Project. Between module to module communication EJ Beans needed Or normal classes are enough to communicate.
I am always confusing whhen to use Bean and when to use normal classes.
Pls give me Advantage and Disadvantage of Using Bean and as well as Normal classes??
Thanks and Regards
Venkateswara Rao
 
Byron Estes
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's really just a matter of looking at about four ascpects of the problem your trying to solve...
1) Is it trasactional (...do you need commit/rollback capability? Simple or 2 phase commit?)
2) Security (Do you need a robust, declarative, role based, method level means of determining whose authorized to do what?)
3) Resource Management: Using EJB lets you defer some of those headaches to the container.
4) Distribution of Components: Using JNDI to discover/find components allows you to change where the component lives and can be accessed without changing the code just my updating the deployment descriptors.
Hope this helps,
 
Venkateswara Rao
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any performance wise Difference between using local Stateless Beans and Normal Java classes to communicate two modules which are in same JVM.
I donot want these features to communicate two modules.
1) trasactional
2) Security
3) Distribution of Components
keep in this mind Plese give me suggestion which one of above is better
 
yogesh ashok deshpande
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using local stateless bean will improve u r performance as
u r stateless bean is shared across multiple clients.
if u use normal java class, then each time object creation process is heavy.This u can reduce somewhat using design patterns.
but still ejbs are more better option as they remove all headche from us
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!