-
1. Re: Attaching and dettaching EJB3 Entities
gavin.king Jan 22, 2006 6:06 PM (in response to dparrilla)This is normal. Put the jars on the client.
-
2. Re: Attaching and dettaching EJB3 Entities
dparrilla Jan 22, 2006 7:52 PM (in response to dparrilla)> This is normal. Put the jars on the client.
Do you mean that we have to put all the plumbing around Hibernate in order to use Plain Old Java Objects remotely? If I want to get a little object graph from a remote server, why do I need them?
I think we need some kind of 'detach' process in order to remove the dependences in our POJOs before sending them through the network. Then, when I get them in the remote side, I can work with them without taking care of hibernate libraries and dependences.
In the other way around, from remote client to jboss server, it already exists the 'attach' concept thanks to 'merge'.
I think that if POJOs implement LAZY loading strategies, then it make sense to carry on with the Hibernate libraries. But why for EAGER?
Thanks for the quick response
Diego Parrilla -
3. Re: Attaching and dettaching EJB3 Entities
ppc Apr 2, 2006 4:38 AM (in response to dparrilla)"gavin.king@jboss.com" wrote:
This is normal. Put the jars on the client.
Normal? why the client should know about _hibernate_ when the object should a POJO?
only to got org.hibernate.LazyInitializationException ?? -
4. Re: Attaching and dettaching EJB3 Entities
treespace Apr 2, 2006 10:37 AM (in response to dparrilla)They may be nothing more than decorative ornaments on the client side but the class loader will need to load runtime and class-resident annotations. That sets up a dependency right out of the box. That a class is required to extend a specific super type is what makes something lose its PO quality. A class that adds a type Complex can still get its POJO on. Dependencies aren't the defining characteristic IMO. EJB 2.0 required a magic super-type, a MOJO if you will.
-
5. Re: Attaching and dettaching EJB3 Entities
epbernard Apr 3, 2006 5:44 AM (in response to dparrilla)"ppc" wrote:
"gavin.king@jboss.com" wrote:
This is normal. Put the jars on the client.
Normal? why the client should know about _hibernate_ when the object should a POJO?
only to got org.hibernate.LazyInitializationException ??
Useful for collections too (especially DELETE_ORPHAN collections) -
6. Re: Attaching and dettaching EJB3 Entities
ppc Apr 3, 2006 8:04 AM (in response to dparrilla)What I feel is some kind of contract violation in this implementaion (im not an ejb3 expert) but when for example using lazy loading strategy and accessing form a remote client you got an hibernate exception I feel that my client is not anymore indipendent from the underlayer implementation.
Ejb3 has been announce as back to "Plain Old Java Object" but this in the reality is not true. -
7. Re: Attaching and dettaching EJB3 Entities
bill.burke Apr 3, 2006 8:58 AM (in response to dparrilla)I agree the specification should handle this problem, but the vendors on the commitee each had their own way of doing this and nothing could be agreed upon. I suggest sending some feedback to ejb3-experts@sun.com
-
8. Re: Attaching and dettaching EJB3 Entities
epbernard Apr 3, 2006 12:46 PM (in response to dparrilla)Actually LazyInitializationException will be replaced by EntotyNotFoundException in a future release of HEM, but this does not mean Hibernate.jar will not be required on the client side.
Your programmation model is POJO.