Hi Bruno,

Bruno CROS wrote:
    Hi,

 I have a strange behaviour about the second database i use. It seems that
using "broker = PersistenceBrokerFactory.createPersistenceBroker("rushDb");"
always return the same broker/connection.

My connection pool is setup as it have to keep 2 idle connections
available, and it never occured. Still only one.

How can i use several connection in this case?

Note that this database is not not use to update datas. No transaction are
used on it.


how do you test this behavior? Please setup a test and lookup for two PB instances at the same time:

broker_A = PersistenceBrokerFactory.createPersistenceBroker("rushDb");
broker_B = PersistenceBrokerFactory.createPersistenceBroker("rushDb");

Are A and B really the same broker instances? If you execute a query on both broker instances (don't close the broker after it) and then lookup the Connection from A and B - are the connections the same?

regards,
Armin


Thanks.


Here's my connection setup.

   <jdbc-connection-descriptor
    jcd-alias="rushDb"
    default-connection="false"
    platform="MsSQLServer"
    jdbc-level="2.0"
    driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    protocol="JDBC"
    subprotocol="microsoft:sqlserver"
    dbalias="//xxx.x.x.x:1433"
    username="xxxx"
    password="xxxx"
    batch-mode="true"
       useAutoCommit="0"
       ignoreAutoCommitExceptions="true"
    >

and pool setup :

           maxActive="5"
          maxIdle="-1"
           minIdle="2"
           maxWait="5000"
           whenExhaustedAction="2"

           validationQuery="SELECT CURRENT_TIMESTAMP"
           testOnBorrow="true"
           testOnReturn="false"
           testWhileIdle="true"
           timeBetweenEvictionRunsMillis="60000"
    numTestsPerEvictionRun="2"
           minEvictableIdleTimeMillis="1800000"
           removedAbandonned="false"
           removeAbandonedTimeout="300"
           logAbandoned="true">


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to