Please can you help me.
Due to bugs in prehistoric third party JDBC driver we are forced to access database through only one shared connection for reading and writing.
Environment:
Java SE 6u24, Eclipselink 2.1.2, platform MS Access
I tried to limit connection pool that solved the problem with shared connection for reading/writing
<property name="eclipselink.jdbc.connections.initial" value="0"/>
<property name="eclipselink.jdbc.connections.min" value="0"/>
<property name="eclipselink.jdbc.connections.max" value="1"/>
<property name="eclipselink.jdbc.connection_pool.read.shared" value="true"/>
<property name="eclipselink.jdbc.read-connections.shared" value="true"/>
There is problem when I want access DB from multiple threads. Because other waits on Connection Pool for releasing connection.
Typical scenario:
1st thread - works ScrollableCursor
2nd thread - try to execute ReadAllQuery (select * from...)
ReadAllQuery is waiting for connection that is held by ScrollableCursor
I think that is possible to implement custom connection pool.
Question: is there any documentation/tutorial or code sample that shows how to implement connection pool for EclipseLink 2.1.2. Would it work for EclipseLink 2.2, newer versions?
Thank you very much for help
Martin
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users