[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1088
  • Last Modified:

Configure datasource of JBOSS application server dynamically

Hi Experts,
      Iam using JBoss application server version 4.1. I have a requirement where depending upon  login credentials i need to configure datasource dynamically. Right now iam configuring datasource in a file named "projectName-ds.xml". Actually different databases means different schemas in the same database. Iam using IBM DB2 version 8.2 database server. Please help me out in this issue.

Thanks in advance,
Rave.
0
Ravi Kiran Reddy Katkuri
Asked:
Ravi Kiran Reddy Katkuri
1 Solution
 
greyfairerCommented:
JBoss can transfer web login credentials to database logins. Could you make a database login for each web user? And then assign the correct default schema to each user in the database?

Another, simpler solution, would be to duplicate your datasources, that is, have a different datasource for each schema, and depending on the user roles selecting a different datasource.
0
 
TimYatesCommented:
I would go for greyfairer's 2nd option, as it sounds like a more scalable solution

(no points for this if you go with it, I'm just expressing an opinion) :)
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now