This content has been marked as final. Show 1 reply
1. Once you have Totally 2 Different Domains, remember that they are Totally 2 Different Worlds. Means, yes you can have all the resources like DataSources, EJBs, Apps etc etc with the SAME names deployed to these 2 domains. Remember that, if these 2 domains are on the same machine, one basic and minimum requirement is all the servers in both these domains should have UNIQUE ports. Lets say if you have 2 Domains with just 1 AdminServer each, then the ports may be like this:
Domain1 -> AdminServer:7001
Domain2 -> AdminServer: 5001 (Anything other then 7001).
But if these 2 domains are on different machines, then they can have same port numbers also.
2. Coming to your question, you have 2 ways to create/deploy DataSources. One is open Weblogic Admin Console, using like http://adminhost:adminport/console and from here create a DataSource giving all the details. Repeat the same for other domain also using that console.
3. If you want to do in Single shot, write a Simple WLST Script. In this script very first thing is you need to give admin server host, port and credentials. Just run this 2 times, giving domains details.
One basic thing you need to remember. When you access these DataSources, all you need is get InitialContext giving admin server host, port. Then do JNDI Lookup for that DataSource name. So the admin server host, port makes the difference.
I hope this is what you were looking for. If not, please elaborate your question/requirements.
For WLST, you can google around and find lots of fully working examples. Heres one of them. Its an old post, but the concepts should be the same.