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

uniform resource loading on servlet container #1865

Closed
mkristian opened this issue Jul 28, 2014 · 2 comments
Closed

uniform resource loading on servlet container #1865

mkristian opened this issue Jul 28, 2014 · 2 comments
Milestone

Comments

@mkristian
Copy link
Member

currently there are loading issue with that special servlet container or with this special servlet container. but I step back then ALL them have well defined way to load resource.

Thread.currentThread.getContextClassLoader.getResource

once this is supported by JRuby and it works for 5 different servlet containers it should work for the 6 one as well. and it should be no difference whether the classloader works on unexploded and packed war file or whether the container unpacks it somewhere.

it needs a slightly different packing as warbler does right now: embed everything into WEB-INF/classes since that is the root of the classloader.

since JRuby already has it's own pseudo protocol (i.e. it is not a registered protocol inside the JVM): classpath
now you only need to add classpath: to ruby LOAD_PATH and to the Gem.paths.path (or use GEM_PATH env) and probably some ruby frameworks need to have the current working directory set to classpath: as well.

having this in place other self contained java archives will probably work as well. some plugin frameworks might require to the classloader which contains JRuby itself instead of the currentThread contextClassloader.

@kares
Copy link
Member

kares commented May 23, 2017

@mkristian sounds like you did all of this ... or is it still a task pending?

@kares kares added this to the Non-Release milestone May 23, 2017
@mkristian
Copy link
Member Author

@kares no pending tasks unless classloader errors pop up somewhere ;)
closing

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

2 participants