This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes HibernateService with multiple datasources Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "HibernateService with multiple datasources" Watch "HibernateService with multiple datasources" New topic

HibernateService with multiple datasources

Syed Muhammad Ali Naqvi

Joined: Feb 07, 2008
Posts: 2
Hello to All. I am using multiple datasources in my jboss-service.xml file. When I do the lookup for specific datasource (e.g java:/pcountsDS) it looks it up but overwrite it with the later one. So when my HQL is executed I get the results from second(last) datasource. It always loads the last datasource connection on the file for instance in my case it always loads java:/pcountsDS no matter what datasource I looked for.

Syed Muhammad Ali Naqvi

Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

Setting that attribute twice is just going to the value that was last set, since it's just one single property after all. What exactly are you trying to do?

[My Blog] [JavaRanch Journal]
I agree. Here's the link:
subject: HibernateService with multiple datasources
It's not a secret anymore!