Hello There,
I am trying to use p6spy with Glassfish and have been following the instructions
here and I have created a P6Spy connection pool, linked to my actual datasource (through the "realdatasource" property) which I bind to a jndi name which I then use in my app. Everything seems to have been configured fine as I can ping my P6Spy pool ok. However, when I try to use this datasource in my app I'm getting the following exception:
"java.lang.IllegalStateException: Local transaction already has 1 non-XA Resource: cannot add more resources. "which to me makes sense since my actual datasource is not an XA one and if P6Spy is a different datasource in its own right then this is the behaviour I'd expect. But what kind of configuration do I need to make both datasources work in the same transaction then? I've tried making my actual datsource an XADataSource but am getting the same exception (this would also probably increase latency and wouldn't result in accurate profiling I gather ).
Any thoughts?
Thanks,
Savvas