dev@glassfish.java.net

directory deployment and global jndi names appear to not play well together...

From: Vince Kraemer <Vince.Kraemer_at_Sun.COM>
Date: Thu, 01 Oct 2009 11:22:12 -0700

Hi.

I am investigating http://www.netbeans.org/issues/show_bug.cgi?id=173440.

The server integration for v3 uses directory deployment to help speed up
development...

The IDE creates a deployment directory called gfdeploy.

It then does the equivalent of 'asadmin deploy --name <app name> gfdeploy'

This deploys the app and in just about every place that we have looked
at to date, the word <app name> is used when referring to the app...
except the global jndi name [and JWS support]

I double checked the situation, by running the deploy with asadmin
against v3 b66 (2009-09-28)

here is the result...

bash-3.2$ date
Thu Oct 1 10:52:42 PDT 2009
bash-3.2$ /export/home/vkraemer/glassfishv3/glassfish/bin/asadmin deploy
--name Examples /tmp/Examples/dist/gfdeploy

Command deploy executed successfully.
bash-3.2$ /export/home/vkraemer/glassfishv3/glassfish/bin/asadmin get
'*.Examples.*'
applications.application.Examples.availability-enabled=false
applications.application.Examples.directory-deployed=true
applications.application.Examples.enabled=true
applications.application.Examples.location=file:/tmp/Examples/dist/gfdeploy/
applications.application.Examples.name=Examples
applications.application.Examples.object-type=user
applications.application.Examples.engine.ear.sniffer=ear
applications.application.Examples.module.Examples-app-client.jar.name=Examples-app-client.jar
applications.application.Examples.module.Examples-app-client.jar.engine.appclient.sniffer=appclient
applications.application.Examples.module.Examples-ejb.jar.name=Examples-ejb.jar
applications.application.Examples.module.Examples-ejb.jar.engine.ejb.sniffer=ejb
applications.application.Examples.module.Examples-ejb.jar.engine.security.sniffer=security
applications.application.Examples.property.default-EE6-app-name=gfdeploy
applications.application.Examples.property.isComposite=true
applications.application.Examples.property.org.glassfish.ejb.container.application_unique_id=82209641347678208
servers.server.server.application-ref.Examples.disable-timeout-in-minutes=30
servers.server.server.application-ref.Examples.enabled=true
servers.server.server.application-ref.Examples.lb-enabled=false
servers.server.server.application-ref.Examples.ref=Examples
servers.server.server.application-ref.Examples.virtual-servers=server

Command get executed successfully.

And here is the relevant log entries...

[#|2009-10-01T10:52:59.160-0700|INFO|glassfish|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=31;_ThreadName=Thread-2;|Portable
JNDI names for EJB HelloWorldBean :
[java:global/gfdeploy/Examples-ejb/HelloWorldBean,
java:global/gfdeploy/Examples-ejb/HelloWorldBean!com.sun.suned.sl355.examples.ejb.session.HelloWorldRemote]|#]

[#|2009-10-01T10:52:59.160-0700|INFO|glassfish|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=31;_ThreadName=Thread-2;|Glassfish-specific
(Non-portable) JNDI names for EJB HelloWorldBean :
[com.sun.suned.sl355.examples.ejb.session.HelloWorldRemote,
com.sun.suned.sl355.examples.ejb.session.HelloWorldRemote#com.sun.suned.sl355.examples.ejb.session.HelloWorldRemote]|#]

[#|2009-10-01T10:52:59.301-0700|INFO|glassfish|javax.enterprise.system.container.appclient.org.glassfish.appclient.server.core|_ThreadID=31;_ThreadName=Thread-2;|ACDEPL103:
Java Web Start services started for the app client
Examples/Examples-app-client.jar (contextRoot:
/gfdeploy/Examples-app-client)|#]

[#|2009-10-01T10:52:59.347-0700|INFO|glassfish|javax.enterprise.system.tools.admin.org.glassfish.server|_ThreadID=31;_ThreadName=Thread-2;|Deployment
of Examples done is 4,313 ms|#]

It looks like there may be a similar issue with the Java Web Start support.

I also checked what happens when the user uses directory deployment for
an EJB jar. In this case the directory has the name jar... but the
global JNDI name appears to use the value from --name....

vbk