JBoss Community

Get hibernate session for own query

created by Heiko Tappe in jBPM - View the full discussion

I am using jBPM 4.3 (embedded in war, working with JPA) and I need to support multiple tenants. So I prefix all idents with a tenant ident.

Ok so far. But when I need to query jBPM (TaskQuery, ProcessInstanceQuery) I can't add the prefix.

So I think I have to create/execute the queries on my own. Trying to do so I run into "errors" like:

 

[org.hibernate.hql.QuerySplitter] no persistent classes found for query class:

select processInstance from org.jbpm.pvm.internal.model.ExecutionImpl as processInstance where processInstance.parent is null and processInstance.key like '1T%'

 

This is probably due to using the hibernate session of the EntityManager!?

 

How do I have to query jBPM from within my JPA environment? How to get the correct session for not running into the problems mentioned above?

 

Any idea?

 

--Heiko

Reply to this message by going to Community

Start a new discussion in jBPM at Community