-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Two ore more database connectors in a single WAR
PostPosted: Wed Jul 02, 2008 3:25 am 
Newbie

Joined: Wed Apr 11, 2007 9:55 am
Posts: 2
We have a product used by two customers. One of them is using MySQL and the other is using SQL Server.

We deliver them a all included war file for each new version of our application.

At the moment we need to build 2 wars. One for each database type. The only different in both is the xml description of the database type and other connection settings. (other dataSource) . There is a dataSource bean created with Spring.

Is it possoble to create a single war what we can use on both application servers? How do we do that?

Maybe it is possible to put a database connection descriptor (XML) outside the WAR project en put them manually on the root of the application servers shared dir?

Any examples?

Thanks!

-----------------------------------------

I've found a solution by myself. You can define a xml location in the web.xml outside the framework.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 04, 2008 11:06 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
You could easily do this, and just have the appropriate dialect loaded based on a property file configuration, or heck, even a catch block!

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.