|
Here is a sample jboss-web.xml I have
<?xml
version="1.0"?> <jboss-web>
<ejb-ref>
<ejb-ref-name>ejb/CompanyReg</ejb-ref-name>
<jndi-name>CompanyReg</jndi-name>
</ejb-ref>
<resource-ref>
<res-ref-name>jdbc/SOMEDS</res-ref-name>
<jndi-name>java:/SOMEDS</jndi-name>
</resource-ref> </jboss-web>
where SOMEDS is a valid datasource in jboss.jcml.
The Servlets/JSPs and their helper classes can access the datasource at
java:comp/env/jdbc/SOMEDS.
Also, you can find the dtd for jboss-web.xml at
sourceforge. Hope this helps.
Cheers
Vinay
----- Original Message -----
Sent: Tuesday, June 05, 2001 12:52
PM
Subject: Re: [JBoss-user] jdbc jndi
question
Thanks, is that the jboss.xml or the
jboss-web.xml (can't find it anywhere). Do you have an example so i can get a
grip of the syntax.
Maarten
----- Original Message -----
Sent: Tuesday, June 05, 2001 12:43
PM
Subject: Re: [JBoss-user] jdbc jndi
question
in order to use a datasource specified in the
jboss.jcml in the embedded tomcat you will need to add a resoruce reference
in a jboss-web.xml file for the web application. The datasource will
then be accessible under java:comp/env.
Vinay
----- Original Message -----
Sent: Tuesday, June 05, 2001 10:53
AM
Subject: [JBoss-user] jdbc jndi
question
Hi,
I'm working on a small application which uses
MySQL as the database. In my entitybean i have a class getConnection which
is used for the database connection. If i want to use jndi do i have to
insert the connection in jboss.jcml as wel in Tomcat's server.xml? Do i
have to insert the connection in de deployment decriptor?IF so can someone
send me the tags to use for the driver and url?
Should i use jndi in the EJB getConnection()
method?
Thanks,
Maarten
|