Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trying to deploy a war file with datasources to JBoss

 
Mark Tobin
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you have to put the configuration in oracle-ds.xml. under <datasources>

 
Mark Tobin
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Campbell Ritchie
Sheriff
Posts: 48445
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Mkunal badgujar
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mark Tobin
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peter will give that a try.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic