-
1. Re: db2 datasource problem: cannot find table
kenci Jun 16, 2003 8:34 AM (in response to xyw3)Dont no much about DB2 but these setting should be the same
The <res-ref-name> is the name as referenced in your java code e.g in Java Code "java:comp/env/jdbc/[name]"
in ejb-jar.xml: <res-ref-name>jdbc/[name]</res-ref-name>
<resource-ref>
<res-ref-name>jdbc/[name]</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
In the jboss.xml you need to match the <res-ref-name> in this file to the one in the ejb-jar.xml so this should be: <res-ref-name>jdbc/[name]</res-ref-name>.
I di not use r<resource-name> instead I had <jndi-name> which should start java:/[name]
<jndi-name>java:/[name]</jndi-name>
and what for the following in jboss.xml:
<resource-ref>
<res-ref-name>jdbc/[name]</res-ref-name><resource-name>???</resource-name>
</resource-ref>
The resource Managers can be the same as above for both res-name and res-jndi-name same as res-ref-name and res-jndi-name same as jndi-name above
<resource-managers>
<resource-manager>
<res-name>jdbc/[name]</</res-name>
<res-jndi-name>java:/[name]</</res-jndi-name>
</resource-manager>
</resource-managers>
What should the above areas correspond to those in the db2-service.xml file?
Thanks for any help.
The <res-jndi-name>should correspond to the jndi-name or eqivalent in db2- service.xml minus the java:/
so the jndi name element in the xml should just be [name] and jboss should handle the rest..
This worked for me after playing around with the setting in jboss. I just got this working recently so cant say more than this for now.
k