Zarar,
May help - try setting the new connector on both the read and
write connection pool, as it looks like the failure is due to
DefaultConnector deferring to using RESOURCE_LOCAL jdbc properties
for a direct connection.
JNDIConnector readConnector = (JNDIConnector)((DatabaseLogin)((ServerSession)session).getReadConnectionPool().getLogin()).getConnector();
or
(JNDIConnector)((DatabaseLogin)((ServerSession)session).getReadConnectionPool().getLogin()).setConnector(new
JNDIConnector(dataSource));
thank you
/Michael
On 2010-12-07 17:33, Zarar Siddiqi wrote:
Using 2.1.1. Trying to completely disable connection pooling by
EclipseLink as it's handled externally, but I randomly get the
following exception where it tries to get a connection on its own
but fails.
Exception Description: Unable to acquire a connection from
driver [null], user [null] and URL [null]. Verify that you
have set the expected driver class and URL. Check your login,
persistence.xml or sessions.xml resource. The jdbc.driver
property should be set to a class that is compatible with your
database platform
at
org.eclipse.persistence.exceptions.DatabaseException.unableToAcquireConnectionFromDriverException(DatabaseException.java:376)
at
org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:91)
In my session customizer I have:
session.getLogin().setConnector(new
JNDIConnector(dataSource)); // I get dataSource from Spring