This short screencast demonstrates the new application-scoped resources feature available starting with Milestone 4 of GlassFish 3.1 (the demo used promoted build #17). Such resources are bound to a module (war, ear, ejb) and as such they are created on deploy and destroyed when the module is undeployed. They are defined in a file called glassfish-resources.xml (schema-constrained) and shipped with the archive.

These resources are available only from the application they "belong" to which offers some level of security, more configuration flexibility (no resource name collision and different settings for different applications) as well as some level of performance isolation. They overall provide a single click/single deploy

More details such as full demo description, application-scoped vs. module-scoped, location of glassfish-resources.xml and more are available from Feature one-pager (GlassFish Wiki) and Application Scoped Resources (Demo instructions).

Read More about [New GlassFish 3.1 Screencast: Application-scoped resources...