You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Martin Kalén <mk...@apache.org> on 2006/08/08 11:39:37 UTC

Re: mysql pool problem (again)

Dennis Bekkering skrev:
> A validation query doesn't help in the MySQL scenario: The driver will
> automatically reconnect and successfully execute the query, but the
> Connection still has a chance of remaining in an inconsistent state. This
> won't happen on every reconnect, just on some.

You are perfectly right that the MySQL JDBC-driver's auto re-connect
feature conflicts with the Java connection pool settings,
creating this inconsistency. However, I don't agree that a validation
query does not help - you should be able to turn off the MySQL-specific
feature in the JDBC driver and let the OJB or DBPC connection pool
implementations handle re-connect via validation query
(and validation query only).

To turn off the MySQL re-connect feature:
1. make sure the JDBC URL does *not* include ?autoReconnect=true
(the default value is false = off)

2. make sure that the OJB connection pool settings does *not*
include the JDBC connection property:
<attribute attribute-name="jdbc.autoReconnect" attribute-value="true"/>

To make sure that MySQL auto re-connect is off, you can add an
explicit "false" setting in the OJB connection-pool configuration
(but do make sure to clean the JDBC URL according to #1 above):
<connection-pool ... testOnBorrow="true" ... validationQuery="...">
...
  <attribute
     attribute-name="jdbc.autoReconnect" attribute-value="false"/>
...
</connection-pool>
(Although the default setting has been false since MySQL JDBC v1.1)

Wouldn't this help in your scenario?

See also:
*) MySQL documentation:
Driver/Datasource Class Names, URL Syntax and Configuration Properties 
for Connector/J
http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html

*) OJB documentation:
Repository File, connection-pool, Custom attributes, jdbc.*
http://db.apache.org/ojb/docu/guides/repository.html#jdbc.*

Regards,
  Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Setting ObjectCacheDescriptor programatically

Posted by Armin Waibel <ar...@apache.org>.
Steve Vangasse wrote:
> Thanks Armin. I should have checked the source code.
> 
> Switching logging on for CacheDistributor gives the following output:
> 
> DEBUG org.apache.ojb.broker.cache.CacheDistributor  - Create new 
> ObjectCache implementation for mainConnection
> 
> I don't get any of the details that you get. 

Maybe OJB doesn't lookup the cache in your test. Which OJB version do 
you use?


> The reason I thought it was 
> not having any effect was because the classes I am trying to exclude 
> from the cache are still being cached. Switching on logging for the 
> org.apache.ojb.broker.cache package shows this:
> 
> DEBUG org.apache.ojb.broker.cache.MaterializationCache  - Push to cache: 
> com.shopformat.customer.Customer{600022}
> 

This is the expected behavior. Internal OJB use three grades of caches:
Materialisation Cache (used while object materialization to avoid 
endless loops on circular references), first and second level cache (if 
enabled). Thus the MC is mandatory for correct object materialization.

After materialization the MC push all objects to the ObjectCache 
implementation.


> I am using the following in my class descriptor:
> 
> <class-descriptor class="com.shopformat.customer.Customer" 
> table="customer">
> <object-cache class="org.apache.ojb.broker.cache.ObjectCacheEmptyImpl"/>
> ......
> </class-descriptor>

In this case class Custom will never be cached (MC push objects to a 
NOOP-class ObjectCacheEmptyImpl).


> 
> I assumed the classes without this line will then fall back on the 
> settings of the ObjectCacheDescriptor that was set programatically.

correct, by default the cache implementation declared on 
jdbc-connection-descriptor level is used (if not set, 
ObjectCacheEmptyImpl is used as default cache implementation in 
ObjectCacheDescriptor).


