When a glsasfish-resources.xml file is included with an application, its
resources are considered only for its usage and hence they cannot setup
any global resources. For setting up global resources, asadmin
add-resources command can be executed with an xml file that creates the
global resources.
On Wednesday 24 August 2011 10:56 PM, Laird Nelson wrote:
> Suppose I wanted to set up the following in glassfish-resources.xml in
> my ear file's META-INF directory:
>
> * A connection pool
> * One JDBC resource pointing at the pool for use by my .ear file
> * One JDBC resource pointing at the pool for use by the JDBC realm
>
> If I did this, and then set up my JDBC realm to point at the last JDBC
> resource, then it would seem to me to be the case that the JDBC realm
> could not actually work, since if I understand correctly the JDBC
> resources created by glassfish-resources.xml are always scoped to the
> application.
>
> Or perhaps I'm missing something? Can glassfish-resources.xml set up
> global connection pools and global JDBC resources that survive
> application undeploys?
>
> Or, conversely, can a JDBC realm point at an application-scoped JDBC
> resource (I would think this would be impossible)?
>
> Thanks,
> Laird
>
> --
> http://about.me/lairdnelson
>