I have a session bean which needs to access the DataSource directly.
I have defined the datasource as OracleDB in the jboss.jcml and also
specified OracleDB as the datasource in jboss.xml .
When the jboss starts it binds this datasource to Java:/OracleDB.
In my session bean I do a jndi lookup for "java:/OracleDB" and get the
datasource.
So thats that, every thing works. 
I dont have to even specify any <resource-ref> elements in ejb-jar.xml

BUT

when I make a <resource-ref> entry in the ejb-jar.xml for the session bean
like this

<session>
        <resource-ref>
                <res-ref-name>OracleDB</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <res-auth>Container</res-auth>
        </resource-ref>
                :
                :
</session>

and try to a jndi lookup for the datasource in the bean with
"java:comp/env/OracleDB"
instead of getting the OracleDB datasource (or throwing an exception) it
gives me the DefaultDS.

Am I making a mistake or missing something ?

Thanks

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to