-
1. Re: DataSource Problem JBoss/Tomcat Only Configuration
peterj Sep 4, 2007 4:56 PM (in response to kdolan1)It looks like deployment of *-ds.xml files is handled by org.jboss.deployment.EARDeployer, which implies to me that you need for EAR functionality to be able to deploy *-ds.xml files.
-
2. Re: DataSource Problem JBoss/Tomcat Only Configuration
kdolan1 Sep 5, 2007 4:44 PM (in response to kdolan1)Ok - so if that is correct (which I think today I proved), I cannot use the -dx.xml file to resolve my JNDI/JDBC connection pool because I can only use the Tomcat only configuration of JBoss.
If I do not put the -dx.xml file in my deploy folder, JBoss starts but when my application runs I get a "NameNotFoundException" which references "TestWarDB".
For reference...
my web.xml contains:
<resource-ref>
TestDataSource
<res-ref-name>jdbc/TestDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
my jboss-web.xml contains:
<resource-ref>
<res-ref-name>jdbc/TestDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<jndi-name>java:/TestWarDB</jndi-name>
</resource-ref>
So how do I tell JBoss/Tomcat how to resolve java:/TestWarDB?
I have tried configuring Tomcat (the version deployed within JBoss) according to Tomcat's documentation but I have had no luck in getting anything to work. If JBoss has a Tomcat Only installation configuration, I cannot possible think this would not support interaction with a database.
Kelly -
3. Re: DataSource Problem JBoss/Tomcat Only Configuration
kdolan1 Sep 6, 2007 2:56 PM (in response to kdolan1)I still could figure out how to configure Tomcat in JBoss to recognize my database. So, I compared what components the JEMS installer installs for the "tomcat" option vs. the "default" option. I noticed a component named "jboss-ds". So, I tried using the JEMS installer to install JBoss.
1. I chose the "default" option.
2. I de-selected (unchecked) every component that is not installed with the "tomcat" option.
3. I re-selected the jboss-ds component (and the ones on which it is dependent - jboss-ha-local-jdbc, jboss-ha-xa-jdbc, jboss-local-jdbc, jboss-xa-jdbc, jca-service, jdbc-metadata-service)
This worked! I was able to deploy my .war file and my -ds.xml file.
Also, I looked at both the disk space and memory footprint of adding these components and they are negligible (vs. running the entire "default" option). Now I need to confirm I am allowed to install these components.
Kelly