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

Plugin loader of Java plugins #28

Closed
frsyuki opened this issue Jan 29, 2015 · 3 comments
Closed

Plugin loader of Java plugins #28

frsyuki opened this issue Jan 29, 2015 · 3 comments
Assignees

Comments

@frsyuki
Copy link
Contributor

frsyuki commented Jan 29, 2015

Embulk can't load java-based plugins (jar files) dynamically. Users need to add the jar files to classpath. Inconvenient...

@frsyuki
Copy link
Contributor Author

frsyuki commented Jan 29, 2015

An idea of the API design:

  • a) Java-based plugins include jar files at classpath/* directory
  • b) Even java-based plugins include lib/embulk/input_xyz.rb (or output_xyz.rb) file. Its code is as like this:
loader = Embulk::JavaPluginClassLoader.new(File.dirname(__FILE__)+"../../../classpath")
Plugin.register_output("csv", loader.get("org.embulk.output.CsvOutput.class"))

PluginClassLoader loads a class if it's found at the parent class loader. Otherwise, it loads the class from itself. This is how JRubyClassLoader works to not cause phantom definition. (In other words, we might be able to use JRubyClassLoader).

@frsyuki
Copy link
Contributor Author

frsyuki commented Feb 6, 2015

#56 implemented java plugin loader.

@frsyuki frsyuki closed this as completed Feb 6, 2015
@frsyuki frsyuki self-assigned this Feb 7, 2015
@muga
Copy link
Contributor

muga commented Feb 7, 2015

Great Job! I wanted the feature!

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

No branches or pull requests

2 participants