I have a problem on how to get an instance URL within a cluster with weblogic.
Description:
We have 2 domains: X and Y.
In each domain I have 2 clusters: c01 and c02
In each cluster I have instances: s01,s02,s03,s04
In each instances I have our system which contains of several components, let’s call the components A,B,C and D. I want to make a REST call from A to D which are still in the same instance. How will we get the URL and port to this REST service programmatically?
The problem is that I am just getting the cluster URL when calling InetAddress or alike. I have also played around with MBean, but we are not sure it’s correct way to go since I wont have any user/pass to fill in for Enviroment object when creating the context.
We don’t want this as a build property since we don’t want to do builds for each different instance.
Env:
SpringIntegration
Weblogic 10.3.3
Jersey
Maven
Thanks
Solution:
Got it from an RuntimeServiceMBean: