In my persistence.xml
file I have the following connection defined...
<jta-data-source>java:comp/env/jdbc/jee</jta-data-source>
It works well in WebSphere (in fact it's the only way I can get WebSphere to work correctly) with JPA. It also worked with TomEE.
However when I deploy it in Payara/Glassfish I get the following error
com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Invalid resource : java:comp/env/jdbc/jee__pm
I have verified that I enabled Allow Non Component Callers
in the connection pool configuration.
I also added a glassfish-ejb-jar.xml
and glassfish-application.xml
with the resource refs defined as
<resource-ref>
<res-ref-name>java:comp/env/jdbc/jee</res-ref-name>
<jndi-name>jdbc/jee</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>jdbc/jee</res-ref-name>
<jndi-name>jdbc/jee</jndi-name>
</resource-ref>