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

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
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
Old 01-23-2019, 08:43 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road

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

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 11:47 AM.

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