I want to use 3 JNDI Datasources for DEV , QA and PROD in weblogic server. Whether I can create 3 JNDI Datasource connection pool in weblogic server?
So that i can use the respective JNDI name in my java application to connect to "DEV" , "QA" & "PROD" without disturbing the weblogic server?
Create three different DS and give three JNDI name with different name.
If you think that you cannot give three different JNDI name with in code then try to create simple Multi datasource and target those three DS and then use single JNDI name with in code.
Thanks, Whether we will use a single JNDI with Multidatasource(devDS,qaDS,prodDS) for dev, qa & prod in java code?
If so now I want to load the devDS and not qaDS and prodDS in such case using a single JNDI will create a problem right?
Ideally, you want your application artifact to specify a single datasource that doesn't specify an environment name. Your WebLogic instance is defined to reside within a specific environment, like DEV, QA, or PROD. The environment variability should be in WebLogic, not your application.
In other words, you should be defining a single datasource in your application, and a single datasource in WebLogic. What that datasource points to in WebLogic depends on what environment that WebLogic instance resides in. If it's a development instance, the datasource will point to the DEV database. If QA, it will point to the QA database, and if PROD, it will point to the PROD database.