2012/3/15 Steven Xiong <xcste...@yahoo.com>:
> I have a Spring/JPA application running on Tomcat 6.0.29 accessing two 
> schemas of a single Oracle database. Each schema is configured as a seperate 
> datasource. If we config the datasources as spring beans of 
> "com.mchange.v2.c3p0.ComboPooledDataSource" type, the app works correctly. 
> However if we use two JNDI datasources configured in META-INF/context.xml, 
> the both autowired datasources point to only ONE same schema.

So autowiring in Spring wired you to the same datasource?

That would be a Spring question. There is nothing for Tomcat to be
concerned here.


There might be dummy errors to check first:
1) Check that you have properly undeployed the previous version of the
webapp, before deploying the new one.  The concern here is having a
stale copy of the webapp's context file (<webapp>.xml in
conf/Catalina/localhost).

2) Write a sample jsp page that performs JNDI lookup (using code
samples from the Tomcat documentation) to make sure that both
datasources are available and have different JNDI names and connect to
different schemas.

Best regards,
Konstantin Kolinko

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

Reply via email to