Folks,
I've been trying to configure a cluster with two managed servers and an admin server for a domain name clmydomain. I've successfully created the cluster and can run and stop both managed servers. Below is my configuration information:
admin server address: localhost
port: 7001
cluster name: my_cluster_1
cluster address: localhost
multicast port : 7020
multicast address: 237.0.0.1
my_managed_server_1 (first managed server) port: 7005
address: localhost
my_managed_server_2 (second managed server) port: 7010
address: localhost
I've app.jar file that includes EJBs with a session bean acting as session facade. I then use a servicelocator class to get a handle to sessiona facade object using following code:
env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "weblogic");
env.put(Context.SECURITY_CREDENTIALS, "weblogic");
env.put(Context.PROVIDER_URL, "t3://localhost:7001");
I'm successfully able to deploy and
test the JNDI names for the underlying datasource and all the EJBs plus session facade on managed servers.
If I deploy app.jar only to cluster (both managed servers) then I cannot succussfully get a handle to session facade and get the NameNotFoundException. If I changed the port number to 7005 in the above code (
t3://localhost:7005) and my managed server 1 is running (on port 7005 obviously) then I'm able to get the session object and the data fetched from datasource successfully. If shut down managed server 1 and start managed server 2 then again I get the NameNotFoundException.
In order to get the
t3://localhost:7001 part of the code to work, I have to deploy app.jar on admin server as well as the cluster but my understanding is that I don't have to deploy the app.jar to admin server itself.
I can start a managed server successfully using the startManagedServer.bat using the
http://localhost:7001 url (while the admin server is running).
What am I doing wrong? Am I missing some sort of configuration somewhere that I cannot specify 7001 port in the url without deploying app.jar on admin server? I'd greatly appreciate any help. Thanks.