users@glassfish.java.net

Mapped JDBC name?

From: <glassfish_at_javadesktop.org>
Date: Mon, 14 Apr 2008 14:43:31 PDT

I have a stateless session bean. In that bean, I want to do a JNDI lookup (not injection) for "jdbc/RealmDS" I want to use my deployment descriptor to map "jdbc/RealmDS" to "jdbc/UnityDS", which is how I have it declared in my glassfish domain. I thought the following XML snippet would do it:

      <resource-ref>
        <res-ref-name>jdbc/UnityDS</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
        <mapped-name>jdbc/RealmDS</mapped-name>
      </resource-ref>

However, it doesn't. How am I supposed to do this?
[Message sent by forum member 'dkkopp' (dkkopp)]

http://forums.java.net/jive/thread.jspa?messageID=269149