You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Richard Zowalla <rz...@apache.org> on 2022/05/12 07:02:46 UTC

TomEE 9.x - jakarta.enterpise.inject.spi.Extension VS javax.enterpise.inject.spi.Extension

Hi all,

while working on fixing the Deltaspike examples on EE9 / master
I encountered some 

Currently, TomEE 9.x only scans for "META-
INF/services/jakarta.enterprise.inject.spi.Extension". 

This breaks, if 3rd party artifacts do not correctly relocate their
"META-INF/services" files and still deliver
"javax.enterprise.inject.spi.Extension". While we can fix that via PRs
in OSS projects, it might be a problem in the wild.

I wonder, if we should compensate this for our users, i.e.

- Additionally scan for "javax.enterprise.inject.spi.Extension"
- If we find something, log a warning/info that this is not really
expected (?) and load the extension instead of failing with an
unsatisfied dependency error later.

Note, that we also rewrite javax to jakarta in XML files on the fly, so
it would probably be consistent to also scan for javax.enterprise.injec
t.spi.Extension" but I would like to hear some opinions on it.

Gruß
Richard


Re: TomEE 9.x - jakarta.enterpise.inject.spi.Extension VS javax.enterpise.inject.spi.Extension

Posted by "Zowalla, Richard" <ri...@hs-heilbronn.de>.
Thanks for your view, David.

I created TOMEE-3968 to track this change/feature. 

Notice to the community: It might be a beginner friendly task to work
on if someone has some available cycles - as I debugged it for
Deltaspike my memory is quite fresh and I can give some pointers were
to look at ;)

Gruß
Richard

Am Freitag, dem 13.05.2022 um 21:45 -0700 schrieb David Blevins:
> > On May 12, 2022, at 12:02 AM, Richard Zowalla <rz...@apache.org>
> > wrote:
> > 
> > - Additionally scan for "javax.enterprise.inject.spi.Extension"
> > - If we find something, log a warning/info that this is not really
> > expected (?) and load the extension instead of failing with an
> > unsatisfied dependency error later.
> 
> I'd support that.  More than likely those extensions will refer to
> javax.enterprise packages and fail, but that might be better than
> silently skipping them.  At least with an explicit failure you'd be
> aware of the issue and have a stacktrace.
> 
> 
> -David
> 

Re: TomEE 9.x - jakarta.enterpise.inject.spi.Extension VS javax.enterpise.inject.spi.Extension

Posted by David Blevins <da...@gmail.com>.
> On May 12, 2022, at 12:02 AM, Richard Zowalla <rz...@apache.org> wrote:
> 
> - Additionally scan for "javax.enterprise.inject.spi.Extension"
> - If we find something, log a warning/info that this is not really
> expected (?) and load the extension instead of failing with an
> unsatisfied dependency error later.

I'd support that.  More than likely those extensions will refer to javax.enterprise packages and fail, but that might be better than silently skipping them.  At least with an explicit failure you'd be aware of the issue and have a stacktrace.


-David