I have a scenario where i need to deploy the same war with different names (like TestA, TestB, etc.) for different clients. Each war file connect to different databases. So i am copying the same war with different names, with respective database connection properties.
Connection Properties for TestA
hibernate.connection.driver_class = com.mysql.jdbc.Driver
hibernate.connection.url = jdbc:mysql://localhost:3306/TESTADB
hibernate.connection.username = testa
hibernate.connection.password = testa
hibernate.dialect = org.hibernate.dialect.MySQLDialect
Connection Properties for TestB
开发者_运维知识库hibernate.connection.driver_class = com.mysql.jdbc.Driver
hibernate.connection.url = jdbc:mysql://localhost:3306/TESTBDB
hibernate.connection.username = testb
hibernate.connection.password = testb
hibernate.dialect = org.hibernate.dialect.MySQLDialect
But only TestA is running, other wars are not running.
I have deployed all the wars in F:/jboss-5.0.0./server/default
folder of JBOSS.
I browse the application using
http://localhost:8080/TestA
http://localhost:8080/TestB
In each war, try to configure the jboss-web.xml
<jboss-web>
<context-root>/TestA</context-root>
</jboss-web>
and
<jboss-web>
<context-root>/TestB</context-root>
</jboss-web>
This should work....
精彩评论