1 Reply Latest reply on May 4, 2004 8:29 AM by Janardhan Burugupalli

    Local and Remote Invocation types differentiation

    Janardhan Burugupalli Newbie

      Hi All,

      I have a problem with differentialting Local and Remote invocation types.

      First i use a Initial context with some properties specified which means that all calls are not from the same VM but form others. Well thats fine if i am right. as shown below (i use only HttpInvokers and the URl is correct dont worry)

      Properties tProperties = new Properties();
      tProperties.setProperty("java.naming.factory.initial", ""org.jboss.naming.HttpNamingContextFactory"");
      tProperties.setProperty("java.naming.provider.url", tURL);
      iContext = new InitialContext(tProperties );
      iContext.lookup(tJNDIName);
      


      But if i use initialContext() with out parameters it should treat it as an intra VM call and the Invocation type should be Local or LocalHOME as per definition..the code is as below
      iContext = new InitialContext();
      iContext.lookup(tJNDIName);
      

      So to my surprise i find both calls as remote calls one is saying InvocationType.HOME and InvocationType.REMOTE.

      Am i correct in my assumtion if yes, then i gave some debug statements in the org.jboss.ejb.plugins.SecurityInterceptor and found that both are remote calls. How can change this or get the information. As of now my debug stmts are as below
       System.out.println("###########InvocationType invokeHome:" + mi.getType());
       System.out.println("###########Invoker :" + mi.getValue(InvocationKey.TYPE));
      


      Dont mind that i am inspecting your code but my problemns are like that. I want to know how to differentiate these two calls. Please help me and also see my other post regarding setting the property
      org.jboss.security.SecurityAssociation.ThreadLocal
      in the SecurityAssociation because it determines the propagation of information to other threads or specific to a single thread.

      i am really deep in troubles.

      regards
      jani