[jboss-user] [jBPM] - JBPM 4.3 or 4.4 and LocalContainerEntityManagerFactoryBean

Caine Lai do-not-reply at jboss.com
Wed Aug 11 14:07:45 EDT 2010


Caine Lai [http://community.jboss.org/people/unsavory] replied to the discussion

"JBPM 4.3 or 4.4 and LocalContainerEntityManagerFactoryBean"

To view the discussion, visit: http://community.jboss.org/message/556958#556958

--------------------------------------------------------------
Hi HuiSheng,

I appreciate the response.  Here's the thing.  The real problem lies in that JBPM assumes you are using a LocalSessionFactoryBean and specifically looks for one with the Spring configuration.

However, it is possible to retrieve the underlying hibernate session factory from Spring's LocalContainerEntityManagerFactoryBean.  It's just that JBPM does not support this because it assumes you are using a LocalSessionFactoryBean.

I understand that JBPM needs to use hibernate and is using the org.hibernate.Session to access the database, but what I don't understand is why it requires the use of the Spring LocalSessionFactoryBean, when there are multiple other ways of configuring a hibernate session factory.

I saw some old forum posts about the ability to inject the session factory into the JBPM context using the session-factory attribute in jbpm.config.xml, but again it does not work because it is not of type LocalSessionFactoryBean.

This is a serious issue for anyone using JPA.  It basically means if you are using JPA you cannot use JBPM without resorting to some major hacking.  It is a shame that JBPM has chosen to abandon JPA users as this is the Java spec!  It's fine if JBPM wishes to use hibernate underneath, but there should at least be some way of providing the hibernate session to JBPM from the JPA entitymanager.

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/556958#556958]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100811/4c62fcdb/attachment.html 


More information about the jboss-user mailing list