jQuery in Action, 2nd edition*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes doubt about <res-auth> element of <resource-ref> in context of glassfish ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "doubt about <res-auth> element of <resource-ref> in context of glassfish ?" Watch "doubt about <res-auth> element of <resource-ref> in context of glassfish ?" New topic
Author

doubt about <res-auth> element of <resource-ref> in context of glassfish ?

gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 924
    
    1

i'am using glassfish version GlassFish Server Open Source Edition 3.1.2.2 (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

javax.resource.ResourceException: When res-auth is specified in the runtime deployment descriptor as Application, userid/passwd cannot be null


when i explicitly included res-auth element and set its value to Container , my application worked fine .has glassfish missed the spec here or am i missing something ?
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1629
    
  23

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.

Regards,
Frits
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doubt about <res-auth> element of <resource-ref> in context of glassfish ?
 
Similar Threads
Do we have this in DD?
error-page doubt
valid values for res-auth tag
Head First: BOOK ERROR - which is correct ? Book or spec ?
2 Questions : Can Messge Beans have an Instance Variable