> Can 
> you think of any reason why my Customer class is still being cached? I 
> am getting this log output:
> 
> INFO  org.apache.ojb.broker.cache.CacheDistributor  - Specified cache 
> class org.apache.ojb.broker.cache.ObjectCacheEmptyImpl does not 
> implement interface org.apache.ojb.broker.cache.ObjectCacheInternal and 
> will be wrapped by a helper class
> 
> Does that mean that it is ignoring the ObjectCacheEmptyImpl class?
> 

This only mean that it was wrapped by a helper class with additional 
internal used methods. ObjectCacheEmptyImpl itself will be used for caching.

regards,
Armin

> Thanks,
> 
> Steve Vangasse
> 
> Boardshop.co.uk - Board Sports Equipment and Clothing for the UK and Europe
> www.boardshop.co.uk
> 0870 0600 688
> 
> 
> 
> ----- Original Message ----- From: "Armin Waibel" <ar...@apache.org>
> To: "OJB Users List" <oj...@db.apache.org>
> Sent: Thursday, August 10, 2006 1:55 PM
> Subject: Re: Setting ObjectCacheDescriptor programatically
> 
> 
>> Hi Steve,
>>
>> this seems to be a bug in the #toXML() method of 
>> JdbcConnectionDescriptor (the cascade call to ObjectCacheDescriptor is 
>> missing). I will fix this. But this doesn't affect the 
>> stability/usability of OJB.
>>
>> To check the usage of your specified ObjectCacheDescriptor set the log 
>> level of class CacheDistributor to DEBUG/INFO (if you use OJB's own 
>> simple Logger change entry in OJB-logging.properties).
>>
>> Then you should get something like:
>>
>> [org.apache.ojb.broker.cache.CacheDistributor] INFO:
>> <====
>> Setup new object cache instance on CONNECTION LEVEL for
>> PersistenceBroker: 
>> org.apache.ojb.broker.core.PersistenceBrokerImpl@13c0b53
>> descriptorBasedCache: false
>> Connection jcdAlias: default
>> Calling class: class org.apache.ojb.broker.StoredProcedureTest$Customer
>> ObjectCache: 
>> org.apache.ojb.broker.metadata.ObjectCacheDescriptor@1abcc03[ObjectCache=class 
>> org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl,Properties={autoSync=true, 
>> cacheExcludes=, 
>> copyStrategy=org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStrategyImpl, 
>> cachingKeyType=0, forceProxies=false, timeout=900, 
>> applicationCache=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl, 
>> useSoftReferences=true}]
>> ====>
>>
>> Please let me know if this doesn't work.
>>
>> regards,
>> Armin
>>
>> Steve Vangasse wrote:
>>> I'm having trouble setting up a JdbcConnectionDescriptor 
>>> programatically. I'm adding a ConnectionPoolDescriptor, 
>>> SequenceDescriptor and an ObjectCacheDescriptor to the 
>>> JdbcConnectionDescriptor but the ObjectCacheDescriptor doesn't appear 
>>> when I call JdbcConnectionDescriptor.toXML() and doesn't have any 
>>> effect when the application is running. Here is my code:
>>>
>>> ********
>>>
>>> JdbcConnectionDescriptor jcd = new JdbcConnectionDescriptor();
>>> jcd.setJcdAlias("mainConnection");
>>> jcd.setDatasourceName("java:comp/env/jdbc/mainConnection");
>>> jcd.setDbms("MySQL");
>>> jcd.setJdbcLevel(3.0);
>>> jcd.setBatchMode(false);
>>> jcd.setUseAutoCommit(1);
>>> jcd.setIgnoreAutoCommitExceptions(false);
>>>
>>> ObjectCacheDescriptor ocd = new 
>>> ObjectCacheDescriptor(ObjectCacheTwoLevelImpl.class);
>>> ocd.addAttribute("applicationCache", 
>>> "org.apache.ojb.broker.cache.ObjectCacheDefaultImpl");
>>> ocd.addAttribute("copyStrategy", 
>>> "org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStrategyImpl");
>>> ocd.addAttribute("timeout", "900");
>>> ocd.addAttribute("autoSync", "true");
>>> ocd.addAttribute("cachingKeyType", "1");
>>> ocd.addAttribute("useSoftReferences", "true");
>>> log.debug(ocd.toXML());
>>>
>>> ConnectionPoolDescriptor cpd = new ConnectionPoolDescriptor();
>>> cpd.setLogAbandoned(true);
>>> cpd.setValidationQuery("SELECT 1");
>>>
>>> jcd.setConnectionPoolDescriptor(cpd);
>>> jcd.setObjectCacheDescriptor(ocd);
>>> jcd.setSequenceDescriptor(new SequenceDescriptor(jcd, 
>>> SequenceManagerNativeImpl.class));
>>> connectionRepository.addDescriptor(jcd);
>>>
>>> log.debug(jcd.toXML());
>>> *********
>>>
>>> I can't use an XML file for reasons I won't go into here. Can anyone 
>>> see what I might be doing wrong here? Has anyone else attempted to do 
>>> this? Any help would be much appreciated.
>>>
>>> Thanks,
>>>
>>> Steve Vangasse
>>>
>>> Boardshop.co.uk - Board Sports Equipment and Clothing for the UK and 
>>> Europe
>>> www.boardshop.co.uk
>>> 0870 0600 688
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Setting ObjectCacheDescriptor programatically

