This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

when should i use enterprise bean?  RSS feed

 
zb cong
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
sun's j2ee tutorial tell me,if i want to distribute an application's components across multiple machines,i should use enterprise bean,i wonder if it mean that there is no need to use enterprise bean when my application is not scalable(the web server and the app server within same server),in such situation,i can use java bean to encaptulate the business logic and database access?
thank you!
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at this article: http://www-106.ibm.com/developerworks/library/ibm-ejb/
To sum it up I usually say, if you really need object-level security, or 2-phase commit across multiple datasources (like MQ Series and Oracle) then you need EJB.
However, if you just need object distribution, or automatic object-relational mapping, you could use EJB, but there are other technologies that accomplish that as well. 9 times out of 10 you can get along just fine with just plain old Java classes instead of EJB's. As always, your mileage my differ.
Kyle
[ January 26, 2002: Message edited by: Kyle Brown ]
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The other things that the EJB servers give you are load balancing and automatic failover.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!