I have the below applicationContext.
My problem is in glassfish using TopLink jpa, toplink is trying to use the default datasource instead of what I have specified in spring. I can tell this because the exception thrown is a sql exception thrown when toplink is trying to connect to the derby datapool instead of my datasource.
I have added -javaagent:${com.sun.aas.instanceRoot}/lib/spring-agent.jar to my vm config and the log looks like it is loaded.
Any ideas as to why the entitymanager is using the default connection instead of what I specify in spring?
I am guessing maybe the the app servers entitymanager is being injected instead of the spring defined one. Though I have followed the many examples around and I think this should not be the case.
Does spring just create another entitymanager or does it use/modify the app servers?
I have atteched my applicationContext.xml and persistence.xml in the one file.


Reply With Quote
