AnsweredAssumed Answered

Use of mybatis if i use container managed jta data source

Question asked by vedanth on Mar 14, 2013
Latest reply on Mar 14, 2013 by p4w3l
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 Mo
dule 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

Outcomes