users@glassfish.java.net

Where should the sun/glassfish-resources.xml file be placed?

From: Dan Kaplan <dank_at_mirthcorp.com>
Date: Wed, 12 Mar 2014 13:19:05 -0700

The guide
https://glassfish.java.net/docs/4.0/application-deployment-guide.pdf has
details but I don't understand them:

> An application-scoped resource is defined in the
> glassfish-resources.xml deployment descriptor file. This file is placed
in the
> META-INF directory of the module or application archive. For web
applications or
> modules, this file is placed in the WEB-INF directory. If any submodule
archives of an
> enterprise application archive have their own glassfish-resources.xml
files, the
> resource definitions are scoped to those modules only. For more
information about the
> glassfish-resources.xml file, see GlassFish Server Deployment Descriptor
Files and
> Elements of the GlassFish Server Deployment Descriptors.

Right now I have a sun-resources.xml file in my EJB jar but on deploy of my
ear, I get this error:

[2014-03-12T13:15:52.507-0700] [glassfish 4.0] [SEVERE] []
[javax.enterprise.system.container.ejb.mdb.org.glassfish.ejb.mdb] [tid:
_ThreadID=445 _ThreadName=admin-listener(10)] [timeMillis: 1394655352507]
[levelValue: 1000] [[
  com.sun.appserv.connectors.internal.api.ConnectorRuntimeException
com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Invalid
destination jms/AgentMDB for MDB: JNDI name not found
        at
com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter.getPhysicalDestinationFromConfiguration(ActiveJmsResourceAdapter.java:2157)

This same sun-resources.xml file works without issue when I deploy it to
GF2. I'm wondering if I put my sun-resources.xml file in the wrong
location. It's at /ejb.jar/META-INF/sun-resources.xml Should it be under
/META-INF/sun-resources.xml?

I don't see a log message that says it attempted to read that file.

-- 
Thanks,
Dan
-- 
CONFIDENTIALITY NOTICE: The information contained in this electronic 
transmission may be confidential. If you are not an intended recipient, be 
aware that any disclosure, copying, distribution or use of the information 
contained in this transmission is prohibited and may be unlawful. If you 
have received this transmission in error, please notify us by email reply 
and then erase it from your computer system.