+1

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le jeu. 23 sept. 2021 à 22:19, Thomas Andraschko <
andraschko.tho...@gmail.com> a écrit :

> OK
> Then lets please create a new property to enable spec behavior
> We could also add it to our default excludes
>
>
>
> Mark Struberg <strub...@yahoo.de.invalid> schrieb am Do., 23. Sept. 2021,
> 22:07:
>
> > I think the current OWB behaviour is more correct from a user POV, even
> if
> > it's not 100% what the spec defines.
> > We can easily solve the Mojarra issue with a jar-exclude.
> >
> > LieGrue,
> > strub
> >
> >
> >
> > > Am 23.09.2021 um 21:47 schrieb Thomas Andraschko <
> > andraschko.tho...@gmail.com>:
> > >
> > > So you also think we should make it a default behavior to NOT scan a
> JAR
> > > with extension and without beans.xml?
> > >
> > > Mark Struberg <strub...@yahoo.de.invalid> schrieb am Do., 23. Sept.
> > 2021,
> > > 21:26:
> > >
> > >> I personally did also wonder about this rather weird rule in the spec
> > some
> > >> years ago.
> > >> Back then we concluded that it is rather an unintended behaviour. I'm
> > >> surprised that it's now used intentionally. If you have an Extension
> in
> > a
> > >> jar and only want to use programmatic beans, then why the hack does
> one
> > add
> > >> e.g. an @ApplicationScoped annotation? This really sounds weird. So
> I'd
> > >> rather simply use the existing jar-exclude in the scanning.
> > >>
> > >>
> > >> LieGrue,
> > >> strub
> > >>
> > >>
> > >>> Am 22.09.2021 um 11:19 schrieb Romain Manni-Bucau <
> > rmannibu...@gmail.com
> > >>> :
> > >>>
> > >>> Le mer. 22 sept. 2021 à 11:17, Thomas Andraschko <
> > >>> andraschko.tho...@gmail.com> a écrit :
> > >>>
> > >>>> I really prefer to make the spec the default behavior, nobody
> expects
> > a
> > >> JAR
> > >>>> to be scanned without having a beans.xml but a extension
> > >>>> normally if you would like to use CDI, but avoid scanning, you add a
> > CDI
> > >>>> extension but no beans.xml, thats exactly like MF and Mojarra is
> > >>>> implemented
> > >>>>
> > >>>
> > >>> Just to correct that, several people expect a jar with an extension
> to
> > be
> > >>> scanned in annotated mode without a beans.xml when it was full OWB
> from
> > >> the
> > >>> start.
> > >>> This is why switching will silently break users.
> > >>> So maybe a toggle with the same default than today + warning is
> saner.
> > >>>
> > >>>
> > >>>>
> > >>>> Lets wait for other opinions :)
> > >>>>
> > >>>>
> > >>>> Am Mi., 22. Sept. 2021 um 11:08 Uhr schrieb Romain Manni-Bucau <
> > >>>> rmannibu...@gmail.com>:
> > >>>>
> > >>>>> Think we should prefer our users over the spec for that so I'd be
> to
> > >>>>> support it with a toggle to enable it
> > >>>>> (org.apache.webbeans.skipJarWithExtensionScanning=false by
> default).
> > >>>>> If needed we can add a bdascannerservice with it at true
> > >>>> (WebSpecScanner).
> > >>>>> And in 2.1 we can change it
> > >>>>>
> > >>>>> Romain Manni-Bucau
> > >>>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > >>>>> <https://rmannibucau.metawerx.net/> | Old Blog
> > >>>>> <http://rmannibucau.wordpress.com> | Github <
> > >>>>> https://github.com/rmannibucau> |
> > >>>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > >>>>> <
> > >>>>>
> > >>>>
> > >>
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > >>>>>>
> > >>>>>
> > >>>>>
> > >>>>> Le mer. 22 sept. 2021 à 11:06, Thomas Andraschko <
> > >>>>> andraschko.tho...@gmail.com> a écrit :
> > >>>>>
> > >>>>>> Hi,
> > >>>>>>
> > >>>>>> I discussed with Romain about OWB-1298.
> > >>>>>>
> > >>>>>> Mojarra has NO beans.xml but a CDI Extension, which currently
> breaks
> > >>>> OWB
> > >>>>>> as:
> > >>>>>> - WebsocketUserManager is scanned
> > >>>>>> - WebsocketUserManager is added in the extension
> > >>>>>>
> > >>>>>> in the specs (12.1) its defined, that:
> > >>>>>>
> > >>>>>> An archive which:
> > >>>>>>
> > >>>>>>  -
> > >>>>>>
> > >>>>>>  contains a beans.xml file with the bean-discovery-mode of none,
> or,
> > >>>>>>  -
> > >>>>>>
> > >>>>>>  contains an extension and no beans.xml file
> > >>>>>>
> > >>>>>> is NOT a bean archive.
> > >>>>>>
> > >>>>>>
> > >>>>>> Which means that OWB should NOT scan Mojarra and therefore users
> can
> > >>>> use
> > >>>>>> Mojarra with OWB, without adding it to the scan exclusions or
> > setting
> > >>>>> other
> > >>>>>> properties.
> > >>>>>>
> > >>>>>> If MyFaces wouldnt be in the default exclusions, it would also
> break
> > >> MF
> > >>>>> and
> > >>>>>> maybe other libs.
> > >>>>>>
> > >>>>>> We should fix it and make it the default behavior.
> > >>>>>>
> > >>>>>> It should even improve startup as we skip more archives per
> default.
> > >>>>>>
> > >>>>>> Romain mentioned that there could be cases, where it could break
> > apps.
> > >>>> So
> > >>>>>> we should maybe introduce a new config property to enable the old
> > >>>>> behavior
> > >>>>>> again, which also scans archives with extensions but without
> > beans.xml
> > >>>>>>
> > >>>>>> this is also related to org.apache.webbeans.scanBeansXmlOnly
> > >>>>>>
> > >>>>>> WDYT?
> > >>>>>>
> > >>>>>>
> > >>>>>> Best regards,
> > >>>>>>
> > >>>>>> Thomas
> > >>>>>>
> > >>>>>
> > >>>>
> > >>
> > >>
> >
> >
>

Reply via email to