web stats
Passing Objects within Channel (not serialized) - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 01-22-2019, 01:30 PM
flberg flberg is offline
What's HL7?
 
Join Date: Jan 2019
Posts: 1
flberg is on a distinguished road
Default Passing Objects within Channel (not serialized)

I'm using a custom class (.jar') to handle mongoDB database access.

I'd like to avoid instantiating my conn-object over and over again. Basically everytime the Mirth-channel processes.

Is there a way to instantiate an object, let's say in deployment script of channel and then use that object in "destination javascript writer"?

Any other ideas how to solve this scenario?
Reply With Quote
  #2  
Old 01-23-2019, 08:43 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,116
narupley is on a distinguished road
Default

Yes, you can use the global channel map for that. In the channel deploy script, call "globalChannelMap.put(key, value);".
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
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 10:05 PM.


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