Ran into related issues under AMDATU-486 but due to time constraints not gonna commit it yet. Some mental notes on the solution:

1) In the current situation each (JSP)ResouceProvider service registration translates into one JasperClassLoader with direct references to all embedded jars on both the provider's and the jspsupport's bundle classpath and the bundle's classloader as parent. This is done because the JSP compiler must be able to load classes and resources from both bundles. Eg c.tdl is in the jspsupport bundle while a custom definition may be in the provider's bundle.

  • All classloaders share the jspprovider's jars. This can be optimized be sticking a shared jspprovider classloader in between.
  • Also ResouceProvider service registrations originating from the same bundle should be able to share the provider's classlaoder.

2) The JasperClassLoader only adds jars from the bundles listed on the OSGi Bundle-Classpath manifest header. This means thing will break when dependent libraries are inlined. Also it is awkward to require them on the Bundle-Classpath when actually laoding them directly from the JasperClassLoader. We could consider introducing a way (serv reg prop?) to declaratively add jars without having this dependency. This woud potentially make the classloader service (as in not bundle) specific... so lees sharing.

  • The resource/classloading is an awkard mix between OSGi bundle classloders and URL classlaoders that laod directly from the emebedded jars. Either consistenly depend on the OSGi method. Or introduce a decoupled strategy.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
Amdatu-developers mailing list
[email protected]
http://lists.amdatu.org/mailman/listinfo/amdatu-developers

Reply via email to