users@glassfish.java.net

Re: Problem with WebStart

From: <glassfish_at_javadesktop.org>
Date: Wed, 26 Sep 2007 08:49:28 PDT

Hi, Piero.

In fact, this is not a problem restricted to the Java Web Start support for app clients but applies to app clients regardless of how they are launched.

This behavior is in GlassFish to preserve an old convenience feature from earlier implementations of the app server. As you probably know, GlassFish creates a generated app client JAR containing what will really be needed to run the app client. For example, this generated app client JAR may included library JARs from the EAR.

To save developers some work the contents of EJB submodules from an EAR have also been included in the generated app client JAR for that EAR for quite a while. This allowed a developer of the client to refer to the remote interfaces (primarily) of the EJBs without having to change the app client's manifest to refer to the EJB module JAR or some other library JAR.

Other users have reported (complained!) that this greatly increases the size of the generated app client JAR file, and because the generated JAR must be expanded into a temporary directory on the client side this significantly slows down the start-up of the client.

I am not sure there is a good workaround for this given the existing code. For example, one idea might be to refactor the EJB JAR to move the sensitive classes into a separate JAR. But the EJB module would then depend on that JAR (through its manifest's Class-Path entry, for example) and the code that creates the generated app client JAR file will detect that and, because the EJB submodule is being included will follow the chain to the separate library JAR and include it also.

One possibility could be for us to add a way (perhaps via a system property setting in the domain.xml) so generated app client JARs would exclude EJB submodules. We cannot make that the default behavior (at least not immediately without advance warning) because we want to remain backward-compatible with apps that might depend on the existing behavior.

If this is a serious problem, as it sounds like it is, please open an issue (use category=deployment because that's where the generated app client JAR is created or category=standalone_client) so we can prioritize it and respond more formally.

Sorry this is creating a problem for you.

- Tim
[Message sent by forum member 'tjquinn' (tjquinn)]

http://forums.java.net/jive/thread.jspa?messageID=237184