-->
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: Hibernate RMI and limiting the object graph
PostPosted: Tue May 25, 2004 2:53 am 
Newbie

Joined: Fri May 07, 2004 2:18 am
Posts: 19
Hello

I am writing a multi-tier rmi app and am using hibernate for the first time.
I created a bunch of classes to transfer across the wire which work fine. I specifically imported no hibernate associated classes or jars into any of these classes because I did not want any references to the hibernate classes to exist on the clients. As ar as they shoud be aware they are receiving plain old java obects with no reference to hibernate.
To my surprise things do not seem to be working that way. If I do not include hibernate jars on the client classpath the clients wont work.
To get around this I tried making copy constructors for every class, in other words copying every string into a new string and every arraylist element into a new element in a new arraylist. For some reason this also does not work.
Is my only choice to get around this implementing Externalizable and using readExternal and writeExternal ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 25, 2004 8:04 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
You probably still have unitialized proxys, or collections created by Hibernate in your object graph. They depend on the Hibernate API.


Top
 Profile  
 
 Post subject: Finding out what object still has a link to hibernate
PostPosted: Wed May 26, 2004 5:46 pm 
Newbie

Joined: Fri May 07, 2004 2:18 am
Posts: 19
Hello

How would I go about finding out what is still linked with hibernate.
I was quite painstaking in my copy constructor
eg for every String I made a new String
for every collection I did this
ArrayList al = new ArrayList
Iterator i = whateverhibernatecollection.iterator();
while(i.hasNext()){
//copying stuf into new entities
}
return al;

etc. etc...

I dont see where I missed anything

Marcus


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 26, 2004 5:50 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Use a debugger.


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.