rbeckman-nextgen / test-mc5

0 stars 0 forks source link

Support for Java transformers and filters #20

Closed rbeckman-nextgen closed 4 years ago

rbeckman-nextgen commented 4 years ago

Currently Mirth only supports JavaScript transformers. Mirth should be ammended to allow users to use Java as the language for their transformers for the following reasons:

  1. Familiar Syntax
  2. Error Checking/Exceptions
  3. Native Objects
  4. Performance
  5. Debugging capability

In the majority of Mirth cases, 90% of the "heavy-lifting" is performed in the transformer/filter, so it makes sense to allow the option for a more robust language, as well as the performance factor by running native Java code, rather than translated Rhino Javascript.

Users should be given the option to point their transformers to a pre-compiled Java class file that adheres to our interface, or specify Java code directly that we will pre-compile on the server (using sun.tools.javac.Main when the channel is deployed to the server).

Imported Issue. Original Details: Jira Issue Key: MIRTH-36 Reporter: chrisl Created: 2006-09-14T02:17:40.000-0700

rbeckman-nextgen commented 4 years ago

With the ability to run Java code from the Javascript, this is partially resolved.

  1. Syntax is 99% the same
  2. Error checking can be used (JS style) exceptions can be thrown
  3. Rhino treats Java objects as "native"
  4. JS Performance is improved by pre-compiling scripts
  5. Inability to debug JAVA from UI

With the ability to drop JARs dynamically into the Mirth custom folder, Java business logic can be included in a Jar and called from the JS with the following syntax:

Packages..className

I recommend this issue is closed.

Imported Comment. Original Details: Author: chrisl Created: 2007-01-23T21:41:52.000-0800

rbeckman-nextgen commented 4 years ago

Calling custom java code from jars in lib folder has been successfully tested (import packages). Resolving issue.

Imported Comment. Original Details: Author: chrisl Created: 2007-03-27T20:07:20.000-0700