01-24-2011 01:56 PM
01-24-2011 02:22 PM
I know that probably this is a bad decision for the performance, but after finding a solution for the problem of persistence, we will try to start the Activiti engine as a GlassFish service, and obtain it with jndi.
- Making Activiti use the same Entity Manager that is used by the EJB, as it is configured with JTA.
- Making Activiti use a DataSource obtained from the container (with @Resource annotation).Or have the option to pass in a datasource in another way. @Resource binds you to a container, which is currently not needed. Starting it in an EJB, where you have the datasource and use that when starting the engine would be an option I think.
01-25-2011 04:00 AM
01-25-2011 10:44 AM
ProcessEngineConfiguration pec = ProcessEngineConfiguration.createProcessEngineConfigurationFromResourceDefault();
pec.setDataSource(datasource);
pec.setTransactionsExternallyManaged(true);
engine = pec.buildProcessEngine();
And it works like a charm!!Activiti doesnt yet (fully) work with JTA.What do you exactly mean?. All the tests that I have made worked fine. I would like to know what could fail and in what circumstances.
01-26-2011 04:12 AM
What do you exactly mean?. All the tests that I have made worked fine. I would like to know what could fail and in what circumstances.
01-26-2011 07:30 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.