Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029089
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Modules] zz obsolete Activiti IntegrationminorN/A2015-02-27 09:292015-02-27 11:06
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Regression date
Regression introduced by commit
Regression level
Review Assigned To
Regression introduced in release
Summary

0029089: Activiti integration uses its own db pool, it should use Openbravo's one

DescriptionActiviti integration module uses its own database connection pool. This can lead to problems managing connections.

Current implementation is org.apache.commons.dbcp.BasicDataSource [1]

[1] http://commons.apache.org/proper/commons-dbcp/api-1.4/org/apache/commons/dbcp/BasicDataSource.html [^]
Steps To ReproduceOne of the problems of this additional pool is reported in issue 0028915
Proposed SolutionIdeally, it should reuse the same pool defined for Openbravo (default one or any external one).

DataSource for activiti module is defined in applicationContext.xml file:

...
  <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
    <property name="driverClassName" value="${hibernate.connection.driver_class}" />
    <property name="url" value="${hibernate.connection.url}" />
    <property name="username" value="${hibernate.connection.username}" />
    <property name="password" value="${hibernate.connection.password}" />
     <property name="defaultAutoCommit" value="false" />
  </bean>
...

According to activiti documentation ([1] and [2]), it should be possible to implement a javax.sql.DataSource
making use of Openbravo pool.

First attempt implemented by the attached file results in errors on Tomcat start up:

### Error updating database. Cause: java.sql.SQLException: Connection is closed.
### The error may exist in org/activiti/db/mapping/entity/VariableInstance.xml
### The error may involve org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.insertByteArray_postgres
### The error occurred while executing an update
### SQL: insert into ACT_GE_BYTEARRAY(ID_, REV_, NAME_, BYTES_, DEPLOYMENT_ID_) values ( ?, 1, ?, ?, ? )
### Cause: java.sql.SQLException: Connection is closed.
    at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:120)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:107)
    at org.activiti.engine.impl.db.DbSqlSession.flushInserts(DbSqlSession.java:420)
    at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:347)
    at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:147)
    at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:103)
    at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:49)
    at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)


---
[1] http://www.activiti.org/userguide/#databaseConfiguration [^]
[2] http://www.activiti.org/userguide/#_changing_the_database_and_connection_pool [^]
TagsNo tags attached.
Attached Files? file icon ActivitiDataSource.java [^] (2,133 bytes) 2015-02-27 11:06

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0028915 closedalostale Not possible to start tomcat after use the dunning module 

-  Notes
(0075018)
hgbot (developer)
2015-02-27 10:05

Repository: erp/mods/org.openbravo.activiti
Changeset: 9ce8cc16cb256dbc480cd116b949a6c454c07ae3
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Feb 27 09:45:58 2015 +0100
URL: http://code.openbravo.com/erp/mods/org.openbravo.activiti/rev/9ce8cc16cb256dbc480cd116b949a6c454c07ae3 [^]

fixed bug 28915: tomcat does not start when number of jobs to execute is big

  The problem is due the extra pool activiti uses, which was configured to acquire
  at most 8 connections and to wait for one of them is released when an extra one
  is required.

  When in this situation, more than 8 connections are used in parallel causing a
  deadlock situation.

  Temporary solution, till issue 29089 is fixed, consists in allowing activiti module
  to grow as much as needed, restoring to a maximum of 5 idle connections once the
  rest are released.

---
M config/applicationContext.xml
---

- Issue History
Date Modified Username Field Change
2015-02-27 09:29 alostale New Issue
2015-02-27 09:29 alostale Assigned To => mtaal
2015-02-27 09:29 alostale Assigned To mtaal => alostale
2015-02-27 09:29 alostale Relationship added depends on 0028915
2015-02-27 09:30 alostale Relationship replaced related to 0028915
2015-02-27 09:30 alostale Proposed Solution updated
2015-02-27 09:33 alostale Description Updated View Revisions
2015-02-27 10:05 hgbot Checkin
2015-02-27 10:05 hgbot Note Added: 0075018
2015-02-27 11:06 alostale File Added: ActivitiDataSource.java
2022-02-18 04:21 priyam Category Activiti Integration => Z_Obsolete Activiti Integration
2022-02-18 04:24 priyam Category Z_Obsolete Activiti Integration => zz obsolete Activiti Integration


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker