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

Looked into this more, and as Andrei suggested, the customizer is randomly being called (or not called).  It's quite weird.  Is there another way to specify a session customizer? Looked through the docs and couldn't find much.

On Wed, Dec 8, 2010 at 10:55 AM, Andrei Ilitchev <andrei.ilitchev@xxxxxxxxxx> wrote:
I you sure that your customizer is called?

On 12/8/2010 10:07 AM, Zarar Siddiqi wrote:
Thanks for the reply, but that didn't do it.

I downloaded the source and debugged it to the point where I see the
following call on line 104 in DatabaseLogin.java:


That's the which is calling this method:

    public void useDefaultDriverConnect() {
        setConnector(new DefaultConnector());

which is causing the DefaultConnector to be set.

I tried searching for a dontUseDefaultDriverConnect() method but can't
find it.

Still stuck.  Will look into it more but if something jumps out, do let
me know.


On Tue, Dec 7, 2010 at 10:06 PM, Michael O'Brien
<michael.obrien@xxxxxxxxxx <mailto:michael.obrien@xxxxxxxxxx>> wrote:

        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 =



        thank you

   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

   In my session customizer I have:

   JNDIConnector(dataSource)); //  I get dataSource from Spring

   My persistence.xml looks like:

   <persistence xmlns="http://java.sun.com/xml/ns/persistence"

   <persistence-unit name="db">
   <property name="eclipselink.target-database"
   <property name="eclipselink.logging.level" value="FINE"/>
   <property name="eclipselink.logging.logger" value="SLF4JSessionLog"/>
   <property name="eclipselink.session.customizer"

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


   eclipselink-users mailing list
   eclipselink-users@xxxxxxxxxxx  <mailto:eclipselink-users@xxxxxxxxxxx>

   eclipselink-users mailing list
   eclipselink-users@xxxxxxxxxxx <mailto:eclipselink-users@xxxxxxxxxxx>


Zarar Siddiqi

eclipselink-users mailing list
eclipselink-users mailing list

Zarar Siddiqi