Openbravo Issue Tracking System - Modules | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0029089 | Modules | zz obsolete Activiti Integration | public | 2015-02-27 09:29 | 2015-02-27 11:06 | |||||||
Reporter | alostale | |||||||||||
Assigned To | alostale | |||||||||||
Priority | normal | Severity | minor | Reproducibility | N/A | |||||||
Status | new | Resolution | open | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | |||||||||||
Merge Request Status | ||||||||||||
Regression date | ||||||||||||
Regression introduced by commit | ||||||||||||
Regression level | ||||||||||||
Review Assigned To | ||||||||||||
Support ticket | ||||||||||||
OBNetwork customer | ||||||||||||
Regression introduced in release | ||||||||||||
Summary | 0029089: Activiti integration uses its own db pool, it should use Openbravo's one | |||||||||||
Description | Activiti 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 Reproduce | One of the problems of this additional pool is reported in issue 0028915 | |||||||||||
Proposed Solution | Ideally, 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 [^] | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ActivitiDataSource.java (2,133) 2015-02-27 11:06 https://issues.openbravo.com/file_download.php?file_id=7840&type=bug | |||||||||||
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 | bug_revision_view_page.php?rev_id=7804#r7804 | |||||||||
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 |
Notes | |||||
|
|||||
|
|