users@ejb-spec.java.net

[ejb-spec users] [jsr345-experts] Re: Packaging library jar(s) into an EJB module?

From: Antonio Goncalves <antonio.goncalves_at_gmail.com>
Date: Thu, 9 Feb 2012 10:36:59 +0100

To be honest I quite like this proposal. It simplifies EJB packaging. EAR
is a pain to package (for example with Maven) and jars have no classloader
issue. So we could just package an EJB with it's dependencies in a single
jar and deploy it. I really like the idea.

Antoino

On Thu, Feb 9, 2012 at 09:06, Florent BENOIT <Florent.Benoit_at_ow2.org> wrote:

> Hi,
>
> Well, I'm not sure that it should be allowed
> I see no major difference between an EAR file including an EJB file +
> libraries and an EJB file including an external library file as there is an
> extra "packaging" step
> And often, when using .jar extension, we expect to find all the classes at
> the root.
> Also, we can still make an uberjar of all dependencies with tools like
> maven when building its EJB.
>
> Regards,
>
> Florent
>
>
> On 02/09/2012 02:14 AM, Marina Vatkina wrote:
>
>> Experts,
>>
>> As you know, while it's easy to package a library into a .war file or a
>> .ear archive, there is no easy way to do the same for a stand-alone EJB
>> module in a portable way. The only current option is to use a reference by
>> adding a Class-Path attribute to the Manifest file of the EJB .jar file (or
>> another referenced archive) but this is not portable as it requires to
>> place referenced library in the specific location of the application server
>> file system (in case that .jar file is not used from its original location).
>>
>> Do you thing the EJB spec should allow an EJB .jar file to have a lib/
>> directory inside it? If yes, will there be any restrictions that we will
>> need to address?
>>
>> Thank you,
>> -marina
>>
>>
>>
>>
>


-- 
Antonio Goncalves
Software architect and Java Champion
Web site <http://www.antoniogoncalves.org> |
Twitter<http://twitter.com/agoncal>|
Blog <http://feeds.feedburner.com/AntonioGoncalves> |
LinkedIn<http://www.linkedin.com/in/agoncal>| Paris
JUG <http://www.parisjug.org>