OnDemand Users Group

Support Forums => CMOD for Multiplatforms => Topic started by: pankaj.puranik on December 21, 2011, 06:09:01 AM

Title: Is it necessary to have the EXIT programs in C?
Post by: pankaj.puranik on December 21, 2011, 06:09:01 AM
Hi

Is it necessary to have the exit program in C.
Can it not be done with java code?

Thanks
Pankaj.
Title: Re: Is it necessary to have the EXIT programs in C?
Post by: Justin Derrick on December 21, 2011, 12:07:20 PM
It might be possible, but I haven't seen any examples, and it would likely be extremely slow compared to C.  I'm not very familiar with Java, but wouldn't you need to load an instance of the JVM each time?  That would slow down your retrievals dramatically.  If there were a large number of accesses in a short period of time, you would not only slow down the server while it loads up multiple JVMs, I can imagine that it would be easy to use up all the RAM in the server very quickly.

-JD.
Title: Re: Is it necessary to have the EXIT programs in C?
Post by: Alessandro Perucchi on December 21, 2011, 02:09:37 PM
Hello Pankaj,

what I do normally is to have a basic C for the exit, then I call a shell script.
It's quite quick, and never had real performance problem.

But it depends on what you want to perform.

If you need speed, then there is no way around than C.

Java, as Justin said... is nice... but for user exit... this is overkill.
Even the CMOD Developpers have changed from Java to C/C++ for the ARSXML tool starting with CMOD 8.5.
Why? Performance problems, memory problems...

Each Programming language has its strength, and weakness. We just need to know them and use them accordingly.

Sincerely yours,
Alessandro