well, it is certainly one way of understanding the spec. However, I have
to say that the fact we offer a --library is merely a glassfish specific
feature to avoid repackaging jars in multiple applications. So it seems
to me that we could very well classify the --libraries as a reference
(like a class-path attribute).
I am not sure what you meant by unpractical but it is also obvious that
scanning --librairies jars which are loaded by a shared class loader can
lead to multiple issues, in particular, but not limited to :
- usage a global jndi name
- leakage between applications.
- static fields
Having said that, there could be legitimate use of components inside
libraries referenced through --library. Maybe we should have a
flag/property at deployment to offer more flexibility to this glassfish
extension ?
jerome
On 09/27/2010 09:35 AM, Hong Zhang wrote:
> Hi, Sahoo
>
> Based on the EE spec, we only need to scan the annotations for the
> classes inside the application package. It will be impractical to scan
> all the classes on the classpath.
>
> EE.8.5.1Deploying a Stand-Alone Java EE Module
> 2. If the deployment descriptor is absent, or is present and is a Java
> EE 5 version descriptor and the metadata-complete attribute is not set
> to true, the deployment tool must examine all the class files in the
> application package.
>
> EE.8.5.2Deploying a Java EE Application
> 4. If the module deployment descriptor is absent, or is present and is
> a Java EE 5 or later version descriptor and the metadata-complete
> attribute is not set to true, the deployment tool must examine all the
> class files in the application package that can be used by the module
> (that is, all class files that are included in the .ear file and can
> be referenced by the module, such as the class files included in the
> module itself, class files referenced from the module by use of a
> Class-Path reference, class files included in the library directory,
> etc.).
>
> Thanks,
>
> - Hong
>
> On 9/27/2010 12:18 PM, Sanjeeb Sahoo wrote:
>> Are libraries mentioned via --libraries not parsed for annotations?
>> They must be, else it's a bug.
>>
>> Sahoo
>> On Monday 27 September 2010 08:56 PM, glassfish_at_javadesktop.org wrote:
>>> This parsing is for scanning annotations inside the library jars.
>>> No, there is currently no option to disable the parsing of the
>>> library jars. If your archive needs to reference a lot of library
>>> jars and you want to avoid parsing of these library jars, you could
>>> reference these library jars through the --libraries option instead
>>> of packagin them inside the archive.
>>> [Message sent by forum member 'hzhang_jn']
>>>
>>> http://forums.java.net/jive/thread.jspa?messageID=483780
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>