A custom resource specifies a custom server-wide resource object factory that implements the javax.naming.spi.ObjectFactory interface. There is no specific JNDI parent context for external JNDI resources, except for the standard java:comp/env/.
Create a custom resource in one of these ways:
To create a custom resource using the Admin Console, open the Resources component, open the JNDI component, and select Custom Resources. For details, click the Help button in the Admin Console.
To create a custom resource, use the asadmin create-custom-resource command. For details, see the Sun GlassFish Enterprise Server v2.1.1 Reference Manual.