10/22/2010

glassfish-application-client.xml and sun-application-client.xml examples

The following glassfish-application-client.xml and sun-application-client.xml have the same content. glassfish-application-client.xml (the new name for sun-application-client.xml) is the file for specifying additional application client (application-client.jar) configuration in GlassFish 3.1.

sun-application-client.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 Application Client 6.0//EN" "http://www.sun.com/software/appserver/dtds/sun-application-client_6_0-0.dtd">
<sun-application-client>
<ejb-ref>
<ejb-ref-name>ejb/BarBean</ejb-ref-name>
<jndi-name>java:global/app-name/module-name/FooBean!com.test.xxx.FooRemote</jndi-name>
</ejb-ref>

<resource-ref>
<res-ref-name>queueConnectionFactory</res-ref-name>
<jndi-name>jms/QueueConnectionFactory</jndi-name>
<default-resource-principal>
<name>guest</name>
<password>guest</password>
</default-resource-principal>
</resource-ref>
</sun-application-client>
glassfish-application-client.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-application-client PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Java EE Application Client 6.0//EN" "http://glassfish.org/dtds/glassfish-application-client_6_0-1.dtd">
<glassfish-application-client>
<ejb-ref>
<ejb-ref-name>ejb/BarBean</ejb-ref-name>
<jndi-name>java:global/app-name/module-name/FooBean!com.test.xxx.FooRemote</jndi-name>
</ejb-ref>

<resource-ref>
<res-ref-name>queueConnectionFactory</res-ref-name>
<jndi-name>jms/QueueConnectionFactory</jndi-name>
<default-resource-principal>
<name>guest</name>
<password>guest</password>
</default-resource-principal>
</resource-ref>
</glassfish-application-client>