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.  [ 7 posts ] 
Author Message
 Post subject: Criterion object should be serializable ?
PostPosted: Wed Jul 28, 2004 4:25 pm 
Newbie

Joined: Wed Jul 28, 2004 4:17 pm
Posts: 2
Hi,
I try to pass a collection of criteria from the "expression" package of hibernate to a Session bean method from a delegate object. I worked fine with JBoss but now I migrated my app to Websphere 5.0 and the server throws me a message indicating the criterion should be serializable.

I think the Criterion interface should extend the Serializable interface.

Is there any reason it is not Serializable ?

Thank you


Top
 Profile  
 
 Post subject: Same prob here....
PostPosted: Fri Oct 29, 2004 5:42 am 
Beginner
Beginner

Joined: Tue Sep 07, 2004 3:58 am
Posts: 23
I got the same prob.
Why isnt it serializable ?

By the way i AM working with jboss, so how did you get it working on jboss, cause for transmitting it to a remote method it must be serializable anyway..... ?!

_________________
People keep asking me if i know Tyler Durden....


Top
 Profile  
 
 Post subject: Criterion object not serializable?
PostPosted: Tue Feb 01, 2005 11:33 am 
Newbie

Joined: Tue Nov 23, 2004 7:45 am
Posts: 2
Do anyone have the answer for this? Why isnt Criterion not serializable?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 02, 2005 6:35 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Becasue a criterion has to be attached to a session.
This is now solved in Hibernate 3 using the DettachedCriteria

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 02, 2005 7:28 pm 
Expert
Expert

Joined: Sat Jan 17, 2004 2:57 pm
Posts: 329
Location: In the basement in my underwear
It's actually the Criteria that needed the session wasn't it?

It's funny, we were talking about this at work this morning and I had done a small test just making Criterion and Order Serializable as we had some garbage to build up dynamic queries from the client and wanted to get rid of it.

Then I saw that you guys already implemented it for Beta 4, made my day. Just took a look at what was done and thought it was overkill at the start but then I realized that not everyone is building up their Criteria like we are currently. We currently work with a list of 'things' such as Criteria and Orders and 'InnerJoins' that we reassemble in the end. This should actually allow us to clean all of that out.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 03, 2005 5:26 am 
Newbie

Joined: Tue Nov 23, 2004 7:45 am
Posts: 2
Thanks for the information. I can see Hibernate 3 beta 3 in the downloads page. I guess DetachedCriteria is available in Beta 4, not beta 3.
Any idea when will beta 4 will be downloadable?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 03, 2005 7:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
I probably better do a beta 4 sometime next week. If we leave it any later, it will need to be called "rc1".


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.