Configure datasource of JBOSS application server dynamically

Posted on 2007-07-20
Last Modified: 2013-12-02
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,
    LVL 4

    Accepted Solution

    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.
    LVL 35

    Expert Comment

    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) :)

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    -Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
    This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now