I¹ve got a REST service that¹s backed by Hibernate calling MYSQL and using
org.apache.tomcat.jdbc.pool.DataSourceFactory for DB connections.  The
connection pool is created with:

<Resource driverClassName="com.mysql.jdbc.Driver"
              username=³me" password=³my password"
              factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
              name=³jdbc/MyDB"
              type="javax.sql.DataSource"
              url="jdbc:mysql://my.database.net"
              validationQuery="select 1"
              validationQueryTimeout="60"
              testOnBorrow="true"
              testWhileIdle="true"
              removeAbandoned="true"
              removeAbandonedTimeout="30"
              suspectTimeout="15"
              logAbandoned="true"
              timeBetweenEvictionRunsMillis="5000"
              minEvictableIdleTimeMillis="60000"
              validationInterval="30000"
              />

It looks like the first record retrieved from the service is being stored
somehow.  I can alter the data retrieved by the first select but I¹ll
occasionally get the initial data back on a subsequent selects.  After
much troubleshooting, it feels like the stale data is returned only when
my select is performed with the same connection (from the pool) as the
first select since the service started.  I don¹t know how to tell for sure
that the initial connection is the one holding onto old data but the old
data is always the first data I¹ve read and it will be returned seemingly
randomly although the data in the underlying database is correct and we
have no caching turned on in hibernate.

My test procedure has been:

1) Start service
2) Read record
3) Change record
4) Read record
5) Repeat 4


If nothing else is hitting the service (no concurrency) I never see stale
data.  It¹s only when other clients are hitting the service that I
randomly get stale data returned.  The stale data is always the first
record read and is only returned when attempting to read that record again.

Has anyone ever seen anything like this?  Ideas on where to troubleshoot?

Thanks in advance for any input!




CONFIDENTIALITY NOTICE This message and any included attachments are from 
Cerner Corporation and are intended only for the addressee. The information 
contained in this message is confidential and may constitute inside or 
non-public information under international, federal, or state securities laws. 
Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail or you may call Cerner's corporate offices in Kansas 
City, Missouri, U.S.A at (+1) (816)221-1024.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to