This content has been marked as final. Show 3 replies
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.