glassfish-ejb-jar.xml and sun-ejb-jar.xml examples

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

sun-ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd">
<sun-ejb-jar>
<enterprise-beans>
<ejb>
<ejb-name>FooBean</ejb-name>
<jndi-name>FooBean</jndi-name>
<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>
<ejb-ref>
<ejb-ref-name>ejb/BuzBean</ejb-ref-name>
<jndi-name>corbaname:iiop:otherserver:3700#BuzBean</jndi-name>
</ejb-ref>
<resource-ref>
<res-ref-name>jdbc/employee</res-ref-name>
<jndi-name>jdbc/__default</jndi-name>
</resource-ref>
</ejb>
</enterprise-beans>
</sun-ejb-jar>
glassfish-ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-ejb-jar PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 EJB 3.1//EN" "http://glassfish.org/dtds/glassfish-ejb-jar_3_1-1.dtd">
<glassfish-ejb-jar>
<enterprise-beans>
<ejb>
<ejb-name>FooBean</ejb-name>
<jndi-name>FooBean</jndi-name>
<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>
<ejb-ref>
<ejb-ref-name>ejb/BuzBean</ejb-ref-name>
<jndi-name>corbaname:iiop:otherserver:3700#BuzBean</jndi-name>
</ejb-ref>
<resource-ref>
<res-ref-name>jdbc/employee</res-ref-name>
<jndi-name>jdbc/__default</jndi-name>
</resource-ref>
</ejb>
</enterprise-beans>
</glassfish-ejb-jar>

Followers

Pageviews Last 7 Days