Announcement

Collapse
No announcement yet.

Use a Java singleton in Transformers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Use a Java singleton in Transformers

    Hello,

    I try to use a JAVA singleton I imported using rhino syntax.
    But When I invoke the getInstance() on my class, I get an error like "it's not a function, it's an object".

    Here is the syntax :

    Code:
    var PGPHelper = Packages.fr.chhyeres.crypto.util.PGPHelper;
    ....
    var ph = PGPHelper.getInstance();
    ph.encrypt(...);
    Of course, getInstance and encrypt methods are static.

    any tips ?

    thks

  • #2
    I had a problem like this while trying to use some commons classes that previously worked perfectly well.

    I assume it was something to do with the version of Mirth I was using and did the transform another way.

    I was using the commons DateUtils class to parse a date from a supplied list of date string formats. Works in 3.x does not seem to in 2.x.

    I reverted to the good 'ol substring methods to get it done.

    Comment

    Working...
    X