Pushed https://issues.apache.org/jira/browse/OWB-1370 too (to select the provider). The small issue it has is that meecrowave will still run its extension in the classpath - but this is very "normal". A quick workaround is to veto meecrowavebus bean which will kind of swallow the side effects. Here is a quick CDI SE run using owb-se as impl and having meecrowave 'leaked' in the classpath:
try (SeContainer container = SeContainerInitializer.newInstance() .addProperty(SeContainerInitializer.class.getName() + ".provider", "owb") .addExtensions(new Extension() { void veto(@Observes final ProcessAnnotatedType<MeecrowaveBus> bus) { bus.veto(); } }) .initialize()) { We can make meecrowave detect it is not used and veto itself or the default extension loader (loader service) skip meecrowave exentension in such a case but this last option requires OWB to know about Meecrowave and first one requires some new callbacks which are a bit overkill IMHO so I'm tempted to think it is not that bad, in particular since in the context of a project this extension can be made configurable with a system proprety or so so overall both initializer impl cases are enabled more properly IMHO. Wdyt? 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 sam. 20 févr. 2021 à 18:03, Romain Manni-Bucau <rmannibu...@gmail.com> a écrit : > MEECROWAVE-278 and OWB-1369 should fix it. > Will also likely create a OWB-1370 to enable to pass a provider property > to select explicitly which one to use. > > 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 sam. 20 févr. 2021 à 12:20, Arne Limburg <arne.limb...@openknowledge.de> > a écrit : > >> Hi Romain, >> >> >> for now I am fine with the result of this 😊 >> >> If you can easily fix it, it would be cool. >> >> >> Imho the setup I use is quite common (having meecrowave in classpath and >> se for testing), even more as I observed similar behavior with owb-junit >> (haven't investigated further). Of course one could use just plain >> meecrowave for testing, but that is not obvious (thanks to your hint with >> the http property). So other users may run into the same issues, I have. >> >> >> Let me know, if I can help further, >> >> Cheers, >> >> Arne >> >> >> -- >> >> Arne Limburg - Enterprise Architekt >> >> >> >> >> OPEN KNOWLEDGE GmbH >> Poststraße 1, 26122 Oldenburg >> Mobil: +49 151 - 108 22 942 >> Tel: +49 441 - 4082-154 >> Fax: +49 441 - 4082-111 >> arne.limb...@openknowledge.de >> www.openknowledge.de <https://www.openknowledge.de/> >> >> Registergericht: Amtsgericht Oldenburg, HRB 4670 >> Geschäftsführer: Lars Röwekamp, Jens Schumann >> >> Treffen Sie uns auf kommenden Konferenzen und Workshops: >> >> Zu unseren Events<https://www.openknowledge.de/event/> >> >> >> >> >> >> ________________________________ >> Von: Romain Manni-Bucau <rmannibu...@gmail.com> >> Gesendet: Samstag, 20. Februar 2021 09:43 >> An: openwebbeans-dev >> Betreff: Re: Incompatibility between owb-se and meecrowave? >> >> Hi Arne, >> >> the meecrowave mode can need to get in its openwebbeans.properties this >> line: >> >> org.apache.webbeans.spi.ContextsService = >> org.apache.webbeans.web.context.WebContextsService >> >> cause owb-web and owb-se have the same ordinal so if the classpath is not >> well ordered se one wins and meecrowave does not shutdown properly, this >> needs to be fixed. >> >> The same kind of conflict happens with the scanner service which leads to >> alternative bug. A quick fix is: >> >> try (SeContainer container = SeContainerInitializer.newInstance() >> .addProperty(ScannerService.class.getName(), new >> OWBTomcatWebScannerService()) >> .initialize()) { >> >> MeecrowaveSeContainerInitializer overrides protected ScannerService >> getScannerService() method to return its own scanner but it see SE one is >> still used in a few cases so the bootstrap config (beans.xml list) must be >> migrated to the runtime scanner in newContainer method. >> >> Very concretely it is kind of already planned but >> OWBTomcatWebScannerService misses >> some delegation in its impl so I suspect it is just about completing it. >> Let me know if you want i do both fixes. >> >> Romain Manni-Bucau >> @rmannibucau <https://twitter.com/rmannibucau> | Blog >> < >> https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2frmannibucau.metawerx.net&umid=7e6b798a-d924-4126-891d-400f21c9a910&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-eb5022e55e572a3fad686290276840667e2d204c> >> | Old Blog >> < >> https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=http%3a%2f%2frmannibucau.wordpress.com&umid=7e6b798a-d924-4126-891d-400f21c9a910&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-89d2b9b84f48b449bbd22349ebc59c783b41da6d> >> | Github < >> https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fgithub.com%2frmannibucau&umid=7e6b798a-d924-4126-891d-400f21c9a910&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-9a26a9568e60fd223fcbf68609170d0268ab7a55> >> | >> [ >> https://secure.gravatar.com/blavatar/18ef8a5fe8eefd3810b5e9743904d82c?s=200&ts=1613819509 >> ]< >> https://smex-ctp.trendmicro.com/wis/clicktime/v1/query?url=http%3a%2f%2frmannibucau.wordpress.com&umid=7e6b798a-d924-4126-891d-400f21c9a910&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-89d2b9b84f48b449bbd22349ebc59c783b41da6d >> > >> >> New posts here >>> rmannibucau.metawerx.net | New posts here >>> >> https://rmannibucau.metawerx.net< >> https://smex-ctp.trendmicro.com/wis/clicktime/v1/query?url=http%3a%2f%2frmannibucau.wordpress.com&umid=7e6b798a-d924-4126-891d-400f21c9a910&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-89d2b9b84f48b449bbd22349ebc59c783b41da6d >> > >> smex-ctp.trendmicro.com >> New posts here >>> https://rmannibucau.metawerx.net >> >> >> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book >> < >> https://www.packtpub.com/application-development/java-ee-8-high-performance >> > >> [https://static.packt-cdn.com/products/9781788473064/cover/smaller]< >> https://www.packtpub.com/application-development/java-ee-8-high-performance >> > >> >> Java EE 8 High Performance | Packt< >> https://www.packtpub.com/application-development/java-ee-8-high-performance >> > >> www.packtpub.com >> Get more control of your applications performances in development and >> production and know how to meet your Service Level Agreement on critical >> microservices. >> >> >> >> >> Le sam. 20 févr. 2021 à 09:23, Arne Limburg < >> arne.limb...@openknowledge.de> >> a écrit : >> >> > Hi Romain, >> > >> > >> > if that is the expected behavior, then I indeed have found a bug ;-) >> > >> > >> > I tried your suggestions here: >> > >> > https://github.com/ArneLimburg/meecrowave-se-sample >> > >> > and in the SE case the beans.xml is not picked (see SeTest). >> > >> > When I remove the dependency to owb-se at least new Meecrowave().bake() >> > works as expected. >> > >> > >> > I'll dig into it next week. If you find some time earlier, feel free 😊 >> > >> > >> > Cheers, >> > >> > Arne >> > >> > >> > -- >> > >> > Arne Limburg - Enterprise Architekt >> > >> > >> > >> > >> > OPEN KNOWLEDGE GmbH >> > Poststraße 1, 26122 Oldenburg >> > Mobil: +49 151 - 108 22 942 >> > Tel: +49 441 - 4082-154 >> > Fax: +49 441 - 4082-111 >> > arne.limb...@openknowledge.de >> > www.openknowledge.de<http://www.openknowledge.de> < >> https://www.openknowledge.de/> >> > >> > Registergericht: Amtsgericht Oldenburg, HRB 4670 >> > Geschäftsführer: Lars Röwekamp, Jens Schumann >> > >> > Treffen Sie uns auf kommenden Konferenzen und Workshops: >> > >> > Zu unseren Events<https://www.openknowledge.de/event/> >> > >> > >> > >> > >> > >> > ________________________________ >> > Von: Romain Manni-Bucau <rmannibu...@gmail.com> >> > Gesendet: Freitag, 19. Februar 2021 18:55 >> > An: openwebbeans-dev >> > Betreff: Re: Incompatibility between owb-se and meecrowave? >> > >> > Exactly, you are supposed to have these dependencies: >> > >> > <dependencies> >> > <dependency> >> > <groupId>org.apache.meecrowave</groupId> >> > <artifactId>meecrowave-specs-api</artifactId> >> > <version>1.2.10</version> >> > </dependency> >> > <dependency> >> > <groupId>org.apache.meecrowave</groupId> >> > <artifactId>meecrowave-core</artifactId> >> > <version>1.2.10</version> >> > </dependency> >> > <dependency> >> > <groupId>org.apache.openwebbeans</groupId> >> > <artifactId>openwebbeans-se</artifactId> >> > <version>2.0.21</version> >> > </dependency> >> > </dependencies> >> > >> > >> > And with this setup this main: >> > >> > package com.github.rmannibucau; >> > >> > import javax.enterprise.context.ApplicationScoped; >> > import javax.enterprise.context.Initialized; >> > import javax.enterprise.event.Observes; >> > import javax.enterprise.inject.se.SeContainerInitializer; >> > >> > @ApplicationScoped >> > public class Hi { >> > public void onStart(@Observes >> > @Initialized(ApplicationScoped.class) final Object init) { >> > System.out.println(">> hi"); >> > } >> > >> > public static void main(final String... args) { >> > SeContainerInitializer.newInstance() >> > .initialize() >> > .close(); >> > } >> > } >> > >> > >> > Should output something like: >> > >> > [18:52:45.639][INFO ][ main][oyote.http11.Http11NioProtocol] >> > Initializing ProtocolHandler ["http-nio-8080"] >> > [18:52:45.646][INFO ][ main][.catalina.core.StandardService] >> > Starting service [Tomcat] >> > [18:52:45.646][INFO ][ main][e.catalina.core.StandardEngine] >> > Starting Servlet engine: [Apache Tomcat/9.0.39] >> > [18:52:45.653][INFO ][ main][oyote.http11.Http11NioProtocol] >> > Starting ProtocolHandler ["http-nio-8080"] >> > [18:52:45.662][INFO ][ main][g.apache.meecrowave.Meecrowave] >> > --------------- http://localhost:8080 >> > [18:52:45.720][INFO ][ main][.catalina.core.StandardContext] >> > Unable to set the web application class loader property >> > [clearReferencesObjectStreamClassCaches] to [true] as the property does >> not >> > exist. >> > [18:52:45.720][INFO ][ main][.catalina.core.StandardContext] >> > Unable to set the web application class loader property >> > [clearReferencesObjectStreamClassCaches] to [true] as the property does >> not >> > exist. >> > [18:52:45.720][INFO ][ main][.catalina.core.StandardContext] >> > Unable to set the web application class loader property >> > [clearReferencesThreadLocals] to [true] as the property does not exist. >> > [18:52:45.727][INFO ][ main][nner.AbstractMetaDataDiscovery] >> > added beans archive URL: >> > >> > >> jar:file:/home/rmannibucau/.m2/repository/org/apache/meecrowave/meecrowave-core/1.2.10/meecrowave-core-1.2.10.jar!/META-INF/beans.xml >> > [18:52:45.731][INFO ][ main][nner.AbstractMetaDataDiscovery] >> > added beans archive URL: >> > >> > >> jar:file:/home/rmannibucau/.m2/repository/org/apache/cxf/cxf-integration-cdi/3.4.1/cxf-integration-cdi-3.4.1.jar!/META-INF/beans.xml >> > [18:52:45.733][INFO ][ main][nner.AbstractMetaDataDiscovery] >> > added beans archive URL: >> > >> > >> jar:file:/home/rmannibucau/.m2/repository/org/apache/johnzon/johnzon-jsonb/1.2.8/johnzon-jsonb-1.2.8.jar!/ >> > [18:52:45.733][INFO ][ main][nner.AbstractMetaDataDiscovery] >> > added beans archive URL: >> > >> > >> jar:file:/home/rmannibucau/.m2/repository/org/apache/meecrowave/meecrowave-specs-api/1.2.10/meecrowave-specs-api-1.2.10.jar!/ >> > [18:52:45.733][INFO ][ main][nner.AbstractMetaDataDiscovery] >> > added beans archive URL: >> > >> > >> jar:file:/home/rmannibucau/.m2/repository/org/apache/cxf/cxf-rt-security/3.4.1/cxf-rt-security-3.4.1.jar!/ >> > [18:52:45.733][INFO ][ main][nner.AbstractMetaDataDiscovery] >> > added beans archive URL: >> > >> > >> jar:file:/home/rmannibucau/.m2/repository/org/apache/cxf/cxf-rt-rs-client/3.4.1/cxf-rt-rs-client-3.4.1.jar!/ >> > [18:52:45.734][INFO ][ main][nner.AbstractMetaDataDiscovery] >> > added beans archive URL: >> > >> > >> jar:file:/home/rmannibucau/.m2/repository/org/apache/cxf/cxf-rt-frontend-jaxrs/3.4.1/cxf-rt-frontend-jaxrs-3.4.1.jar!/ >> > [18:52:45.734][INFO ][ main][nner.AbstractMetaDataDiscovery] >> > added beans archive URL: file:/tmp/demo-mw-cdi-se/target/classes/ >> > [18:52:45.734][INFO ][ main][nner.AbstractMetaDataDiscovery] >> > added beans archive URL: >> > >> > >> jar:file:/home/rmannibucau/.m2/repository/org/apache/cxf/cxf-rt-transports-http/3.4.1/cxf-rt-transports-http-3.4.1.jar!/ >> > [18:52:45.734][INFO ][ main][nner.AbstractMetaDataDiscovery] >> > added beans archive URL: >> > >> > >> jar:file:/home/rmannibucau/.m2/repository/org/apache/johnzon/johnzon-mapper/1.2.8/johnzon-mapper-1.2.8.jar!/ >> > [18:52:45.734][INFO ][ main][nner.AbstractMetaDataDiscovery] >> > added beans archive URL: >> > >> > >> jar:file:/home/rmannibucau/.m2/repository/org/apache/johnzon/johnzon-core/1.2.8/johnzon-core-1.2.8.jar!/ >> > [18:52:45.734][INFO ][ main][nner.AbstractMetaDataDiscovery] >> > added beans archive URL: >> > >> > >> jar:file:/home/rmannibucau/.m2/repository/org/apache/cxf/cxf-core/3.4.1/cxf-core-3.4.1.jar!/ >> > [18:52:45.810][INFO ][ main][ifecycle.WebContainerLifecycle] >> > OpenWebBeans Container is starting... >> > [18:52:45.943][INFO ][ main][.webbeans.config.BeansDeployer] >> All >> > injection points were validated successfully. >> > >> hi >> > [18:52:45.965][INFO ][ main][ifecycle.WebContainerLifecycle] >> > OpenWebBeans Container has started, it took [155] ms. >> > [18:52:46.030][INFO ][ main][ifecycle.WebContainerLifecycle] >> > OpenWebBeans Container was stopped for context path, [] >> > [18:52:46.034][INFO ][ main][oyote.http11.Http11NioProtocol] >> > Pausing ProtocolHandler ["http-nio-8080"] >> > [18:52:46.041][INFO ][ main][.catalina.core.StandardService] >> > Stopping service [Tomcat] >> > [18:52:46.043][INFO ][ main][oyote.http11.Http11NioProtocol] >> > Stopping ProtocolHandler ["http-nio-8080"] >> > [18:52:46.089][INFO ][ main][oyote.http11.Http11NioProtocol] >> > Destroying ProtocolHandler ["http-nio-8080"] >> > >> > (to drop the warning use: META-INF/openwebbeans/openwebbeans.properties: >> > >> > configuration.ordinal = 500 >> > org.apache.webbeans.spi.DefiningClassService = >> > org.apache.webbeans.service.ClassLoaderProxyService >> > org.apache.webbeans.spi.ApplicationBoundaryService = >> > org.apache.webbeans.corespi.se.SimpleApplicationBoundaryService >> > org.apache.webbeans.spi.deployer.skipVetoedOnPackages = true >> > org.apache.webbeans.scanBeansXmlOnly = true >> > >> > ) >> > >> > TIP, once working for you try .addProperty("skipHttp", true) on the >> > initializer ;) >> > >> > Le ven. 19 févr. 2021 à 18:11, Arne Limburg < >> arne.limb...@openknowledge.de >> > > >> > a écrit : >> > >> > > Hi Romain, >> > > >> > > >> > > OK, if I understand correctly then, it is supposed to work out of the >> box >> > > with owb-se and meecrowave in the classpath. Since it doesn't (at >> least >> > not >> > > as expected), I'll investigate further and either find my >> configuration >> > > problem or a bug ;-) >> > > >> > > SeContainerInitializer.newInstance().initialize() is not supposed to >> work >> > > when owb-se is not on the classpath, right? >> > > >> > > So I do not further investigate that scenario? >> > > >> > > >> > > Cheers, >> > > >> > > Arne >> > > >> > > -- >> > > >> > > >> > > Arne Limburg - Enterprise Architekt >> > > >> > > >> > > >> > > >> > > OPEN KNOWLEDGE GmbH >> > > Poststraße 1, 26122 Oldenburg >> > > Mobil: +49 151 - 108 22 942 >> > > Tel: +49 441 - 4082-154 >> > > Fax: +49 441 - 4082-111 >> > > arne.limb...@openknowledge.de >> > > www.openknowledge.de<http://www.openknowledge.de< >> http://www.openknowledge.de<http://www.openknowledge.de>> < >> > https://www.openknowledge.de/> >> > > >> > > Registergericht: Amtsgericht Oldenburg, HRB 4670 >> > > Geschäftsführer: Lars Röwekamp, Jens Schumann >> > > >> > > Treffen Sie uns auf kommenden Konferenzen und Workshops: >> > > >> > > Zu unseren Events<https://www.openknowledge.de/event/> >> > > >> > > >> > > >> > > >> > > >> > > ________________________________ >> > > Von: Romain Manni-Bucau <rmannibu...@gmail.com> >> > > Gesendet: Freitag, 19. Februar 2021 14:06 >> > > An: openwebbeans-dev >> > > Betreff: Re: Incompatibility between owb-se and meecrowave? >> > > >> > > Le ven. 19 févr. 2021 à 12:48, Arne Limburg < >> > arne.limb...@openknowledge.de >> > > > >> > > a écrit : >> > > >> > > > Hi Romain >> > > > >> > > > >> > > > I'll investigate the beans.xml problem further, but it seemed to me >> > that >> > > > two containers were started. >> > > > >> > > >> > > Oki, let me know if i can help. >> > > >> > > >> > > > >> > > > >> > > > Regarding the META-INF/services file, I am talking about >> > > > >> > > > javax.enterprise.inject.se.SeContainerInitializer >> > > > >> > > > and not >> > > > >> > > > org.apache.openwebbeans.se.SeContainerSelector >> > > > >> > > > The first one is not available in meecrowave. So in meecrowave I >> cannot >> > > do >> > > > SeContainerInitializer.newInstance() >> > > > >> > > >> > > This is not strictly true (don't get it "rude", I'll explain with next >> > > answer ;)) >> > > >> > > >> > > > >> > > > Is that by intention? >> > > > >> > > >> > > Yes, fact is SeContainerInitializer cdi api is incomplete since you >> cant >> > > select the impl you want either from a provider(xx) method or a system >> > > property so you can't have 2 impl at the same time in the same >> classpath >> > - >> > > note it is not aligned on EE spec SPI, >> > > to solve it we introduced (ok I did ;)) the facade SPI behind the >> > standard >> > > API. Current version is very raw but plan is to enhance it to enable >> too >> > > the sorting and selection we can need (just did the minimum for >> > meecrowave >> > > case at the moment). >> > > It also enables to reuse a lot of the OWBInitializer impl and in >> > particular >> > > explicit scanning (classes(), packages() etc). >> > > >> > > Hope it makes sense. >> > > >> > > >> > > > >> > > > >> > > > Cheers, >> > > > >> > > > Arne >> > > > >> > > > >> > > > -- >> > > > >> > > > Arne Limburg - Enterprise Architekt >> > > > >> > > > >> > > > >> > > > >> > > > OPEN KNOWLEDGE GmbH >> > > > Poststraße 1, 26122 Oldenburg >> > > > Mobil: +49 151 - 108 22 942 >> > > > Tel: +49 441 - 4082-154 >> > > > Fax: +49 441 - 4082-111 >> > > > arne.limb...@openknowledge.de >> > > > www.openknowledge.de<http://www.openknowledge.de<< >> http://www.openknowledge.de<http://www.openknowledge.de<> >> > http://www.openknowledge.de<http://www.openknowledge.de>> < >> > > https://www.openknowledge.de/> >> > > > >> > > > Registergericht: Amtsgericht Oldenburg, HRB 4670 >> > > > Geschäftsführer: Lars Röwekamp, Jens Schumann >> > > > >> > > > Treffen Sie uns auf kommenden Konferenzen und Workshops: >> > > > >> > > > Zu unseren Events<https://www.openknowledge.de/event/> >> > > > >> > > > >> > > > >> > > > >> > > > >> > > > ________________________________ >> > > > Von: Romain Manni-Bucau <rmannibu...@gmail.com> >> > > > Gesendet: Donnerstag, 18. Februar 2021 22:08 >> > > > An: openwebbeans-dev >> > > > Betreff: Re: Incompatibility between owb-se and meecrowave? >> > > > >> > > > Le jeu. 18 févr. 2021 à 21:34, Arne Limburg < >> > > arne.limb...@openknowledge.de >> > > > > >> > > > a écrit : >> > > > >> > > > > Hi Romain, >> > > > > >> > > > > >> > > > > thank you, it helps a bit to understand. >> > > > > >> > > > > I would be ok, if meecrowave would handle everything as expected, >> but >> > > > > somehow my src/test/resources/META-INF/beans.xml is completely >> > ignored >> > > in >> > > > > the case that both are in the classpath. Maybe we should at least >> fix >> > > > that. >> > > > > >> > > > >> > > > Sure but can be a wrong setup no? >> > > > It just does a meecrowave.bake. >> > > > >> > > > Side note: http cna be disabled adding the right properties. >> > > > >> > > > >> > > > > And - I cannot use SeContainerInitializer with meecrowave (without >> > > > > owb-se), because the META-INF/services-file is missing in >> > > > meecrowave-core. >> > > > > >> > > > > Is that intended? >> > > > > >> > > > >> > > > It is there >> > > > >> > > > >> > > >> > >> https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fgithub.com%2fapache%2fopenwebbeans%2dmeecrowave%2fblob%2fmaster%2fmeecrowave%2dcore%2fsrc%2fmain%2fresources%2fMETA%2dINF%2fservices%2forg.apache.openwebbeans.se.SeContainerSelector&umid=eb274f2a-4a83-4976-bb5b-25305b94c12d&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-30463a61b2c416f6da062ee1dce64d129c178768 >> > > > >> > > > >> > > > >> > > > > >> > > > > Cheers, >> > > > > >> > > > > Arne >> > > > > >> > > > > >> > > > > -- >> > > > > >> > > > > Arne Limburg - Enterprise Architekt >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > OPEN KNOWLEDGE GmbH >> > > > > Poststraße 1, 26122 Oldenburg >> > > > > Mobil: +49 151 - 108 22 942 >> > > > > Tel: +49 441 - 4082-154 >> > > > > Fax: +49 441 - 4082-111 >> > > > > arne.limb...@openknowledge.de >> > > > > www.openknowledge.de<http://www.openknowledge.de<<< >> http://www.openknowledge.de<http://www.openknowledge.de<<> >> > http://www.openknowledge.de<http://www.openknowledge.de<> >> > > http://www.openknowledge.de<http://www.openknowledge.de>> < >> > > > https://www.openknowledge.de/> >> > > > > >> > > > > Registergericht: Amtsgericht Oldenburg, HRB 4670 >> > > > > Geschäftsführer: Lars Röwekamp, Jens Schumann >> > > > > >> > > > > Treffen Sie uns auf kommenden Konferenzen und Workshops: >> > > > > >> > > > > Zu unseren Events<https://www.openknowledge.de/event/> >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > ________________________________ >> > > > > Von: Romain Manni-Bucau <rmannibu...@gmail.com> >> > > > > Gesendet: Donnerstag, 18. Februar 2021 17:11 >> > > > > An: openwebbeans-dev >> > > > > Betreff: Re: Incompatibility between owb-se and meecrowave? >> > > > > >> > > > > Hi Arne, >> > > > > >> > > > > Both (meecrowave-core and owb-se) implement SeContainer API - this >> > part >> > > > is >> > > > > intended. >> > > > > >> > > > > Nominal case is to have only one of both in the classpath. >> > > > > >> > > > > The main trick happens >> > > > > in org.apache.openwebbeans.se >> > .SeInitializerFacade#SeInitializerFacade >> > > > (and >> > > > > when you have both meecrowave wins since it supports SE + other >> > > > features). >> > > > > >> > > > > If you handle the bootstrap manually you can do >> > > > > new org.apache.openwebbeans.se.OWBInitializer() to workaround it >> - >> > > sadly >> > > > > SeContainerInitializer does not have a provider(fqn) method not >> > > supports >> > > > a >> > > > > system property to override it. >> > > > > If in a maven project and for tests I suspect you can just >> implement >> > > your >> > > > > own org.apache.openwebbeans.se.SeInitializerFacade and since >> maven >> > > will >> > > > > put >> > > > > src/test/resources before deps in the classpath it will use that >> so >> > you >> > > > can >> > > > > control the selection logic. >> > > > > >> > > > > If not sufficient we can still >> > > > > extend org.apache.openwebbeans.se >> > > > .SeInitializerFacade#SeInitializerFacade >> > > > > logic to read a system property to select the container to use >> and if >> > > not >> > > > > fallback on current impl, we can even enrich our junit5 >> integration >> > > > (@Cdi) >> > > > > to set this system property around >> > > > > org/apache/openwebbeans/junit5/internal/CdiExtension.java:70 to >> > ensure >> > > we >> > > > > can set it in the annotation if relevant. >> > > > > >> > > > > Hope it helps a bit. >> > > > > >> > > > > Romain Manni-Bucau >> > > > > @rmannibucau <https://twitter.com/rmannibucau> | Blog >> > > > > < >> > > > > >> > > > >> > > >> > >> https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2frmannibucau.metawerx.net&umid=b33097f3-3ba5-4d1d-a944-8f469aed22f4&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-5387e0b08aca5d54f73dd04264c823e22f121630 >> > > > > >> > > > > | Old Blog >> > > > > < >> > > > > >> > > > >> > > >> > >> https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=http%3a%2f%2frmannibucau.wordpress.com&umid=b33097f3-3ba5-4d1d-a944-8f469aed22f4&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-630e11efd26521ab597721a159776f15faf70734 >> > > > > >> > > > [ >> > > > >> > > >> > >> https://secure.gravatar.com/blavatar/18ef8a5fe8eefd3810b5e9743904d82c?s=200&ts=1613734699 >> > > > ]< >> > > > >> > > >> > >> https://smex-ctp.trendmicro.com/wis/clicktime/v1/query?url=http%3a%2f%2frmannibucau.wordpress.com&umid=b33097f3-3ba5-4d1d-a944-8f469aed22f4&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-630e11efd26521ab597721a159776f15faf70734 >> > > > > >> > > > >> > > > New posts here >>> rmannibucau.metawerx.net | New posts here >>> >> > > > >> > > >> > >> https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2frmannibucau.metawerx.net&umid=aeb492cd-fbba-4aa8-b8af-3df5c95a1400&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-0416e414064052c4c35731fce476c67506961600 >> > > < >> > > > >> > > >> > >> https://smex-ctp.trendmicro.com/wis/clicktime/v1/query?url=http%3a%2f%2frmannibucau.wordpress.com&umid=b33097f3-3ba5-4d1d-a944-8f469aed22f4&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-630e11efd26521ab597721a159776f15faf70734 >> > > > > >> > > > smex-ctp.trendmicro.com >> > > > New posts here >>> >> > > >> > >> https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2frmannibucau.metawerx.net&umid=aeb492cd-fbba-4aa8-b8af-3df5c95a1400&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-0416e414064052c4c35731fce476c67506961600 >> > > > >> > > > >> > > > > | Github < >> > > > > >> > > > >> > > >> > >> https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fgithub.com%2frmannibucau&umid=b33097f3-3ba5-4d1d-a944-8f469aed22f4&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-e8183cb0b6e5f912faccf35291165d1fbbd68331 >> > > > > >> > > > > | >> > > > > [ >> > > > > >> > > > >> > > >> > >> https://secure.gravatar.com/blavatar/18ef8a5fe8eefd3810b5e9743904d82c?s=200&ts=1613679711 >> > > > > ]< >> > > > > >> > > > >> > > >> > >> https://smex-ctp.trendmicro.com/wis/clicktime/v1/query?url=http%3a%2f%2frmannibucau.wordpress.com&umid=b33097f3-3ba5-4d1d-a944-8f469aed22f4&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-630e11efd26521ab597721a159776f15faf70734 >> > > > [ >> > > > >> > > >> > >> https://secure.gravatar.com/blavatar/18ef8a5fe8eefd3810b5e9743904d82c?s=200&ts=1613734729 >> > > > ]< >> > > > >> > > >> > >> https://smex-ctp.trendmicro.com/wis/clicktime/v1/query?url=http%3a%2f%2frmannibucau.wordpress.com&umid=b33097f3-3ba5-4d1d-a944-8f469aed22f4&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-630e11efd26521ab597721a159776f15faf70734 >> > > > > >> > > > >> > > > New posts here >>> rmannibucau.metawerx.net | New posts here >>> >> > > > >> > > >> > >> https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2frmannibucau.metawerx.net&umid=aeb492cd-fbba-4aa8-b8af-3df5c95a1400&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-0416e414064052c4c35731fce476c67506961600 >> > > < >> > > > >> > > >> > >> https://smex-ctp.trendmicro.com/wis/clicktime/v1/query?url=http%3a%2f%2frmannibucau.wordpress.com&umid=b33097f3-3ba5-4d1d-a944-8f469aed22f4&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-630e11efd26521ab597721a159776f15faf70734 >> > > > > >> > > > smex-ctp.trendmicro.com >> > > > New posts here >>> >> > > >> > >> https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2frmannibucau.metawerx.net&umid=aeb492cd-fbba-4aa8-b8af-3df5c95a1400&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-0416e414064052c4c35731fce476c67506961600 >> > > > >> > > > >> > > > > > >> > > > > >> > > > > New posts here >>> rmannibucau.metawerx.net | New posts here >>> >> > > > > >> > > > >> > > >> > >> https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2frmannibucau.metawerx.net&umid=eb274f2a-4a83-4976-bb5b-25305b94c12d&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-0ae7af498d6b64bbf32d5f519e77b3a23a288c12 >> > > > < >> > > > > >> > > > >> > > >> > >> https://smex-ctp.trendmicro.com/wis/clicktime/v1/query?url=http%3a%2f%2frmannibucau.wordpress.com&umid=b33097f3-3ba5-4d1d-a944-8f469aed22f4&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-630e11efd26521ab597721a159776f15faf70734 >> > > > [ >> > > > >> > > >> > >> https://secure.gravatar.com/blavatar/18ef8a5fe8eefd3810b5e9743904d82c?s=200&ts=1613734759 >> > > > ]< >> > > > >> > > >> > >> https://smex-ctp.trendmicro.com/wis/clicktime/v1/query?url=http%3a%2f%2frmannibucau.wordpress.com&umid=b33097f3-3ba5-4d1d-a944-8f469aed22f4&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-630e11efd26521ab597721a159776f15faf70734 >> > > > > >> > > > >> > > > New posts here >>> rmannibucau.metawerx.net | New posts here >>> >> > > > >> > > >> > >> https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2frmannibucau.metawerx.net&umid=aeb492cd-fbba-4aa8-b8af-3df5c95a1400&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-0416e414064052c4c35731fce476c67506961600 >> > > < >> > > > >> > > >> > >> https://smex-ctp.trendmicro.com/wis/clicktime/v1/query?url=http%3a%2f%2frmannibucau.wordpress.com&umid=b33097f3-3ba5-4d1d-a944-8f469aed22f4&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-630e11efd26521ab597721a159776f15faf70734 >> > > > > >> > > > smex-ctp.trendmicro.com >> > > > New posts here >>> >> > > >> > >> https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2frmannibucau.metawerx.net&umid=aeb492cd-fbba-4aa8-b8af-3df5c95a1400&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-0416e414064052c4c35731fce476c67506961600 >> > > > >> > > > >> > > > > > >> > > > > smex-ctp.trendmicro.com >> > > > > New posts here >>> >> > > > >> > > >> > >> https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2frmannibucau.metawerx.net&umid=eb274f2a-4a83-4976-bb5b-25305b94c12d&auth=ab2dbe9a65917e05515ec2a89459f3e450df8ff8-0ae7af498d6b64bbf32d5f519e77b3a23a288c12 >> > > > > >> > > > > >> > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book >> > > > > < >> > > > > >> > > > >> > > >> > >> https://www.packtpub.com/application-development/java-ee-8-high-performance >> > > > [https://static.packt-cdn.com/products/9781788473064/cover/smaller >> ]< >> > > > >> > > >> > >> https://www.packtpub.com/application-development/java-ee-8-high-performance >> > > > > >> > > > >> > > > Java EE 8 High Performance | Packt< >> > > > >> > > >> > >> https://www.packtpub.com/application-development/java-ee-8-high-performance >> > > > > >> > > > www.packtpub.com<http://www.packtpub.com> >> > > > Get more control of your applications performances in development >> and >> > > > production and know how to meet your Service Level Agreement on >> > critical >> > > > microservices. >> > > > >> > > > >> > > > > > >> > > > > [ >> https://static.packt-cdn.com/products/9781788473064/cover/smaller]< >> > > > > >> > > > >> > > >> > >> https://www.packtpub.com/application-development/java-ee-8-high-performance >> > > > [https://static.packt-cdn.com/products/9781788473064/cover/smaller >> ]< >> > > > >> > > >> > >> https://www.packtpub.com/application-development/java-ee-8-high-performance >> > > > > >> > > > >> > > > Java EE 8 High Performance | Packt< >> > > > >> > > >> > >> https://www.packtpub.com/application-development/java-ee-8-high-performance >> > > > > >> > > > www.packtpub.com<http://www.packtpub.com> >> > > > Get more control of your applications performances in development >> and >> > > > production and know how to meet your Service Level Agreement on >> > critical >> > > > microservices. >> > > > >> > > > >> > > > > > >> > > > > >> > > > > Java EE 8 High Performance | Packt< >> > > > > >> > > > >> > > >> > >> https://www.packtpub.com/application-development/java-ee-8-high-performance >> > > > [https://static.packt-cdn.com/products/9781788473064/cover/smaller >> ]< >> > > > >> > > >> > >> https://www.packtpub.com/application-development/java-ee-8-high-performance >> > > > > >> > > > >> > > > Java EE 8 High Performance | Packt< >> > > > >> > > >> > >> https://www.packtpub.com/application-development/java-ee-8-high-performance >> > > > > >> > > > www.packtpub.com<http://www.packtpub.com> >> > > > Get more control of your applications performances in development >> and >> > > > production and know how to meet your Service Level Agreement on >> > critical >> > > > microservices. >> > > > >> > > > >> > > > > > >> > > > > www.packtpub.com<http://www.packtpub.com> >> > > > Packt | Programming Books, eBooks & Videos for Developers< >> > > > http://www.packtpub.com/> >> > > > www.packtpub.com<http://www.packtpub.com> >> > > > Packt is the online library and learning platform for professional >> > > > developers. Learn Python, JavaScript, Angular and more with eBooks, >> > > videos >> > > > and courses >> > > > >> > > > >> > > > > Get more control of your applications performances in development >> and >> > > > > production and know how to meet your Service Level Agreement on >> > > critical >> > > > > microservices. >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > Le jeu. 18 févr. 2021 à 16:46, Arne Limburg < >> > > > arne.limb...@openknowledge.de >> > > > > > >> > > > > a écrit : >> > > > > >> > > > > > Hi, >> > > > > > >> > > > > > >> > > > > > I am observing some issues with >> > > > > > >> > > > > > SeContainerInitializer.newInstance().initialize(); >> > > > > > >> > > > > > When I use it in my tests meecrowave (which is on the classpath) >> > > kicks >> > > > in >> > > > > > and does some weird stuff with the classpath. >> > > > > > >> > > > > > Basically I try to enable an alternative stereotype for my tests >> > and >> > > it >> > > > > > does not work in that scenario neither via beans.xml (in >> > > > > > src/test/resources/META-INF) nor via >> > > > > > SeContainerInitializer#selectAlternativeStereotypes. >> > > > > > >> > > > > > With either owb-se or meecrowave in the classpath it works as >> > > expected >> > > > > > (with new Meecrowave().bake()). >> > > > > > >> > > > > > >> > > > > > Did a short digging into the code and it seams that two contexts >> > are >> > > > > > started in that case. >> > > > > > >> > > > > > >> > > > > > Does anyone have an idea what's going on or where I should look >> at >> > to >> > > > > find >> > > > > > the problem? >> > > > > > >> > > > > > Next question: How is it supposed to work? >> > > > > > >> > > > > > In my scenario I want to start a CDI container without a >> > > webcontainer, >> > > > > but >> > > > > > even doing it with owb-internal classes does not work, because >> it >> > > > detects >> > > > > > some meecrowave classes that have servlet injection points that >> > > cannot >> > > > be >> > > > > > satisfied in that scenario. >> > > > > > >> > > > > > >> > > > > > Imho when using >> SeContainerInitializer.newInstance().initialize() >> > > > > > meecrowave should not be started, but I have no idea how to >> achieve >> > > > that. >> > > > > > Should we explicitly exclude every meecrowave class in SE >> > scenarios? >> > > > > > >> > > > > > >> > > > > > I would work on that, but I need an idea in which direction to >> go. >> > > > > > >> > > > > > >> > > > > > Cheers, >> > > > > > >> > > > > > Arne >> > > > > > >> > > > > > >> > > > > > -- >> > > > > > >> > > > > > Arne Limburg - Enterprise Architekt >> > > > > > >> > > > > > >> > > > > > OPEN KNOWLEDGE GmbH >> > > > > > Poststraße 1, 26122 Oldenburg >> > > > > > Mobil: +49 151 - 108 22 942 >> > > > > > Tel: +49 441 - 4082-154 >> > > > > > Fax: +49 441 - 4082-111 >> > > > > > arne.limb...@openknowledge.de >> > > > > > www.openknowledge.de<http://www.openknowledge.de<<<< >> http://www.openknowledge.de<http://www.openknowledge.de<<<> >> > http://www.openknowledge.de<http://www.openknowledge.de<<> >> > > http://www.openknowledge.de<http://www.openknowledge.de<> >> > > > http://www.openknowledge.de<http://www.openknowledge.de>> < >> > > > > https://www.openknowledge.de/> >> > > > > > >> > > > > > Registergericht: Amtsgericht Oldenburg, HRB 4670 >> > > > > > Geschäftsführer: Lars Röwekamp, Jens Schumann >> > > > > > >> > > > > > Treffen Sie uns auf kommenden Konferenzen und Workshops: >> > > > > > >> > > > > > Zu unseren Events<https://www.openknowledge.de/event/> >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > >> > > > >> > > >> > >> >