Posted by Steve Vangasse <st...@boardshop.co.uk>.
Thanks Armin. I should have checked the source code.

Switching logging on for CacheDistributor gives the following output:

DEBUG org.apache.ojb.broker.cache.CacheDistributor  - Create new ObjectCache 
implementation for mainConnection

I don't get any of the details that you get. The reason I thought it was not 
having any effect was because the classes I am trying to exclude from the 
cache are still being cached. Switching on logging for the 
org.apache.ojb.broker.cache package shows this:

DEBUG org.apache.ojb.broker.cache.MaterializationCache  - Push to cache: 
com.shopformat.customer.Customer{600022}

I am using the following in my class descriptor:

<class-descriptor class="com.shopformat.customer.Customer" table="customer">
<object-cache class="org.apache.ojb.broker.cache.ObjectCacheEmptyImpl"/>
......
</class-descriptor>

I assumed the classes without this line will then fall back on the settings 
of the ObjectCacheDescriptor that was set programatically. Can you think of 
any reason why my Customer class is still being cached? I am getting this 
log output:

INFO  org.apache.ojb.broker.cache.CacheDistributor  - Specified cache class 
org.apache.ojb.broker.cache.ObjectCacheEmptyImpl does not implement 
interface org.apache.ojb.broker.cache.ObjectCacheInternal and will be 
wrapped by a helper class

Does that mean that it is ignoring the ObjectCacheEmptyImpl class?

Thanks,

Steve Vangasse

Boardshop.co.uk - Board Sports Equipment and Clothing for the UK and Europe
www.boardshop.co.uk
0870 0600 688



----- Original Message ----- 
From: "Armin Waibel" <ar...@apache.org>
To: "OJB Users List" <oj...@db.apache.org>
Sent: Thursday, August 10, 2006 1:55 PM
Subject: Re: Setting ObjectCacheDescriptor programatically


