Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.0
-
None
-
Unknown
Description
Today I migrated to 3.0.0 version and there seems to be an issue with Service pooling for the Jt400PgmpProducer.
Here's what I have:
from( "seda:someName?concurrentConsumers=2&size=10") .to("jt400://{{as400.user}}:{{as400.password}}@{{as400.host}}/QSYS.LIB/PROGRAM.LIB/KFKEVR.SRVPGM?fieldsLength=200,2000,4,8,8,1000&outputFieldsIdx=0,1,2,3,4,5&connectionPool=#as400ConnectionPool&format=binary&procedureName=RECEIVEEVENT");
When concurrentConsumers attribute of seda endpoint is set to 1 everything works fine, but when it is greater than 1 then it looks like the evict method from MultiplePool class calls stop method on a Jt400PgmProducer instance that is still being used (the process method on it is still getting called). This results in nulling the iSeries object inside Jt400PgmProducer instance:
@Override protected void doStop() throws Exception { if (iSeries != null) { LOG.info("Releasing connection to {}", getISeriesEndpoint()); getISeriesEndpoint().releaseSystem(iSeries); iSeries = null; } }
and when the process method gets called later on this instance, it fails with NPE while constructing ServiceProgramCall:
@Override public void process(Exchange exchange) throws Exception { ... pgmCall = new ServiceProgramCall(iSeries); ...
I believe this may be related to producer caching in ServicePool class, some sort of key issue in the cache Map maybe?
Attachments
Attachments
Issue Links
- is broken by
-
CAMEL-14340 camel-core - Concurrency issue in multipool for non singleton producers
- Resolved