Reuse existing connection to realm

Please forgive me this been asked before. I’ve checked but couldn’t find it. I’m interested to know if best practice to persist the session connection object in memory (startup service for the package). I thought this would be an ideal way to avoid having multiple flow services issuing a new connection to do whatever relating to UM. The flow service could check whether the session connection object exist and if it doesn’t then issue a new connection. Or is it more harm than good. I’m assuming every time you issue a new connection, it creates a new thread. Does the nirvana package API provide an easier method for this purpose or you would have to do that logic.

When it comes to Connections it is best to hold them open as long as possible as they can be expensive to create.

I would suggest asking this question in the “Flow and Java Services” forum as they will be able to answer best practices for flow services.

You can check the connection objects using services under wMRoot → wm.server.jms

Ex: wm.server.jms:getConnectionAliasReport can report error if the ConnectionAlias does not exist

Nanthini,

That apply to JMS connection and not UM connection.