Implement Java Class using EPL

Hi all, I want to know if anyone can give me a hand with this issue. I have a Java class which has a method for sending mails and I want to call this method using EPL (Monitor or block).

Does anyone know how to do it?

Thanks in advanced,

Marcelo

As far as I know you cannot invoke a java class directly from EPL code. Java VM and EPL VM are separate even though they share the same correlator engine. That being said, it should be possible to send an email from a Java class by triggering an event (emit/enqueue etc) from EPL code, such that the event is subscribed by a corresponding java listener.

Hi Marcelo,

The easiest way to do this may be to create a Java plug-in to wrap your existing Java class. Java plug-ins were introduced to Apama in the 5.1 release and work in a very similar way to the C/C++ plug-ins that the correlator has always supported. Once your code is available through a plug-in, it can be invoked from an EPL monitor, and of course that EPL could be further wrapped in a block if you wanted to use it from an Event Modeler scenario.

See the product documentation and samples shipped with Apama 5.1 and above for more details.

Best regards,

Scott