• 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

HIbernate and EJB3 in JBoss

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,

i'm developing a very data-driven j2ee application on a jboss server. i've used hibernate before in a j2se environment but i'm not an expert in it, it just feels natural to work with hibernate. i've read a lot about ejb3.

the object model of the application i'm working on features as i call them 'big important objects' like Customers, Invoices, Orders, etc which have a lot of properties, participate in a lot of relations and have to be transaction-safe. Beside these i also need 'little helper objects' like Address, PaymentCondition, ProductType, ProductTypeGroup, these are small objects with one or two properties only being referenced from other entities.

I need to create,update,delete both types of objects from a rich java client (i use Swing).

What would be the best way to implement the persistence part of my application ? I will probably use EJB3 for my 'big' objects, or would hibernate behave fine here to ? I consider making the little objects actual EntityBeans a bit of an overkill, but i'm not sure how i should handle these..

Anyone can help me out here ? Or knows some goog article/book that can help me out ? Thanks in advance!

PJ
[ September 05, 2005: Message edited by: Pieter-Jan Malfait ]
 
Pieter-Jan Malfait
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nobody?
i'm really lost here and i need to make some progress
 
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
Why do you intend to mix EJB3 and Hibernate? What advantage do you hope to get?

Hibernate POJOs are fine for all persistable objects. Certainly a better choice than a specification which is still at the Beta stage.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would say, 6 of one half dozen of the ther.

Meaning the man behind Hibernate - Gavin King is also behind EJB3 Enitity Beans. Either would be fine to use.

But I would say have it all as one, either Hibernate or Entity Beans, but really, they are the same thing.

Mark
 
Pieter-Jan Malfait
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so even very lightweight objects can be implemented as EJBs withour introducing to much of an overhead ?

i always thought of EJBs as big bloathed objects that need to be very transaction save, can be cached etc etc, maybe my view on EJBs isn't correct?

also maybe anyone can answer another question : are EJBs supposed to leave the container the are created in (fe to be edited by a remote swing client), i have it set up this way now , but i'm experiencing all kinds of identity problems, so it doesn't feel very good..

sorry for all these (stupid) questions, but i'm just starting out with EJB and J2EE in general (with goog background on standard java though) and i'm kinda lost
 
Pieter-Jan Malfait
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Paul Sturrock:
Why do you intend to mix EJB3 and Hibernate? What advantage do you hope to get?

Hibernate POJOs are fine for all persistable objects. Certainly a better choice than a specification which is still at the Beta stage.



my opinion was that hibernate give less overhead on smaller objects..

are hibernate and EJB equally compatible with a application server (in this case JBoss) ? or would it be a better choice to use only hibernate without any application server ? the application is meant to be a distributed enterprise application, so i thought using an application server and a rich client would give us a lot of features we might need..
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EJBs were big bloated stuff, not as bad as people say, but yes. But in EJB3 they changed that. They are just POJOs now. So they can be run inside or outside the container.

Mark
 
reply
    Bookmark Topic Watch Topic
  • New Topic