[jboss-user] [JBoss Seam] - Seam 2.0.CR1, jBPM and custom entity process variables
do-not-reply at jboss.com
Fri Nov 16 03:41:49 EST 2007
now that I've understood how to bootstrap Seam's jBPM support, I'm immediately facing the next problem.
The root of the problem is that I want to use my own EJB3 entites as jBPM process variables. I've done some research before, because this is not very well documented yet, but finally I was successful.
But now I fear that my way how to use jBPM interferes with Seam's way how to support jBPM.
What I have done with respect to jBPM:
- in my own persistence.xml, I reference jBPM's hibernate.cfg.xml so that my EntityManager knows about jBPM's entity
- in the same file, I tell Hibernate to register a Session Factory in JNDI
- in jbpm.cfg.xml I tell jBPM to use a JtaDbPersistenceServiceFactory, referencing my Hibernate Session Factory JNDI name
- in every JbpmContext I create, I inject a Hibernate Session from my EJB3 EntityManager (jbpmContext.setSession()).
The result is that jBPM uses the EJB3 entity manager for it's work, and there is absolutely no problem in mixing jBPM entities and my own entities, for example as process variables.
Now the point where Seam comes into play. Since Seam has some support for jBPM, I wanted to try it, but was unsuccessful. I configured:
, but on startup I get:
anonymous wrote :
| 09:17:28,787 ERROR [[/Argos3Web]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
| java.lang.RuntimeException: could not deploy a process definition
| Caused by: org.hibernate.TransactionException: Could not register synchronization for container transaction
| at org.hibernate.transaction.CMTTransaction.begin(CMTTransaction.java:45)
I am accustomed to this error message; it usually shows up if I forget to inject the Hibernate Session into a jBPM context. This tells me that my way of configuring jBPM is not compatible with Seam's way of using jBPM.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105332#4105332
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105332
More information about the jboss-user