3 Replies Latest reply on Feb 24, 2015 2:29 AM by swiderski.maciej

    The .dispose(..) method is not supported on the remote api.

    ku.ananthi

      I am using JBPM6.0.1 RemoteRuntimeEngine to access the business central console. When trying to invoke dispose method of KieSession, I am getting UnsupportedOperationException.

       

      RemoteRestRuntimeEngineFactory remoteRestRuntimeEngineFactory =

                      RemoteRestRuntimeEngineFactory.newBuilder()

                      .addDeploymentId("my.test:TestProj:1.0")

                      .addUrl(new URL("http://localhost:8080/business-central"))

                      .addUserName("bpmsAdmin")

                      .addPassword("test@123")

                      .addTimeout(10000)

                      .build();

      RemoteRuntimeEngine engine = remoteRestRuntimeEngineFactory.newRuntimeEngine();

      KieSession ksession = engine.getKieSession();   

      ksession.dispose();

       

      Exception in thread "main" java.lang.UnsupportedOperationException: The .dispose(..) method is not supported on the remote api.

        at org.kie.services.client.api.command.AbstractRemoteCommandObject.execute(AbstractRemoteCommandObject.java:103)

        at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.dispose(CommandBasedStatefulKnowledgeSession.java:250)

        at ProcessConsoleTest.main(ProcessConsoleTest.java:29)

       

      What is the alternative method to dispose the created KieSessions.