Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

similarity between ejb 2.0 and ejb 3.0

Ranch Hand
Posts: 817
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ranchers,
can any body please tell me, how much is the similarity in contents in ejb 2.0 and ejb 3.0, I just used ejb 3.0 in my project (initial level, i.e stateless session beans with annotation and I DON'T have any any idea of ejb 2.1 )

so what is the thing that doesn't change at (from programming point of view)
i think following are the thing that doesn't get change
3.Security Management

please add your valuable comments and please correct me if I am wrong.

Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Amit-
Actually, if you are using annotations with EJB 3.0 (note that you can use either annotations or ejb-jar.xml) the things you mention *would* change.

* Transactions
If you prefer annotations (and many people do), you could specify transaction attributes for the bean, or for any specific method, using the @TransactionAttribute annotation.

* Exceptions
In EJB 3.0, you no longer need to throw java.rmi.RemoteException from methods declared on your remote interface.

Security roles and method permissions also may be specified using annotations.

The main thing that *doesn't* change is the actual business logic in your business methods. If you accept the default transaction and security settings for your session bean, all you are left with to code is a simple class that is annotated @Stateless or @Stateful and contains ordinary methods for your business logic.

Looking beyond the defaults goes beyond the scope of this reply, but there is much written on the topic.

Would you like to try a free sample? Today we are featuring tiny ads:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic