• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB 2.0 EJB 3.0 Hibernate Architectural Desicion

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys , right now I am involved in a project with J2EE and We are designing the proposed architecture. At this moment our architecture consist of
a MVC model (throught Struts framework) and include a persistence layer. Regarding this persistence layer We have identified EJB 2.0, EJB 3.0 and Hibernate
as candidates but we dont have previous experiences implementing persistences layers with these tecnologies. Could you give us some advices ,tips or material
to take into account in our architecture desicions.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

[
We have identified EJB 2.0


You can probably abandon that though straight away. Entity Beans have a plethora of failings - much documented if you search through the posts in the ORM forum.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The hibernate maybe is the best choice.
 
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are mixing up different things... Leaving out EJB 2.0 (which is quite old and not worth using anymore) you mentioned EJB3 and Hibernate as alternatives. They are no alternatives! If you talk about EJB3 and persistence you talk about JPA which is a specification. So if you decide to use EJB3.0/JPA you have to decide which JPA-provider you use. Hibernate is the default JPA-provider in JBoss but you can change it. Inside your app you only use javax.persistence.*.
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't go for EJB 2.0.

Hibernate 3.* and EJB 3.0 is best choice for Java ORM tool. Acctually Java EJB 3.0 is A Hibernate Clone
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Anand Kumar Singh wrote:Acctually Java EJB 3.0 is A Hibernate Clone



That's inaccurate. EJB3 and JPA (Hibernate is an implementation of JPA) are two completely different things.
 
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you need to use more features, e.g. Criteria, more ID generators. Hibernate seems to be the best choice, but if you want portability go for EJB 3.0. And yes, even with EJB 3.0, you still can fall back to native Hibernate if you choose Hibernate as your ORM provider.
 
Mercurio Savedra
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks a lot for your valuable answers guys, but if you would have to decide between EJB 3 and Hibernate regarding that this solution is proposed for a bank system that requires high performance and high transaction load.What alternative will be the best in response time,high performance and high transaction load ?

 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Raul Morales wrote:
but if you would have to decide between EJB 3 and Hibernate



Repeating myself again - EJB3 and Hibernate are not the same. So the question of deciding between EJB3 and Hibernate does not arise.
 
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree EJB3.0 and Hibernate are not same and also JPA & hibernate also are two separate approaches.

Hibernate is old as compare to JPA. JPA is more of specification.

What are the other parameters for you to short list JPA or hibernate. Like do you need any caching ? or some other ORM framework features.

Regarding your load, performance issues, it depends on your over all architecture design.

 
Mercurio Savedra
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree EJB3.0 and Hibernate are not same because from my point of view each one is a provider of JPA specification.
From my undestanding JPA is a specification that has different providers ,some of them are
Hibernate, OpenJPA and if I am not wrong EJB 3.0.

Right now at the project phase only we have a set of options for persistence layer ( EJB 3.0,OpenJPA, Hibernate). I would appreciate
what ORM framework features could be useful to take into account in the selection process and any advice or tip would be valuable too.

The proposed architecture is base in a presentation layer, logic layer and a persistence layer.

Thanks in advance

 
reply
    Bookmark Topic Watch Topic
  • New Topic