web stats
Use a Java singleton in Transformers - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-09-2016, 12:24 PM
lionelroux lionelroux is offline
OBX.2 Kenobi
 
Join Date: Apr 2013
Posts: 82
lionelroux is on a distinguished road
Exclamation 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
Reply With Quote
  #2  
Old 03-10-2016, 02:03 AM
sanderson sanderson is offline
OBX.1 Kenobi
 
Join Date: Dec 2015
Posts: 45
sanderson is on a distinguished road
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 09:28 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation