This week's book giveaway is in the Java in General forum.
We're giving away four copies of Helidon Revealed: A Practical Guide to Oracle’s Microservices Framework and have Michael Redlich on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Where should we use EJB???

 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on a Web Project but we are not using EJBs in that, so I want to know in what cases (conditions) we should use EJBs in our project. I am sure there must be some situation where only EJB will help not any other thing...

Thanks a lot.
[ November 23, 2005: Message edited by: rathi ji ]
 
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

You should consider enterprise beans if your application has any of the following requirements.
The Application must be scalable
Transactions must ensure data integrity
The application will have a variety of clients

For better understanding, read sun tutorials

bye for now
sat
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


The application will have a variety of clients



Are you mean to say: browser client (Web site), mobile client (WAP site) etc.

How does EJB can help in this??

Please comment.

Thanks.
[ July 28, 2005: Message edited by: rathi ji ]
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think this article helps you to know why to use EJB and when to use.

http://www.developer.com/java/ejb/article.php/10931_1434371_2
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EJB is usually used for distributed environment, as it aims to support such transactions. Since the container provides you almost every important functions, transaction handling, exception handling, security, resources allocation, developers do not require to write additional codes for them.

In addition, you can use JNDI to look up the EJB services, so that the series of business operations are hidden from the callers.

Nick
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I think this article helps you to know why to use EJB and when to use.

http://www.developer.com/java/ejb/article.php/10931_1434371_2


One more point to add to the article: Separation of Business Logic from UI and Data Access

EJB aims to achieve this purpose, however, JSF aims to link up the UI components with backend. And you can see that JSF is included in J2EE 1.4 specification.

Nick
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nick,

You used a word transaction, whenever we want to do transaction, we use EJBs. Please can you explain what actually is transaction here..

Thanks a lot.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

You used a word transaction, whenever we want to do transaction, we use EJBs. Please can you explain what actually is transaction here..


Transactions refer to database operations. It is not necessary to use EJB whenever the system involves in transactions. It depends on the actual needs. For small/single transactions, we might simply use JDBC. But if we have to cater for complicated transactions, like a sequential updated operations and they should be regarded as a single transaction unit, using EJB might reduce the complexity of such handling.

Nick
[ July 28, 2005: Message edited by: Nicholas Cheung ]
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This may be useful.
https://coderanch.com/t/316680/EJB-JEE/java/EJB-vs-Spring
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Nick and all.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic