-->
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.  [ 6 posts ] 
Author Message
 Post subject: Serialize Criteria object from an RMI client
PostPosted: Sun Oct 24, 2004 10:34 pm 
Newbie

Joined: Sun Oct 24, 2004 9:34 pm
Posts: 2
Location: US - MD
How to use Criteria API from RMI client(doesnt know the DB info) and query at RMI server(knows the DB info.)
I have RMI application where the client queries the data object using the custom Search Object. I am evaluating the Hibernate for a possible ORM tool.
I would like to use the Criteria API that comes with Hibernate. I couldnt use the Criteria API at the RMI client as the Session.createCriteria needs DB/Mapping info which are only available at the serverside.
Advise me with the right approach.

I appreciate any input on this.

Thanks
Varnika.

_________________
Keep smiling :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 25, 2004 3:09 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Don't expose Hibernate APIs (your persistence layer!) directly to your client.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 20, 2004 10:20 am 
Newbie

Joined: Sun Oct 24, 2004 9:34 pm
Posts: 2
Location: US - MD
christian wrote:
Don't expose Hibernate APIs (your persistence layer!) directly to your client.



Sure I will spread the word!

You are right I may not be expossing the Persistance layer to the users
but I have to let the users to query(read only) domain object on which they build their applications on.
To acheive this I need to either detach the criteria API and make it serializable.
The thick RMI client that includes data object, changed criteria is distributed to users.

I work for non profit organization will it matter when it comes to liscencing If I distribute the changed and detached criteria API code in my codebase.

Appreciate your feedback.


--Varnika

_________________
Keep smiling :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 20, 2004 9:33 pm 
Beginner
Beginner

Joined: Thu Oct 14, 2004 9:50 am
Posts: 43
Guys,
he criteria api is a very nice feature, and frankly, you guys didn't invent it. It's a nice way to query data, and is fairly data source/type independent. I have the same requirement where it'd be nice to expose this feature to my clients. Architectural discussions aside, is there a way to do it without rewriting the api, or picking it up and making everything serializable?

tnx.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 21, 2004 3:18 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Implement serializable wrapper, it must be trivial . I see nothing wrong to build queries on client, but probably this API is not serializable for reason.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 21, 2004 6:09 pm 
Beginner
Beginner

Joined: Thu Oct 14, 2004 9:50 am
Posts: 43
Definitely sounds like a solution, just wondering why the hastle.

Tnx.


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