Trying to deploy a war file with datasources to JBoss
Mark Tobin
Ranch Hand
Joined: May 05, 2010
Posts: 37
posted
0
I am trying to deploy a war file that connects to a database to Jboss an failing miserably.
Is there any good step by step guide in setting up a datasource for a war file in Jboss.
Like tomcat you have the web.xml application-context if you are setting the datasource inside the paa and the context.xml if setting it up in tomcat.
Mkunal badgujar
Greenhorn
Joined: May 18, 2010
Posts: 5
posted
0
you have to put the configuration in oracle-ds.xml. under <datasources>
Mark Tobin
Ranch Hand
Joined: May 05, 2010
Posts: 37
posted
0
or mssql-ds.xml under C:\jboss\server\default\deploy then add my war file to C:\jboss\server\default\deploy\jboss-web.deployer.
To tell the truth I dont think its a datasource problem.
I have a war file I can deploy an run on tomcat, well I have to run it on JBoss and I am getting lots of interesting unhelpful error messages.
I have added a empty jboss-web.xml under my WEB-INF I have a application-Contect-persistent.xml set up under WEB-INF. I have another JBoss problem I am going to raise
Besides placing the *-ds.xml file for your datasource in the deploy directory, there are some settings you will need in web.xml and jboss-web.xml. Here is a post I did a while ago that lists the specifics:
http://community.jboss.org/message/251298#251298
Oh, I should mention that the instructions in the above link are is you want to use the java:comp/env context. If you don't want to use that context, then the JNDI name you use for lookup is "java:xxx" where xxx is the <jndi-name> value in *-ds.xml.