views:

110

answers:

1

I have multiple services which call on my database service, which uses Hibernate, and I would like the remote services to be able to create a query and then pass that to be processes. Ideally I would like to pass a Criteria Object but it looks like it needs a Session which they won't have access to. Is there a process similar to the Criteria Object I could use?

+4  A: 

use a DetachedCriteria (org.hibernate.criterion.DetachedCriteria)

It would be nice not to carry the Hibernate Jar around to the other services but the DetachedCriteria will work. Thanks
Javamann