cancel
Showing results for 
Search instead for 
Did you mean: 

Use of mybatis if i use container managed jta data source

vedanth
Champ in-the-making
Champ in-the-making
Hi,
    Am trying to configure the process engine using the datasource jndi  which is managed by the container. Code used to configure process engine is as below:

ProcessEngineConfiguration processEngineConfiguration = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration();      processEngineConfiguration.setDataSourceJndiName(properties.getProperty("java:jboss/datasources/ExampleDS"));      processEngineConfiguration.setJobExecutorActivate(new Boolean(properties.getProperty("true")));      processEngineConfiguration.setDatabaseSchemaUpdate(properties.getProperty("false"));                processEngineConfiguration.setTransactionsExternallyManaged(true);      processEngineConfiguration.setProcessEngineName("default");      processEngineConfiguration.buildProcessEngine();‍‍‍‍‍‍‍

With the above configuration if i do not user my batis jar i get the class not found exception:

Caused by: java.lang.ClassNotFoundException: org.apache.ibatis.transaction.TransactionFactory from [Module "deployment.default-process-engine.war:main" from Service Module Loader]        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)‍‍‍‍‍‍‍

Why do i need mybatis if i provide a container managed datasource?
Or is there any other way to configure the process engine with datasource name without having mybatis interruption.

Regards,
Vedanth
1 REPLY 1

p4w3l
Champ in-the-making
Champ in-the-making
Activiti fully relies on mybatis for its persistence but you have a freedom to define a datasource it uses. You can do it manually or use container managed one. In any case you need mybatis.