Link to home
Start Free TrialLog in
Avatar of gagaliya
gagaliya

asked on

environment getInitialContext() stuck

Hi, i have some java code that try to get intiialcontext to a weblogic server. it works fine, until the weblogic server status became FAILED. Then the code would just stuck at that line, NOT going into exception or anything.  Cant figure out what is going on, can someone provide a few pointers, thanks.

Environment env = new Environment();
        env.setProviderUrl(_url);
        env.setSecurityPrincipal(_user);
        env.setSecurityCredentials(_password);
        try {
          //WHEN WEBLOGIC SERVER STATE BECAME FAILED, IT STUCKS AT THIS LINE
          //CONFIRMED BY STEP THRU VIA DEBUG
           ctx = env.getInitialContext(); <---STUCKS AT THIS LINE
           home = (MBeanHome) ctx.lookup(MBeanHome.LOCAL_JNDI_NAME);
        } catch (AuthenticationException e)
       {
      etc....
Avatar of gagaliya
gagaliya

ASKER

I want it to go into exceptions,so the program can continue executing.  To confirm again the program does not exit or throw any exceptions/error, it just stuck in run mode at this line.
ASKER CERTIFIED SOLUTION
Avatar of mrcoffee365
mrcoffee365
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks