0 Replies Latest reply: May 20, 2008 10:05 AM by 807591 RSS

    Java JMS

    807591
      Hello

      Does anyone know any good step by step guide or what ever, to set up Orion 2.0.7 working as a JMS servlet client towards Sun Application Server 9.1?

      I've already have developed a code-snippet for placing an retrieving messages from the MQ-box (remote btw), and runs smooth from commandline.
      However,,, when trying to apply the code into Orion, I get a whole world of issues.
      Tried most adapters I can think off, and everything seems to freeze when calling the InitialContextFactory for setup.

      I've tried the following:_

      MARK:removed real IP with ???.???.???.???:3700
               String useTestNr = "1";
               
               String factory = "";
               String providerURL = "";
               String pkgs = "";
               String state = "";
               
               if(useTestNr.equals("1")){  /*** STATUS = freezes up */ 
                    // TEST 1
                    factory      = "com.sun.enterprise.naming.SerialInitContextFactory";         
                    providerURL = "iiop://???.???.???.???:3700;
                    pkgs        = "com.sun.enterprise.naming";
                    state       = "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl";
               }                       
               if(useTestNr.equals("2")){     /*** STATUS =freezes on text: "INFO: sumOfAllWeights = 10" */
                    // TEST 3
                    factory      = "com.sun.appserv.naming.S1ASCtxFactory";
                    //providerURL = "iiop://???.???.???.???:3700";
                    providerURL = "corbaname:iiop:???.???.???.???:3700";
                    pkgs        = "com.sun.enterprise.naming";
                    state       = "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl";
               }
               if(useTestNr.equals("3")){  /*** STATUS = javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0] */            
                    // TEST 2
                    factory      = "com.sun.jndi.cosnaming.CNCtxFactory";
                    providerURL = "iiop://???.???.???.???:3700";
                    pkgs        = "com.sun.enterprise.naming";
                    state       = "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl";         
               }
               if(useTestNr.equals("4")){     /*** STATUS = Server protocol was not ORMI. Sun app server aint got ORMI right??*/
                    // TEST 4         
                    factory      = "com.evermind.server.rmi.RMIInitialContextFactory";
                    providerURL = "iiop://???.???.???.???:3700";
                    pkgs        = "com.sun.enterprise.naming";
                    state       = "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl";                     
               }
      
                      System.setProperty("java.naming.factory.initial", factory);                
                      System.setProperty("java.naming.factory.url.pkgs",pkgs);
                      System.setProperty("java.naming.factory.state",   state);
                                  
                      System.setProperty("org.omg.CORBA.ORBInitialHost",     mqServer);
                      System.setProperty("org.omg.CORBA.ORBInitialPort",     mqServerPort);
      
                      System.setProperty(Context.PROVIDER_URL, providerURL);
                    
                     System.out.println("--Adding System.props to IntialContext()...--");
                   
                    context = (Context) (new InitialContext());  // ALLWAYS freezes here on Orion
      {code}
      
      I've tried the:
      {code}
      Hashtable env = new Hashtable();
      en.put(......)
      ...
      ...
      context = (Context) (new InitialContext(env))
      ...
      
      ... 
      {code}
      as well, but gets the same results
      Allso tried different versions of iiop, ormi etc, but never seem to get quite "there"
      
      Please please advice,,,been struggling with this the last month
      
      Cincerely Paul