My code is:
try {
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, CONTEXT_FACTORY);
env.put(Context.PROVIDER_URL, this._url);
InitialContext ctx = new InitialContext(env);
// get MBeanServer
MBeanServerConnection mbs = (MBeanServerConnection)
ctx.lookup("jmx/invoker/RMIAdaptor");
mbs.lookup(.....)
} catch (Exception e) {
}
It is running on localhost jboss server, it is used to connect to a remote jboss server.
The problem is:
If the remote jboss server is running, it is ok.
But if the remote server is down, it will get the local default context and then lookup in
this context.
What I want is that if the remote server is down, it should go into the exception.
How to do it?
Or how to change the config in jboss and let it not to get the default context for my
program if the remote server is down.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986840#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...