gardellajp [http://community.jboss.org/people/gardellajp] created the discussion
"Re: JBPM's persistence reusing existing connection" To view the discussion, visit: http://community.jboss.org/message/642466#642466 -------------------------------------------------------------- Hi Andres, See http://docs.jboss.org/hibernate/entitymanager/3.6/reference/en/html/architecture.html#architecture-ejb-persistctxpropagation http://docs.jboss.org/hibernate/entitymanager/3.6/reference/en/html/architecture.html#architecture-ejb-persistctxpropagation. +In a transaction-scoped container managed entity manager (common case in a Java EE environment), the JTA transaction propagation is the same as the persistence context resource propagation. In other words, container-managed transaction-scoped entity managers retrieved within a given JTA transaction all share the same persistence context. *In Hibernate terms, this means all managers share the same session.*+ So, you share session with JTA. Good things that jBPM JPAKnowledgeService use JTA to obtain transactions. JPAKnowledgeService javadoc says: +Long term out of the box persistence of runtime state with JPA is possible with Drools & jBPM. You will need to configure a JPA entity manager (e.g. using hibernate) *and have a JTA transaction manager* (for development/testing purposes we recommend Bitronix as it's simple to setup and works embedded, but for production the use of JBoss Transactions is recommended).+ Correct me Mauricio if I don't understand well how manage persistent in jBPM with JPAKnowledgeService. Andrés you can refer to some database with JTA, see http://stackoverflow.com/questions/3217586/difference-between-a-jta-datasource-and-a-resource-local-datasource http://stackoverflow.com/questions/3217586/difference-between-a-jta-datasource-and-a-resource-local-datasource Juan -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/642466#642466] Start a new discussion in jBPM at Community [http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
