[
https://issues.jboss.org/browse/SHRINKWRAP-242?page=com.atlassian.jira.pl...
]
Andrew Rubinger commented on SHRINKWRAP-242:
--------------------------------------------
With regards to the timing:
It'd be a mutable "reinitialization/configuration". ServiceExtensionLoader
in impl-base has a cache of mappings which we could clear, and set an explicit CL (instead
of the now-hardcoded TCCL). So subsequent calls using the default Domain would be
rerouted to use the configured CL, and this would apply to all static calls. In other
words, it'd be reconfiguring the default Domain (which is shared by the static access
entry points).
That avoids the need for a Service Registry.
Keep in mind that for things like getting the ExecutorService used in exporting to
streams, we already support a Configurtion-per-Archive. So we *could* tack onto the
config a CL there too, but users wouldn't be able to use that for static access (which
is tied to the default Domain). They'd have to take the more manual step of:
JavaArchive archive =
ShrinkWrap.createDomain(ConfigurationBuilder).getArchiveFactory().create(JavaArchive.class)
...where they define in the ConfigurationBuilder the CL to use. That's fine for
services where we do something like populate a known Domain in MSC and have users inject
it:
@Inject
Domain domain;
domain.getArchiveFactory().create(JavaArchive.class)
...but not for the most simple API hook.
Outstanding question: Does your Service Base approach render the static usage useless?
How exactly would that work, or do you like the proposal above?
Get shrinkwrap to work from inside and OSGi framework
-----------------------------------------------------
Key: SHRINKWRAP-242
URL:
https://issues.jboss.org/browse/SHRINKWRAP-242
Project: ShrinkWrap
Issue Type: Task
Affects Versions: 1.0.0-alpha-11
Reporter: David Bosschaert
Assignee: David Bosschaert
Priority: Critical
Fix For: 1.0.0-beta-1
Currently there are issues around the use of Shrinkwrap in an OSGi framework. The
libraries don't contain the necessary Manifest headers and just adding them causes
classloading problems as the TCCL is used during the boot process.
Shrinkwrap should be usable from within OSGi.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira