0

I have a exe executable application processing some transaction logic. I have another java client which can send jms messages to ESB. Message content is passed from exe to java client through argument parameters.Every transaction will have to send jms messages.

So, on every transaction, need to load JVM again and again.Create JMS connection, sessions, etc.

How can i reuse the previous JVM, so i'll be able to re-use jms connection, session,etc. Specially to avoid loading and unloading of java memory on each transaction?

Chand Priyankara
  • 6,739
  • 2
  • 40
  • 63

2 Answers2

1

I think you want to create a Java server that is persistent, and have your executable pass the relevant data via some sort of remote procedure call to Java, and have it do the work in a persistent way.

Trent Gray-Donald
  • 2,286
  • 14
  • 17
  • 1
    I think you're going to have to measure a couple of options on your box. Each technique has costs that will vary depending on the parameter types. Any which way, doing this RPC will be much faster than your previous way, but perhaps that's not enough. – Trent Gray-Donald Jul 27 '12 at 04:02
1

Seems you have to use a hosted java app, means something like a servlet/RMI application. So you can re-use resources from there over the network. Here you can re-use JVM resources on hosted app, but network resources are re-created. Think of what is best for you.