2 Replies Latest reply: Sep 19, 2012 11:00 AM by 951433 RSS

    WLST and Java desktop app

    951433
      Hi

      im creating a java apllication to execute commands of the oracle service bus console like create users,im doing it with the interpreter of WLST because its more easier than call jmx beans from java pure code, i need to know if its possible import a configuration jar from my local machine to a remote server with the interpreter of WLST

      thanks

      regards!
        • 1. Re: WLST and Java desktop app
          Kalyan Pasupuleti-Oracle
          Hi,

          Try to add those jar into the classpath and check again.

          Regards,
          Kal
          • 2. Re: WLST and Java desktop app
            951433
            I added the jar to the classpath of the java app but doesnt work. im sure of im invoking the jar file of wrong way there is the code.


            String enter= "\n";
                 StringBuilder cmd = new StringBuilder();
                 
                 cmd.append("domainRuntime()"+ enter);
                 cmd.append("sessionMBean = findService(SessionManagementMBean.NAME, SessionManagementMBean.TYPE)"+enter);
                 cmd.append("sessionName = 'sessionTest'"+enter);
                 cmd.append("sessionMBean.createSession(sessionName)"+enter);
                 
                 cmd.append("alsbCore = findService(ALSBConfigurationMBean.NAME, ALSBConfigurationMBean.TYPE)"+enter);
                 
                 cmd.append("theBytes = readBinaryFile('testJar.jar')"+enter);
                 cmd.append("alsbCore.uploadJarFile(theBytes)");

            cmd.append("sessionMBean.activateSession('sessionTest', 'description for session activation')"+enter);

            interpreter.exec(cmd.toString());
            interpreter.exec("dumpStack()");


            jar file location: C:\Documents and Settings\L0604844\test_workspace\TestOsbConsole\lib\testJar.jar


            thanks!