dev@glassfish.java.net

Re: questions about directory deployment in v3

From: Tim Quinn <Timothy.Quinn_at_Sun.COM>
Date: Wed, 22 Oct 2008 15:52:36 -0500

Sorry, I did not notice the original posting, Vince.

Marina Vatkina wrote:
> I don't think we explode jars in the lib directory (either in an ear
> or a war).
Marina is correct; currently neither v2 nor v3 prelude expands library
JARs, nor does it expect them to be pre-expanded for directory deployment.

The guiding principle - at least up to now - is to expand submodules
nested within EARs (such as WARs, EJBs, etc.) but to leave other JARs alone.

I am not sure if much thinking has gone into whether it makes sense to
treat EJB JARs inside a WAR as a "submodule" in the same sense, at least
as far as directory deployment is concerned. One possible wrinkle is
that, historically, the submodule JAR has been expanded into a
directory which resides in the same place as the original JAR file. If
v3 followed that approach then, for the EJB-in-WAR case, the directory
structure would change from this:

WEB-INF/lib/myejbs.jar

to this

WEB-INF/lib/myejbs_jar/x/y/z.class (or something like that)

and so now we have broken the rule that items in WEB-INF/lib are JARs.

There might be other changes in how archives are handled in v3 that
might open the door to doing something with this. I like the idea of
avoiding JARring up the EJBs in the development environment if it's
avoidable but I think this needs more careful thought than I've been
able to give to it here.

How about opening an enhancement request?

- Tim
>
> -marina
>
> Vince Kraemer wrote:
>> It looks like Java EE 6 will allow web apps to contain EJB
>> implementations. When the EJBs are in the classes directory, it is
>> pretty obvious how this will affect directory deployment and how an
>> IDE might leverage that capability of v3.
>>
>> In the situation where the web app's lib directory contains a jar
>> that has EJBs in it (which makes the web app kind of earrish, to my
>> way of thinking)... will there be a way to eliminate the jar creation
>> step of the build?
>>
>> For example, in the v2/ear case, a developer can eliminate the jar
>> packaging step when they build an ear that contains a web app and an
>> ejb-jar... by carefully setting the destdir attribute of their javac
>> task... http://ant.apache.org/manual/CoreTasks/javac.html
>>
>> It would be nice to be able to do something like this for earrish web
>> apps in v3...
>>
>> What is the current thinking in this area?
>>
>> vbk
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>