-->
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.  [ 1 post ] 
Author Message
 Post subject: DataSouce based on ContextPath
PostPosted: Tue Mar 09, 2010 10:30 pm 
Newbie

Joined: Tue Mar 09, 2010 10:16 pm
Posts: 1
Hi,

I need to select the datasource based on from which contextpath the request is coming in.

We have 2 identical DBs for 2 different web-apps both running in parallel. We are using Jboss/Hibernate/MySql.

If i need to make changes at the MySQL level, then i'll have to make changes in mysql-ds.xml.

If i need to make changes at the Hibernate level, then i'll have to make changes in Hibernate-cfg.xml

I am not sure which approach to take and what changes i need to make. Please help.

Is there a way, i can get the contextpath randomly at some point in my code(not extending servlet). If this is possible, then i can make minor changes in the code and ignore the above two approaches.

Thanks.


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

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.