-
1. Re: CDI and EE modules
swd847 Nov 26, 2009 8:19 PM (in response to william.drai)
Beans packaged in a certain Java EE module or library are available for injection, lookup and EL resolution to classes and
JSP/JSF pages packaged in some other Java EE module or library if and only if the first module or library is required to be
accessible to the other module or library by the Java EE platform specification.Jars packaged inside an ear are accessible to one another. Classes deployerd inside a war are not accessible to other modules.
-
2. Re: CDI and EE modules
gavin.king Nov 26, 2009 8:50 PM (in response to william.drai)
any bean of any module can be injected in any bean of any module.Nope, only if the first module is in the classpath of the second module.
If module A has a bean X and is not in the classpath of module B, beans in B cannot inject X.
-
3. Re: CDI and EE modules
william.drai Nov 26, 2009 11:03 PM (in response to william.drai)Gavin, indeed that's what I have understood but from what I see in my project it does not seem to be the case in JBoss 6.
Of course if what Stuart says is right, there is no problem but I thought jars were isolated from each other and classpath entries in the manifest file were required to define classloader dependencies. Has this changed in JEE5 or JEE6 ?
-
4. Re: CDI and EE modules
gavin.king Nov 26, 2009 11:51 PM (in response to william.drai)Correct. Unless you put stuff in the .ear/lib directory, in which case they're visible to everything.
Note that we have not yet released JBoss6, so I'm not sure what the status of this feature is.
-
5. Re: CDI and EE modules
pmuir Dec 16, 2009 1:49 PM (in response to william.drai)
Gavin King wrote on Nov 26, 2009 23:51:
Correct. Unless you put stuff in the .ear/lib directory, in which case they're visible to everything.
Note that we have not yet released JBoss6, so I'm not sure what the status of this feature is.Right, this isn't implemented in JBoss AS yet (it is in GlassFish). Ales is going to work on it soon (but xmas is in the way ;-)