Published on InterSystems Developer Community (https://community.intersystems.com)

Home > How to share resources among Csp Process?

Question
alex chang · Sep 14, 2020

How to share resources among Csp Process?

I want to call some Java Remote Call through Java gateway.  The call code as following:

class CallRemote Extends %CSP.REST {

Method Index() as %Status {

Try

      set gw = createJavaGateway()

     Do callJavaMethod(gw)

     do gw.%Disconnect()

Catch {

}

}

}

But Every call need connect to Java Gateway and disconnect it. But It's cost too high( about 80ms)

So, According to my Java experences, I need create some connection and put it into global static ConnectionPool

But I don't known how to reach that using ensemble.

#ObjectScript #Ensemble

Source URL:https://community.intersystems.com/post/how-share-resources-among-csp-process