cancel
Showing results for 
Search instead for 
Did you mean: 

(I pay) No exception in logs with two transactionManagers...

raymondx
Champ in-the-making
Champ in-the-making
Hi activiti-community, (sorry for my bad english)

Im writing right now an exam with activity. My Job is to combine activiti with some services…
"My activiti" is running in a tomcat (activiti-explorer.war and activit-rest.war), the problem is now:

The services are in a jar (maven project). This jar is in /webapps/activiti-explorer/WEB-INF/lib/_here_. Also the dependencies of the jar are in the same lib-folder…
Im using "activiti-custom-context.xml" and I uncommented the commented beans -> the explorer runs (login-page of activiti-explorer in the browser is avaible).
Now i tried to define some "extra" beans, here their are:

————————————————————————————————————
   <tx:annotation-driven transaction-manager="diffrent_transactionManager"/>


   <bean id="diffrent_dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">

      <property name="driverClass" value="com.mysql.jdbc.Driver" />
      <property name="jdbcUrl" value="jdbc:mysql://localhost/myDatabase?createDatabaseIfNotExist=true&amp;useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true" />
      <property name="user" value="username" />
      <property name="password" value="userpw" />



      <property name="initialPoolSize">
         <value>10</value>
      </property>
      <property name="minPoolSize">
         <value>1</value>
      </property>
      <property name="maxPoolSize">
         <value>25</value>
      </property>
      <property name="acquireRetryAttempts">
         <value>10</value>
      </property>
      <property name="acquireIncrement">
         <value>1</value>
      </property>
      <property name="idleConnectionTestPeriod">
         <value>3600</value>
      </property>
      <property name="maxIdleTime">
         <value>10800</value>
      </property>
      <property name="maxConnectionAge">
         <value>14400</value>
      </property>
   </bean>


   <bean
      class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" />

   <bean id="diffrent_entityManagerFactory"
      class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
      <property name="persistenceUnitName" value="default" />
      <property name="dataSource" ref="diffrent_dataSource" />
      <property name="jpaVendorAdapter">
         <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" />
      </property>
      <property name="jpaProperties">
         <props>
            <prop key="hibernate.dialect">
               org.hibernate.dialect.MySQL5InnoDBDialect
            </prop>
         </props>
      </property>
   </bean>


   <bean id="diffrent_transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
      <property name="entityManagerFactory" ref="diffrent_entityManagerFactory" />
   </bean>

   <context:annotation-config />
   <context:component-scan base-package="the.package.is.ok" />


———————————————————————————————-


I think its the "diffrent_transactionManager", but im not sure…
The symptoms are:
- blank browser page (HTTP 404 - no source : the activiti give a response, so it works, but the reponse-code is 404… -> client-mistake?, really?)
- Standard logs, the logs are avaible, but they just show that the webapp is starting "normal"


I tried to set the log-level to all, debug etc. pp. to get more logs, but it feels like "activiti ignores your log4j.properties"…


If someone can help and know whats the problem, so pls write it here or if you want money for your help, then call me. Just say the price before you help me. I will pay. You can call me till Sonday, dont care about Night/Day, it doesnt matter.

+41 79 195 81 58
2 REPLIES 2

raymondx
Champ in-the-making
Champ in-the-making


<tx:annotation-driven transaction-manager="diffrent_transactionManager"/>


<bean id="diffrent_dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">

  <property name="driverClass" value="com.mysql.jdbc.Driver" />
  <property name="jdbcUrl" value="jdbc:mysql://localhost/databasename?createDatabaseIfNotExist=true&amp;useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true" />
  <property name="user" value="username" />
  <property name="password" value="" />



  <property name="initialPoolSize">
   <value>10</value>
  </property>
  <property name="minPoolSize">
   <value>1</value>
  </property>
  <property name="maxPoolSize">
   <value>25</value>
  </property>
  <property name="acquireRetryAttempts">
   <value>10</value>
  </property>
  <property name="acquireIncrement">
   <value>1</value>
  </property>
  <property name="idleConnectionTestPeriod">
   <value>3600</value>
  </property>
  <property name="maxIdleTime">
   <value>10800</value>
  </property>
  <property name="maxConnectionAge">
   <value>14400</value>
  </property>
</bean>


<bean
  class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" />

<bean id="diffrent_entityManagerFactory"
  class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
  <property name="persistenceUnitName" value="default" />
  <property name="dataSource" ref="diffrent_dataSource" />
  <property name="jpaVendorAdapter">
   <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" />
  </property>
  <property name="jpaProperties">
   <props>
    <prop key="hibernate.dialect">
     org.hibernate.dialect.MySQL5InnoDBDialect
    </prop>
   </props>
  </property>
</bean>


<bean id="diffrent_transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
  <property name="entityManagerFactory" ref="diffrent_entityManagerFactory" />
</bean>

<context:annotation-config />
<context:component-scan base-package="package.is.ok" />


jbarrez
Star Contributor
Star Contributor
I'm not sure what you are trying to do here. Why are you defining a transaction manager? Or another datasource? Activiti already has those defined.

So could you tell me what you want to do, cause it's very hard to understand what is going on here exactly.
Getting started

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.