dev@glassfish.java.net

[v3 ACTION] - all module owners, but esp. for owners of ejb, jms, web modules

From: Tim Quinn <Timothy.Quinn_at_Sun.COM>
Date: Tue, 29 Sep 2009 09:04:05 -0500

Hi, everyone.

There is an error in core/kernel ServerContentImpl. Based on a very
quick scan of the source code I suspect the ejb, jms, and web (and app
client deployment) modules could be susceptible to this. (I did not
inspect the source code in the grep hits below so some might be false
positives.) Please, everyone check your own modules to be sure. Look
for places you inject ServerContext (or look it up explicitly from the
habitat).

The getInstallRoot method of ServerContext is intended to return the
directory into which GlassFish was installed. The implementation does
not work correctly if the domain is created with a non-default directory.

I plan to check in a fix for this soon (I have already consulted with
Jerome on this). You will not need to change your source code. The
behavior should not change for domains created with the default domain
directory, and it should begin working correctly for a domain created
with a non-default directory.

Thanks.

- Tim

(Here is the grep output I used to highlight possible places in the
source that use this method.)

        File mejbArchive = new File(serverContext.getInstallRoot(),
./ejb/ejb-connector/src/main/java/org/glassfish/ejb/mejb/MEJBNamingObjectProxy.java
                File root = sc.getInstallRoot();
./ejb/ejb-container/src/main/java/com/sun/ejb/containers/EjbContainerUtilImpl.java
            brokerHomeDir =
getServerEnvironment().getDomainRoot()//ApplicationServer.getServerContext().getInstallRoot()
./jms/jms-core/src/main/java/com/sun/enterprise/connectors/jms/system/ActiveJmsResourceAdapter.java
        File root = _serverContext.getInstallRoot();
./web/web-glue/src/main/java/com/sun/enterprise/web/WebContainer.java
        File root = serverContext.getInstallRoot();
./web/web-glue/src/main/java/org/glassfish/web/WebEntityResolver.java