users@glassfish.java.net

Re: Mapped JDBC name?

From: <glassfish_at_javadesktop.org>
Date: Tue, 15 Apr 2008 02:10:06 PDT

Supposing, you have in ejb-jar.xml,

      <resource-ref>
        <res-ref-name>jdbc/UnityDS</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Shareable</res-sharing-scope>
      </resource-ref>

in the sun-ejb-jar.xml, you would have specified :

      <resource-ref>
        <res-ref-name>jdbc/UnityDS</res-ref-name>
        <jndi-name>jdbc/RealmDS</jndi-name>
        <default-resource-principal>
            <name>someuser</name>
            <password>somepassword</password>
        </default-resource-principal>
      </resource-ref>

The above would do the mapping of your "jdbc/RealmDS" to "jdbc/UnityDS".

Hope this helps,
Shalini.
[Message sent by forum member 'sm157516' (sm157516)]

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