users@glassfish.java.net

Re: How do I use glassfish to bind a java.net.URL Resource Reference

From: Cheng Fang <Cheng.Fang_at_Sun.COM>
Date: Wed, 24 Oct 2007 21:32:46 -0400

You only need to add a <resource-ref> element to sun-web.xml (or
sun-ejb-jar.xml if the resource is declared in EJB) to bind it. No need
to do it administratively.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application
Server 9.0 Servlet 2.5//EN"
"http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_5-0.dtd">
<sun-web-app>
    <resource-ref>
        <res-ref-name>url/glassfish</res-ref-name>
        <jndi-name>https://glassfish.dev.java.net/</jndi-name>
    </resource-ref>
</sun-web-app>

-cheng