> Hi Steve,
>
> this seems to be a bug in the #toXML() method of JdbcConnectionDescriptor 
> (the cascade call to ObjectCacheDescriptor is missing). I will fix this. 
> But this doesn't affect the stability/usability of OJB.
>
> To check the usage of your specified ObjectCacheDescriptor set the log 
> level of class CacheDistributor to DEBUG/INFO (if you use OJB's own simple 
> Logger change entry in OJB-logging.properties).
>
> Then you should get something like:
>
> [org.apache.ojb.broker.cache.CacheDistributor] INFO:
> <====
> Setup new object cache instance on CONNECTION LEVEL for
> PersistenceBroker: 
> org.apache.ojb.broker.core.PersistenceBrokerImpl@13c0b53
> descriptorBasedCache: false
> Connection jcdAlias: default
> Calling class: class org.apache.ojb.broker.StoredProcedureTest$Customer
> ObjectCache: 
> org.apache.ojb.broker.metadata.ObjectCacheDescriptor@1abcc03[ObjectCache=class 
> org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl,Properties={autoSync=true, 
> cacheExcludes=, 
> copyStrategy=org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStrategyImpl, 
> cachingKeyType=0, forceProxies=false, timeout=900, 
> applicationCache=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl, 
> useSoftReferences=true}]
> ====>
>
> Please let me know if this doesn't work.
>
> regards,
> Armin
>
> Steve Vangasse wrote:
>> I'm having trouble setting up a JdbcConnectionDescriptor programatically. 
>> I'm adding a ConnectionPoolDescriptor, SequenceDescriptor and an 
>> ObjectCacheDescriptor to the JdbcConnectionDescriptor but the 
>> ObjectCacheDescriptor doesn't appear when I call 
>> JdbcConnectionDescriptor.toXML() and doesn't have any effect when the 
>> application is running. Here is my code:
>>
>> ********
>>
>> JdbcConnectionDescriptor jcd = new JdbcConnectionDescriptor();
>> jcd.setJcdAlias("mainConnection");
>> jcd.setDatasourceName("java:comp/env/jdbc/mainConnection");
>> jcd.setDbms("MySQL");
>> jcd.setJdbcLevel(3.0);
>> jcd.setBatchMode(false);
>> jcd.setUseAutoCommit(1);
>> jcd.setIgnoreAutoCommitExceptions(false);
>>
>> ObjectCacheDescriptor ocd = new 
>> ObjectCacheDescriptor(ObjectCacheTwoLevelImpl.class);
>> ocd.addAttribute("applicationCache", 
>> "org.apache.ojb.broker.cache.ObjectCacheDefaultImpl");
>> ocd.addAttribute("copyStrategy", 
>> "org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStrategyImpl");
>> ocd.addAttribute("timeout", "900");
>> ocd.addAttribute("autoSync", "true");
>> ocd.addAttribute("cachingKeyType", "1");
>> ocd.addAttribute("useSoftReferences", "true");
>> log.debug(ocd.toXML());
>>
>> ConnectionPoolDescriptor cpd = new ConnectionPoolDescriptor();
>> cpd.setLogAbandoned(true);
>> cpd.setValidationQuery("SELECT 1");
>>
>> jcd.setConnectionPoolDescriptor(cpd);
>> jcd.setObjectCacheDescriptor(ocd);
>> jcd.setSequenceDescriptor(new SequenceDescriptor(jcd, 
>> SequenceManagerNativeImpl.class));
>> connectionRepository.addDescriptor(jcd);
>>
>> log.debug(jcd.toXML());
>> *********
>>
>> I can't use an XML file for reasons I won't go into here. Can anyone see 
>> what I might be doing wrong here? Has anyone else attempted to do this? 
>> Any help would be much appreciated.
>>
>> Thanks,
>>
>> Steve Vangasse
>>
>> Boardshop.co.uk - Board Sports Equipment and Clothing for the UK and 
>> Europe
>> www.boardshop.co.uk
>> 0870 0600 688
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Setting ObjectCacheDescriptor programatically

Posted by Armin Waibel <ar...@apache.org>.
Hi Steve,

this seems to be a bug in the #toXML() method of 
JdbcConnectionDescriptor (the cascade call to ObjectCacheDescriptor is 
missing). I will fix this. But this doesn't affect the 
stability/usability of OJB.

To check the usage of your specified ObjectCacheDescriptor set the log 
level of class CacheDistributor to DEBUG/INFO (if you use OJB's own 
simple Logger change entry in OJB-logging.properties).

Then you should get something like:

