Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading external jar #20

Open
redeemefy opened this issue Mar 19, 2020 · 0 comments
Open

Loading external jar #20

redeemefy opened this issue Mar 19, 2020 · 0 comments

Comments

@redeemefy
Copy link

I have an external library that is living in custom_lib/library.jar. In order to load the library, I created a step in the source tab to load it and store it in globalChannelMap('lib').

var su = globalChannelMap.get('su');

try {
  if(su === null) {
    globalChannelMap.put('su', com.domain.package.Utils(channelName));
    su = globalChannelMap.get('su');
    var libInfo =com.domain.package.LibraryInfo();
    logger.info(":::: LOADING LIB :::: " + libInfo.getVersion() + " " + channelName);		
  }
} catch (error) {
  logger.error(channelName + " :::: PACKAGE UTILS :::: " + " Something went wrong loading library " + error);
}

I have no issues utilizing the library on any step on the source, however, when I start working on destinations I need to globalChannelMap.get('su') per destination.

My understanding of globalChannelMap() is that the variable is available global to the channel and across all messages.

How I can load a jar once to be accessible to source and destinations for every msg?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant