On Wed, 2017-12-06 at 14:16 +0100, Konrad Windszus wrote:
> > On 6. Dec 2017, at 14:15, Robert Munteanu <[email protected]>
> > wrote:
> > 
> > On Wed, 2017-12-06 at 14:02 +0100, Konrad Windszus wrote:
> > > > The way out would be to either:
> > > > 
> > > > 1. adjust the exported package lists for Java 8
> > > > 2. deploy new bundles only for Java 9
> > > > 
> > > > 1. is a risky proposition, especially since it can affect
> > > > backwards
> > > > compatibility
> > > > 2. requires further work in the provisioning model, and maybe a
> > > > bad
> > > > idea to invest in since the feature model is hopefully close to
> > > > complete.
> > > > 
> > > 
> > > I would propose not tweak the actual deployment but rather
> > > leverage
> > > OSGi execution environments (OSGi Core Spec 3.4). That should
> > > lead to
> > > the fact that
> > > ...
> > > A bundle can only resolve if the framework is running on a VM
> > > which
> > > implements one of the listed
> > > required execution environments.
> > > ... 
> > 
> > Does that mean we get bundles that fail to resolve by default on
> > Java
> > 8? That would not be good IMO.
> 
> Yes, exactly. 
> IMHO that should not do any harm (maybe except for some failing
> healthchecks which need to be adjusted)

I think it's a bad impression at least to have bundles that can't
resolve at startup. We have no idea what the impact will be for
consumers and it's tricky to make sure all health checks are done
right, and presumably anyone using the web console will start looking
for clues when they see bundles that don't start. We can document it,
but I am sure not that many people read the documentation :-)

What we can try - not sure if feasible - is to add a run mode named
'java9' and activate it from a special bootstrap bundle if we detect
that Java 9 is used to run Sling. Then in the provisioning model the
Java 9-specific bundles are attached to this 'java9' runmode, which
would mean:

- Java 8 is untouched
- Java 9 no longer requires adding the '--add-modules' flag

Again, note that this is completely untested but just might work.

Robert

Reply via email to