[org.apache.ojb.broker.cache.CacheDistributor] INFO:
<====
Setup new object cache instance on CONNECTION LEVEL for
PersistenceBroker: org.apache.ojb.broker.core.PersistenceBrokerImpl@13c0b53
descriptorBasedCache: false
Connection jcdAlias: default
Calling class: class org.apache.ojb.broker.StoredProcedureTest$Customer
ObjectCache: 
org.apache.ojb.broker.metadata.ObjectCacheDescriptor@1abcc03[ObjectCache=class 
org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl,Properties={autoSync=true, 
cacheExcludes=, 
copyStrategy=org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStrategyImpl, 
cachingKeyType=0, forceProxies=false, timeout=900, 
applicationCache=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl, 
useSoftReferences=true}]
====>

Please let me know if this doesn't work.

regards,
Armin

Steve Vangasse wrote:
> I'm having trouble setting up a JdbcConnectionDescriptor 
> programatically. I'm adding a ConnectionPoolDescriptor, 
> SequenceDescriptor and an ObjectCacheDescriptor to the 
> JdbcConnectionDescriptor but the ObjectCacheDescriptor doesn't appear 
> when I call JdbcConnectionDescriptor.toXML() and doesn't have any effect 
> when the application is running. Here is my code:
> 
> ********
> 
> JdbcConnectionDescriptor jcd = new JdbcConnectionDescriptor();
> jcd.setJcdAlias("mainConnection");
> jcd.setDatasourceName("java:comp/env/jdbc/mainConnection");
> jcd.setDbms("MySQL");
> jcd.setJdbcLevel(3.0);
> jcd.setBatchMode(false);
> jcd.setUseAutoCommit(1);
> jcd.setIgnoreAutoCommitExceptions(false);
> 
> ObjectCacheDescriptor ocd = new 
> ObjectCacheDescriptor(ObjectCacheTwoLevelImpl.class);
> ocd.addAttribute("applicationCache", 
> "org.apache.ojb.broker.cache.ObjectCacheDefaultImpl");
> ocd.addAttribute("copyStrategy", 
> "org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStrategyImpl");
> ocd.addAttribute("timeout", "900");
> ocd.addAttribute("autoSync", "true");
> ocd.addAttribute("cachingKeyType", "1");
> ocd.addAttribute("useSoftReferences", "true");
> log.debug(ocd.toXML());
> 
> ConnectionPoolDescriptor cpd = new ConnectionPoolDescriptor();
> cpd.setLogAbandoned(true);
> cpd.setValidationQuery("SELECT 1");
> 
> jcd.setConnectionPoolDescriptor(cpd);
> jcd.setObjectCacheDescriptor(ocd);
> jcd.setSequenceDescriptor(new SequenceDescriptor(jcd, 
> SequenceManagerNativeImpl.class));
> connectionRepository.addDescriptor(jcd);
> 
> log.debug(jcd.toXML());
> *********
> 
> I can't use an XML file for reasons I won't go into here. Can anyone see 
> what I might be doing wrong here? Has anyone else attempted to do this? 
> Any help would be much appreciated.
> 
> Thanks,
> 
> Steve Vangasse
> 
> Boardshop.co.uk - Board Sports Equipment and Clothing for the UK and Europe
> www.boardshop.co.uk
> 0870 0600 688
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Setting ObjectCacheDescriptor programatically

Posted by Steve Vangasse <st...@boardshop.co.uk>.
I'm having trouble setting up a JdbcConnectionDescriptor programatically. 
I'm adding a ConnectionPoolDescriptor, SequenceDescriptor and an 
ObjectCacheDescriptor to the JdbcConnectionDescriptor but the 
ObjectCacheDescriptor doesn't appear when I call 
JdbcConnectionDescriptor.toXML() and doesn't have any effect when the 
application is running. Here is my code:

********

