cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Pikkemaat <h.pikkem...@tsi-solutions.nl>
Subject flush cayenne config and connections
Date Mon, 21 Mar 2011 12:12:22 GMT
Hi,

I have a unit test where I use jndi to determine my connection parameters.

When I run one unit test which uses a specific jndi setup and it calls cayenne then
all works fine (i use org.apache.cayenne.conf.JNDIDataSourceFactory)

I then clear my jndi container and repopulate it with different connection details
(different database).

Running cayenne again still uses the earlier connection. Recreating a data context
doesn't seem to help. I also tried Configuration.getSharedConfiguration().shutdown()
but this also doesn't help.

Maybe the connections are re-used? If so, is there a way to clear those?

In general, is there a way to reset cayenne in such a way that my above unit testing will
work?

tx

Hans


Mime
View raw message