danch (Dan Christopherson) wrote:

> Paul Ryan wrote:
> 
>> Hi,
>> 
>> We would like to test our J2EE app. on a JBoss-Tomcat platform. We 
>> have a mixture of servlets and EJB's and I have used the deployment 
>> tool to generate a jboss.xml file. When this is packaged in our ear 
>> file the deployment seems to go ok and I can see the file being 
>> exploded and the web context being created.
>> 
>> My problem is that I can't seem to access a database connection pool 
>> from within the first servlet. We are using an Oracle 8i database 
>> with a thin ( type 4) driver.
>> 
> 
> Assuming that you have jboss.jcml set up for the datasource, you'll 
> need a 'jboss-web.xml' (in your war's META-INF directory) with 
> something like this in it.
> 
> <jboss-web>
>   <resource-ref>
>     <res-ref-name>jdbc/mcs_general</res-ref-name>
>     <res-type>javax.sql.DataSource</res-type>
>     <jndi-name>java:/MyOracleDataSource</jndi-name>
>   </resource-ref>
> </jboss-web>
> 
> Where MyOracleDataSource is whatever name you used for your Oracle 
> connection pool in jboss.jcml. You may (will unless you're using 
> DefaultDS) also need to do something similar in a jboss.xml for your 
> beans - that's a little more complicated (you need both a resource-ref 
> in your bean's section and a resource-manager in a resource-managers 
> section), but better documented in jboss.dtd and in the list archives 
> (go through the archive links at jboss.org, not sourceforge)
> 
> -danch
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 
Thanks,

Paul.


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

Reply via email to