JdbcConnectionDescriptor jcd = new JdbcConnectionDescriptor();
jcd.setJcdAlias("mainConnection");
jcd.setDatasourceName("java:comp/env/jdbc/mainConnection");
jcd.setDbms("MySQL");
jcd.setJdbcLevel(3.0);
jcd.setBatchMode(false);
jcd.setUseAutoCommit(1);
jcd.setIgnoreAutoCommitExceptions(false);

ObjectCacheDescriptor ocd = new 
ObjectCacheDescriptor(ObjectCacheTwoLevelImpl.class);
ocd.addAttribute("applicationCache", 
"org.apache.ojb.broker.cache.ObjectCacheDefaultImpl");
ocd.addAttribute("copyStrategy", 
"org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStrategyImpl");
ocd.addAttribute("timeout", "900");
ocd.addAttribute("autoSync", "true");
ocd.addAttribute("cachingKeyType", "1");
ocd.addAttribute("useSoftReferences", "true");
log.debug(ocd.toXML());

ConnectionPoolDescriptor cpd = new ConnectionPoolDescriptor();
cpd.setLogAbandoned(true);
cpd.setValidationQuery("SELECT 1");

jcd.setConnectionPoolDescriptor(cpd);
jcd.setObjectCacheDescriptor(ocd);
jcd.setSequenceDescriptor(new SequenceDescriptor(jcd, 
SequenceManagerNativeImpl.class));
connectionRepository.addDescriptor(jcd);

log.debug(jcd.toXML());
*********

I can't use an XML file for reasons I won't go into here. Can anyone see 
what I might be doing wrong here? Has anyone else attempted to do this? Any 
help would be much appreciated.

Thanks,

Steve Vangasse

Boardshop.co.uk - Board Sports Equipment and Clothing for the UK and Europe
www.boardshop.co.uk
0870 0600 688


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: mysql pool problem (again)

Posted by Dennis Bekkering <dj...@gmail.com>.
Martin,

Thanks for the help. As usual i was to fast with conclusions, my problems at
the time originated from a connection leak.

Thanks,
Dennis

2006/8/8, Martin Kalén <mk...@apache.org>:
>
> Dennis Bekkering skrev:
> > A validation query doesn't help in the MySQL scenario: The driver will
> > automatically reconnect and successfully execute the query, but the
> > Connection still has a chance of remaining in an inconsistent state.
> This
> > won't happen on every reconnect, just on some.
>
> You are perfectly right that the MySQL JDBC-driver's auto re-connect
> feature conflicts with the Java connection pool settings,
> creating this inconsistency. However, I don't agree that a validation
> query does not help - you should be able to turn off the MySQL-specific
> feature in the JDBC driver and let the OJB or DBPC connection pool
> implementations handle re-connect via validation query
> (and validation query only).
>
> To turn off the MySQL re-connect feature:
> 1. make sure the JDBC URL does *not* include ?autoReconnect=true
> (the default value is false = off)
>
> 2. make sure that the OJB connection pool settings does *not*
> include the JDBC connection property:
> <attribute attribute-name="jdbc.autoReconnect" attribute-value="true"/>
>
> To make sure that MySQL auto re-connect is off, you can add an
> explicit "false" setting in the OJB connection-pool configuration
> (but do make sure to clean the JDBC URL according to #1 above):
> <connection-pool ... testOnBorrow="true" ... validationQuery="...">
> ...
>   <attribute
>      attribute-name="jdbc.autoReconnect " attribute-value="false"/>
> ...
> </connection-pool>
> (Although the default setting has been false since MySQL JDBC v1.1)
>
> Wouldn't this help in your scenario?
>
> See also:
> *) MySQL documentation:
> Driver/Datasource Class Names, URL Syntax and Configuration Properties
> for Connector/J
> http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html
>
>
> *) OJB documentation:
> Repository File, connection-pool, Custom attributes, jdbc.*
> http://db.apache.org/ojb/docu/guides/repository.html#jdbc.*
>
> Regards,
>   Martin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>


-- 
mvg,
Dennis