i'am using glassfish version GlassFish Server Open Source Edition 184.108.40.206 (build 5). the specs say that if you dont specify <res-auth> element it is defaulted to Container. however the glassfish gave me an exception saying
as far as I remember when you define the resource ref to Application, the authentication will be handled by the resource-ref (i.e. db, or other managed resource)
If the Bean Provider sets the authenticationType element of the Resource annotation to AuthenticationType.APPLICATION or the res-auth deployment descriptor entry for a resource manager connection factory reference to Application, the container must allow the bean to perform explicit programmatic sign-on using the resource manager's API.