Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Disabling EclipseLink Connection Pooling

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
        session.getLogin().useExternalConnectionPooling();

My persistence.xml looks like:

<persistence xmlns="http://java.sun.com/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
             version="2.0">
    <persistence-unit name="db">
     
        <properties>
            <property name="eclipselink.target-database" value="ca.utoronto.sis.sws.db.ExtendedDB2MainframePlatform"/>
            <property name="eclipselink.logging.level" value="FINE"/>
            <property name="eclipselink.logging.logger" value="SLF4JSessionLog"/>
            <property name="eclipselink.session.customizer" value="EclipseLinkSessionCustomizer"/>
        </properties>
</persistence-unit>
</persistence>


Any idea why it's trying to go and do this on its own when I tell it not to?

Thanks,


Back to the top