-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Serialize hibernate objects - Hessian/HttpInvoker...
PostPosted: Wed May 25, 2005 10:01 am 
Newbie

Joined: Mon May 23, 2005 5:42 pm
Posts: 7
Hi!

I've got system where bussiness side and client view (web) are separated. Connection between them is done by Hessian (or HtppInvoker). Hibernate is used on bussiness side and "spring" is used on both.
I want to transmit thorugh network some POJO-Hibernate objects but I've got two problems:
1) not so important - client has to have hibernate jar. is this ok?
2) when I want to transmit hibernate object with some relations (lazy-loaded) I've got LazyLoadException. I expected during serialization (done by hessian or httpinvoker) my hibernate object will be converted to REAL POJO - with all collections and so on - it looks I'm wrong. Is there any way to achieve this? I want to send through network real POJO class - not hibernate. How can i do this?

Regards
Lukjel


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 26, 2005 3:54 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
Quote:
I want to send through network real POJO class


Your classes are real POJO, but Collections are still Hibernate's wrapped Collection classes - in order to hold reference to Session for eventual lazy-load.

Before sending them through the wire initialize all that you need - maybe an overhead, but that's the best you can do.

I think similar request has already been posted on this forum, so do a little search if there is some more info already.

You can transform your Hibernate objects to DTO's and clear them of Hibernate's dependency - otherwise you ofcourse need hibernate.jar on client's side.


Top
 Profile  
 
 Post subject: Searched everywhere & found no util to unproxy collectio
PostPosted: Wed Jun 15, 2005 12:16 am 
Regular
Regular

Joined: Thu Sep 09, 2004 6:46 pm
Posts: 96
Searched everywhere & found no util to unproxy collection so that hibernate specific stuff is not synchronize. Is there a specific tool you can point us to?


Top
 Profile  
 
 Post subject: I tried to include hibernate jars on client side..
PostPosted: Wed Jun 15, 2005 12:41 am 
Regular
Regular

Joined: Thu Sep 09, 2004 6:46 pm
Posts: 96
I tried to include hibernate jars on client side.. and got error

java.io.InvalidClassException: net.sf.hibernate.impl.SessionImpl$CollectionEntry; local class incompatible: stream classdesc serialVersionUID = 8642566097693392371, local class serialVersionUID = -2218466429640624909


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.