OnDemand User Group

Tips and Tricks => Tips and Tricks => Topic started by: pankaj.puranik on August 21, 2012, 03:56:59 AM

Title: Calling a java program during indexing.
Post by: pankaj.puranik on August 21, 2012, 03:56:59 AM
If you do not have C coding skills, you might accomplish the similar of an ACIF indexer user exit (which is writent in C) by calling a java code.
This could be done by specifying the commend (java ClassName) in the 'Postprocessor Parameters' in the Load Information tab in Application. The java class should be placed in a directory that CMOD can access.
Title: Re: Calling a java program during indexing.
Post by: Justin Derrick on August 21, 2012, 09:28:56 AM
I can't imagine that this would perform terribly well.  What's the reason for calling Java?  What functionality are you trying to achieve that can't be done in C?
Title: Re: Calling a java program during indexing.
Post by: Alessandro Perucchi on August 22, 2012, 01:03:16 AM
If you do not have C coding skills, you might accomplish the similar of an ACIF indexer user exit (which is writent in C) by calling a java code.
This could be done by specifying the commend (java ClassName) in the 'Postprocessor Parameters' in the Load Information tab in Application. The java class should be placed in a directory that CMOD can access.

Hello Pankaj,

You can use that method to use any languages, from Perl, Python, Java, C, C++, Java, etc... you name it.

Now I'm not sure Java is the best option, since to run it it takes a lot of memory and need a long initialization time, then it can be as fast as C.
So running Java every time you do an indexer, it might be ok or not depending on how much documents you need to index at the same time.

As always, the person to implement sur hybrid solution, one must test and especially check if the speed impact is relevant or not.

Sincerely yours,
Alessandro
Title: Re: Calling a java program during indexing.
Post by: pankaj.puranik on August 23, 2012, 05:17:48 AM
JD, we have scenarios here where we do not have C Programmers.
Only in such case should someone use Java.

No doubt C would perform much much better than java.
Title: Re: Calling a java program during indexing.
Post by: Lars Bencze on August 15, 2016, 12:11:45 AM
Pankaj, do you have an example of a working Postprocessor command which you can include here?
Do you just type (for example) C:\myjavaappfolder\myjavaapp.jar in the field, and that's it?