Similar results for WLS and GlassFish
Wls results for at.struct.cdieartest.war2.War2SampleBean
####<Feb 25, 2015 11:21:26 AM EST> <Info>
<at.struct.cdieartest.util.BaseLoggingExtension> <lenovo> <myserver>
<[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default
(self-tuning)'> <<WLS Kernel>> <>
<5796eac4-91c4-433f-a5aa-91c4df74cb42-00000013> <1424881286166>
<[severity-value: 64] [rid: 0] [partition-id: 0] [partition-name:
DOMAIN] > <BEA-000000> <processAnnotatedType
Extension Instance: at.struct.cdieartest.EarLoggingExtension@389c0b85
ThreadContextClassLoader =
weblogic.utils.classloaders.GenericClassLoader@73518028 finder:
weblogic.utils.classloaders.CodeGenClassFinder@3d79b018 annotation:
ear-1.0-SNAPSHOT@
Object ClassLoader =
weblogic.utils.classloaders.ChangeAwareClassLoader@6340605e finder:
weblogic.utils.classloaders.CodeGenClassFinder@5e619f76 annotation:
ear-1.0-SNAPSHOT@war2
params = [at.struct.cdieartest.war2.War2SampleBean]
------------------------------------------------------------------------------------------------------------------------------
####<Feb 25, 2015 11:21:26 AM EST> <Info>
<at.struct.cdieartest.util.BaseLoggingExtension> <lenovo> <myserver>
<[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default
(self-tuning)'> <<WLS Kernel>> <>
<5796eac4-91c4-433f-a5aa-91c4df74cb42-00000013> <1424881286167>
<[severity-value: 64] [rid: 0] [partition-id: 0] [partition-name:
DOMAIN] > <BEA-000000> <processAnnotatedType
Extension Instance: at.struct.cdieartest.war2.War2Extension@477c9784
ThreadContextClassLoader =
weblogic.utils.classloaders.GenericClassLoader@73518028 finder:
weblogic.utils.classloaders.CodeGenClassFinder@3d79b018 annotation:
ear-1.0-SNAPSHOT@
Object ClassLoader =
weblogic.utils.classloaders.ChangeAwareClassLoader@6340605e finder:
weblogic.utils.classloaders.CodeGenClassFinder@5e619f76 annotation:
ear-1.0-SNAPSHOT@war2
params = [at.struct.cdieartest.war2.War2SampleBean]
------------------------------------------------------------------------------------------------------------------------------
####<Feb 25, 2015 11:21:26 AM EST> <Info>
<at.struct.cdieartest.util.BaseLoggingExtension> <lenovo> <myserver>
<[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default
(self-tuning)'> <<WLS Kernel>> <>
<5796eac4-91c4-433f-a5aa-91c4df74cb42-00000013> <1424881286168>
<[severity-value: 64] [rid: 0] [partition-id: 0] [partition-name:
DOMAIN] > <BEA-000000> <processAnnotatedType
Extension Instance: at.struct.cdieartest.war1.War1Extension@18f73006
ThreadContextClassLoader =
weblogic.utils.classloaders.GenericClassLoader@73518028 finder:
weblogic.utils.classloaders.CodeGenClassFinder@3d79b018 annotation:
ear-1.0-SNAPSHOT@
Object ClassLoader =
weblogic.utils.classloaders.ChangeAwareClassLoader@6340605e finder:
weblogic.utils.classloaders.CodeGenClassFinder@5e619f76 annotation:
ear-1.0-SNAPSHOT@war2
params = [at.struct.cdieartest.war2.War2SampleBean]
GlassFish 4 results for at.struct.cdieartest.war2.War2SampleBean
[#|2015-02-25T11:30:06.700-0500|INFO|glassfish
4.0|at.struct.cdieartest.util.BaseLoggingExtension|_ThreadID=53;_ThreadName=AutoDeployer;_TimeMillis=1424881806700;_LevelValue=800;|
processAnnotatedType
Extension Instance: at.struct.cdieartest.EarLoggingExtension@69f19d5b
ThreadContextClassLoader = WebappClassLoader (delegate=true;
repositories=WEB-INF/classes/)
Object ClassLoader = WebappClassLoader (delegate=true;
repositories=WEB-INF/classes/)
params = [at.struct.cdieartest.war2.War2SampleBean]
------------------------------------------------------------------------------------------------------------------------------
|#]
[#|2015-02-25T11:30:06.702-0500|INFO|glassfish
4.0|at.struct.cdieartest.util.BaseLoggingExtension|_ThreadID=53;_ThreadName=AutoDeployer;_TimeMillis=1424881806702;_LevelValue=800;|
processAnnotatedType
Extension Instance: at.struct.cdieartest.war2.War2Extension@2431d038
ThreadContextClassLoader = WebappClassLoader (delegate=true;
repositories=WEB-INF/classes/)
Object ClassLoader = WebappClassLoader (delegate=true;
repositories=WEB-INF/classes/)
params = [at.struct.cdieartest.war2.War2SampleBean]
------------------------------------------------------------------------------------------------------------------------------
|#]
[#|2015-02-25T11:30:06.703-0500|INFO|glassfish
4.0|at.struct.cdieartest.util.BaseLoggingExtension|_ThreadID=53;_ThreadName=AutoDeployer;_TimeMillis=1424881806703;_LevelValue=800;|
processAnnotatedType
Extension Instance: at.struct.cdieartest.war1.War1Extension@38f4f9fc
ThreadContextClassLoader = WebappClassLoader (delegate=true;
repositories=WEB-INF/classes/)
Object ClassLoader = WebappClassLoader (delegate=true;
repositories=WEB-INF/classes/)
params = [at.struct.cdieartest.war2.War2SampleBean]
------------------------------------------------------------------------------------------------------------------------------
|#]
On 02/20/2015 02:13 AM, Mark Struberg wrote:
I’ve now extracted my sample to as smallish as possible.
You can find it on my github repo:
https://github.com/struberg/cdi-ear-test
As already explained Wildfly does badly blow up if you use Extensions:
07:59:44,121 INFO [at.struct.cdieartest.util.BaseLoggingExtension] (MSC service thread
1-4) processAnnotatedType
Extension Instance: at.struct.cdieartest.war1.War1Extension@2b8e6a22
ThreadContextClassLoader = ModuleClassLoader for Module
"deployment.ear-1.0-SNAPSHOT.ear:main" from Service Module Loader
Object ClassLoader = ModuleClassLoader for Module
"deployment.ear-1.0-SNAPSHOT.ear.war2.war:main" from Service Module Loader
params = [at.struct.cdieartest.war2.War2SampleBean]
Explanation: a bean from war2 (War2SampleBean) gets posted to the Extension from war1
(War1Extension).
I did not add more code to keep the sample really clean. But I guess you agree that this
will cause ClassNotFound, cannot cast, etc down the road.
Oh, and I don’t think other containers do much better.
I know that TomEE-1.7.2-SNAPSHOT and 2.0.0-SNAPSHOT do work, but it’s very strict
isolation might possibly cause other implications down the road (although much easier to
handle ones).
Can anybody test how GlassFish-3.1 and 4.0 (RI) behaves? Not that I care much about how
the RI behaves in this unspecified case - but still good to know ;)
LieGrue,
strub
> Am 19.02.2015 um 22:28 schrieb Romain Manni-Bucau <rmannibucau(a)gmail.com>:
>
> yep what's I meant by logical (technically we an do all we want)
>
>
> Romain Manni-Bucau
> @rmannibucau
>
http://www.tomitribe.com
>
http://rmannibucau.wordpress.com
>
https://github.com/rmannibucau
>
>
> 2015-02-19 21:10 GMT+01:00 Mark Struberg <struberg(a)yahoo.de>:
>> +1
>> It’s not only logical, it’s really technically crucial.
>>
>> Say in war1 you call
>>
>> beanManager.fire(new ClassWhichOnlyExistsInWar1());
>>
>> and get this event in war2 where it gets observd (maybe due to a super type or
interface). This will just blow up your application.
>> That’s broken, broken, broken.
>>
>> LieGrue,
>> strub
_______________________________________________
cdi-dev mailing list
cdi-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/cdi-dev
Note that for all code provided on this list, the provider licenses the code under the
Apache License, Version 2 (
http://www.apache.org/licenses/LICENSE-2.0.html). For all other
ideas provided on this list, the provider waives all patent and other intellectual
property rights inherent in such information.