Thanks Aaron, Krish and to all that have been working with me on the
problem. I got things working finally. What I ended up with is my JMS
resources deployed at the application level instead of server wide,
which will work just fine for me. My working config looked like this.
WorkJ2EE.ear consisting of
/META-INF/
application.xml
geronimo-application.xml
MANIFEST.MF
activemq-ra-3.2.1.rar
geronimo-ra.xml
WorkJ2EEEJB.jar
WorrkJ2EEWEB.war
The WorkJ2EEEJB.jar contains my ejb-jar.xml and my openejb-jar.xml.
Thanks again, :)
Todd
Aaron Mulder wrote:
OK, to back up a bit, it sounds like you have an EAR with an EJB JAR
and a JMS resource (ActiveMQ RAR).
In order to get this running, you need a Geronimo deployment plan for
the EJB JAR and a Geronimo deployment plan for the RAR. In some
scenarios, you also require a Geronimo plan for the EAR.
There are several ways to associate the deployment plans with the
modules they go with:
1) Put EJB plan at META-INF/openejb-jar.xml in EJB JAR, and put the
RAR plan at META-INF/geronimo-ra.xml in the RAR file
2) Put EJB plan somewhere in EAR, put RAR plan somewhere in EAR, use a
Geronimo plan for the EAR, and have module entries in the EAR plan for
both JAR and RAR, where each module entry points to both the archive
and the plan for the module (with paths specified relative to the root
of the EAR).
3) Instead of saving the JAR and RAR plan in separate files, write a
Geronimo plan for the EAR that embeds the content that would normally
go in the JAR and RAR plan into the module entry for the JAR and the
RAR. This way there's only one plan, but it effectively contains the
content for all 3 plans.
4) Some mixture of the above, for example, EJB plan in EJB JAR but RAR
plan in EAR -- this will require a Geronimo plan for the EAR because
both options 2 and 3 require it, but it may only have one module entry
if one of the modules uses strategy 1.
All of the options will work if the plans are written correctly. It
is critical to use the correct namespace for each plan (xmlns
attribute of the main element for the plan), regardless of whether
they're saved separately, or embedded in a single EAR plan. If there
are namespace errors, then you get those slightly misleading messages
saying that a Geronimo deployment plan is required.
Thanks,
Aaron
On 2/20/06, Todd Mason <[EMAIL PROTECTED]> wrote:
Thanks for the clarification. I'm changing too many things at once and
getting myself confused. :~)
Where do I put my "Plan" file if I opt not to use a "openejb-jar.xml" to
describe my Geronimo specific settings for my message bean? And if I
have a "plan" file that describes my ejb and its resources such as
follows how do I deploy it?
Thanks for your patience.
Todd
My plan file.
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
configId="silverglobe/ejb/WorkJ2EE/car">
<!--
##
## EJB module
## Module Definition
##
##
-->
<module>
<ejb>WorkJ2EEEJB.jar</ejb>
<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
configId="WorkTODDEJBs"
>
<enterprise-beans>
<message-driven>
<ejb-name>MDB1</ejb-name>
<resource-adapter>
<resource-link>SGJMS</resource-link>
</resource-adapter>
<activation-config>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>SGQueue1</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>acknowledgeMode</activation-config-property-name>
<activation-config-property-value>Auto-acknowledge</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>SubscriptionDurability</activation-config-property-name>
<activation-config-property-value>NonDurable</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
</enterprise-beans>
</openejb-jar>
</module>
<ext-module>
<connector>SGJMS</connector>
<external-path>activemq/activemq-ra/3.2.1/rar</external-path>
<connector
xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"
configId="SGJMS">
<resourceadapter>
<!-- how to connect to the JMS Server -->
<resourceadapter-instance>
<resourceadapter-name>SGJMS</resourceadapter-name>
<config-property-setting
name="ServerUrl">tcp://localhost:61616</config-property-setting>
<config-property-setting name="UserName">not
needed</config-property-setting>
<config-property-setting name="Password">not
needed</config-property-setting>
<workmanager>
<gbean-link>DefaultWorkManager</gbean-link>
</workmanager>
</resourceadapter-instance>
<!-- defines a ConnectionFactory -->
<outbound-resourceadapter>
<connection-definition>
<connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
<connectiondefinition-instance>
<name>jms/SGQueueConnectionFactory</name>
<implemented-interface>javax.jms.QueueConnectionFactory</implemented-interface>
<connectionmanager>
<xa-transaction>
<transaction-caching/>
</xa-transaction>
<single-pool>
<max-size>10</max-size>
<min-size>0</min-size>
<blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
<idle-timeout-minutes>0</idle-timeout-minutes>
<match-one/>
</single-pool>
</connectionmanager>
</connectiondefinition-instance>
</connection-definition>
<connection-definition>
<connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
<connectiondefinition-instance>
<name>jms/SGTopicConnectionFactory</name>
<implemented-interface>javax.jms.TopicConnectionFactory</implemented-interface>
<connectionmanager>
<xa-transaction>
<transaction-caching/>
</xa-transaction>
<single-pool>
<max-size>10</max-size>
<min-size>0</min-size>
<blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
<idle-timeout-minutes>0</idle-timeout-minutes>
<match-one/>
</single-pool>
</connectionmanager>
</connectiondefinition-instance>
</connection-definition>
</outbound-resourceadapter>
</resourceadapter>
<adminobject>
<adminobject-interface>javax.jms.Topic</adminobject-interface>
<adminobject-class>org.codehaus.activemq.message.ActiveMQTopic</adminobject-class>
<adminobject-instance>
<message-destination-name>SGTopic1</message-destination-name>
<config-property-setting
name="PhysicalName">SGTopic1</config-property-setting>
</adminobject-instance>
</adminobject>
<adminobject>
<adminobject-interface>javax.jms.Queue</adminobject-interface>
<adminobject-class>org.codehaus.activemq.message.ActiveMQQueue</adminobject-class>
<adminobject-instance>
<message-destination-name>SGQueue1</message-destination-name>
<config-property-setting
name="PhysicalName">SGQueue1</config-property-setting>
</adminobject-instance>
</adminobject>
</connector>
</ext-module>
</application>
Aaron Mulder wrote:
For this module:
<module>
<connector>activemq-ra-3.2.1.rar</connector>
<alt-dd>jms-resource-plan.xml</alt-dd>
</module>
Your Geronimo plan (jms-resource-plan.xml) is this:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
configId="silverglobe/ejb/WorkJ2EE/car">
...
But that's not correct -- <application> is for an EAR, and
activemq-ra-3.2.1.rar is a RAR. Your original message had:
My jms-resource-plan.xml file
<connector
xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
xmlns:naming="http://geronimo.apache.org/xml/ns/naming"
configId="com/silverglobe/SGJMSResources"
parentId="geronimo/activemq-broker/1.0/car"
>
Which is the correct type of plan for a RAR. I'm not sure how things
got confused between your first message and the most recent one.
Thanks,
Aaron
On 2/20/06, Todd Mason <[EMAIL PROTECTED]> wrote:
Aaron,
I'm afraid I didn't follow you, are one of my files supposed to be a rar?
Todd
Aaron Mulder wrote:
Your "JMS resource plan" is an EAR plan not a RAR plan -- if that's
not a typo then it's probably the problem.
Aaron
On 2/20/06, Todd Mason <[EMAIL PROTECTED]> wrote:
David Jencks wrote:
I don't see anything wrong with your plans. For an example you could
look at the daytrader plans in configs/daytrader-*/src/plan/plan.xml
which contain some mdbs and they seem to work fine. I think your jms
stuff is deployed fine, and you are seeing a classloading problem when
the mdb tries to start. However I don't see the cause yet. You could
try imitating the setup of daytrader, where the jms is deployed as an
"external module" in the same configuration as the ear. Similarly you
could construct a "synthetic ear" with both your ejbs and the jms
stuff as external modules. If this worked it might indicate a problem
with our classloading. However I think there are other examples of
mdbs working with the jms deployed separately.
thanks
david jencks
On Feb 17, 2006, at 6:09 PM, Todd Mason wrote:
Hello all,
I'm getting a java.lang.ClassNotFoundException:
org.activemq.ra.ActiveMQActivationSpec exception when I deploy my
message driven bean. I'm using Geronimo 1.0 on XP. As near as I can
tell my JMS resource plan deployed properly, from the console I can
see the resources deployed JMS Factory and Queue, the "test
connection" link also appears to work fine. Is there anything else I
need to do to verify my JMS resources are deployed properly? Does
anyone have a sample openejb-jar.xml file containing a message bean?
Following is my stack trace from my geronimo.log file.
Thanks in advance.
Todd
19:52:59,281 DEBUG [GBeanSingleReference] Waiting to start
geronimo.server:J2EEApplication=WorkJ2EE,J2EEServer=geronimo,j2eeType=WebModule,name=WorkJ2EEWeb.war
because no targets are running for reference J2EEApplication matching
the patterns
geronimo.server:J2EEServer=geronimo,j2eeType=J2EEApplication,name=WorkJ2EE
19:52:59,296 ERROR [GBeanInstanceState] Error while starting; GBean
is now in the FAILED state:
objectName="geronimo.server:EJBModule=WorkJ2EEEJB.jar,J2EEApplication=WorkJ2EE,J2EEServer=geronimo,j2eeType=JCAActivationSpec,name=MDB1"
java.lang.ClassNotFoundException: org.activemq.ra.ActiveMQActivationSpec
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at
org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:209)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at
org.apache.geronimo.connector.ActivationSpecWrapper.<init>(ActivationSpecWrapper.java:65)
at
org.apache.geronimo.connector.ActivationSpecWrapperGBean.<init>(ActivationSpecWrapperGBean.java:42)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:901)
at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:325)
at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:110)
at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:132)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:537)
at
org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:208)
at
org.apache.geronimo.kernel.config.Configuration.startRecursiveGBeans(Configuration.java:315)
at
org.apache.geronimo.kernel.config.Configuration$$FastClassByCGLIB$$7f4b4a9b.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:835)
at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:178)
at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:173)
at
org.apache.geronimo.kernel.config.ConfigurationManagerImpl.start(ConfigurationManagerImpl.java:142)
at
org.apache.geronimo.kernel.config.ConfigurationManagerImpl$$FastClassByCGLIB$$fbed85d2.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:800)
at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:36)
at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
at
org.apache.geronimo.kernel.config.ConfigurationManager$$EnhancerByCGLIB$$aafd0674.start(<generated>)
at
org.apache.geronimo.console.configmanager.DeploymentPortlet.processAction(DeploymentPortlet.java:126)
at
org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:229)
at
org.apache.pluto.core.PortletServlet.doPost(PortletServlet.java:163)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
at
org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at
org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:120)
at
org.apache.pluto.invoker.impl.PortletInvokerImpl.action(PortletInvokerImpl.java:68)
at
org.apache.pluto.PortletContainerImpl.processPortletAction(PortletContainerImpl.java:164)
at
org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.processPortletAction(PortletContainerWrapperImpl.java:82)
at org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:227)
at org.apache.pluto.portalImpl.Servlet.doPost(Servlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:272)
at
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:46)
at
org.apache.geronimo.tomcat.valve.PolicyContextValve.invoke(PolicyContextValve.java:50)
at
org.apache.geronimo.tomcat.valve.TransactionContextValve.invoke(TransactionContextValve.java:53)
at
org.apache.geronimo.tomcat.valve.ComponentContextValve.invoke(ComponentContextValve.java:47)
at
org.apache.geronimo.tomcat.valve.InstanceContextValve.invoke(InstanceContextValve.java:60)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:534)
19:52:59,296 DEBUG [GBeanSingleReference] Waiting to start
geronimo.server:J2EEApplication=WorkJ2EE,J2EEServer=geronimo,j2eeType=EJBModule,name=WorkJ2EEEJB.jar
because no targets are running for reference J2EEApplication matching
the patterns
geronimo.server:J2EEServer=geronimo,j2eeType=J2EEApplication,name=WorkJ2EE
19:52:59,421 DEBUG [GBeanSingleReference] Waiting to start
geronimo.server:EJBModule=WorkJ2EEEJB.jar,J2EEApplication=WorkJ2EE,J2EEServer=geronimo,j2eeType=MessageDrivenBean,name=MDB1
because no targets are running for reference ActivationSpecWrapper
matching the patterns
geronimo.server:EJBModule=WorkJ2EEEJB.jar,J2EEApplication=WorkJ2EE,J2EEServer=geronimo,j2eeType=JCAActivationSpec,name=MDB1
My openejb-jar.xml file
<openejb-jar
xmlns="http://www.openejb.org/xml/ns/openejb-jar"
xmlns:naming="http://geronimo.apache.org/xml/ns/naming"
xmlns:security="http://geronimo.apache.org/xml/ns/security"
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment"
configId="WORKJ2EE" parentId="com/silverglobe/SGJMSResources">
<enterprise-beans>
<message-driven>
<ejb-name>MDB1</ejb-name>
<resource-adapter>
<target-name>geronimo.server:J2EEApplication=null,J2EEServer=geronimo,JCAResource=com/silverglobe/SGJMSResources,j2eeType=JCAManagedConnectionFactory,name=jms/SGQueueConnectionFactory</target-name>
</resource-adapter> <activation-config>
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>SGQueue1</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
</enterprise-beans>
</openejb-jar>
My jms-resource-plan.xml file
<connector
xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
xmlns:naming="http://geronimo.apache.org/xml/ns/naming"
configId="com/silverglobe/SGJMSResources"
parentId="geronimo/activemq-broker/1.0/car"
>
<resourceadapter>
<!-- how to connect to the JMS Server -->
<resourceadapter-instance>
<resourceadapter-name>SGJMSResources</resourceadapter-name>
<config-property-setting
name="ServerUrl">tcp://localhost:61616</config-property-setting>
<config-property-setting name="UserName">not
needed</config-property-setting>
<config-property-setting name="Password">not
needed</config-property-setting>
<workmanager>
<gbean-link>DefaultWorkManager</gbean-link>
</workmanager>
</resourceadapter-instance>
<!-- defines a ConnectionFactory -->
<outbound-resourceadapter>
<connection-definition>
<connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
<connectiondefinition-instance>
<name>jms/SGQueueConnectionFactory</name>
<implemented-interface>javax.jms.QueueConnectionFactory</implemented-interface>
<connectionmanager>
<xa-transaction>
<transaction-caching />
</xa-transaction>
<single-pool>
<max-size>10</max-size>
<min-size>0</min-size>
<blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
<idle-timeout-minutes>0</idle-timeout-minutes>
<match-one/>
</single-pool>
</connectionmanager>
</connectiondefinition-instance>
</connection-definition>
<connection-definition>
<connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
<connectiondefinition-instance>
<name>jms/SGTopicConnectionFactory</name>
<implemented-interface>javax.jms.TopicConnectionFactory</implemented-interface>
<connectionmanager>
<xa-transaction>
<transaction-caching />
</xa-transaction>
<single-pool>
<max-size>10</max-size>
<min-size>0</min-size>
<blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
<idle-timeout-minutes>0</idle-timeout-minutes>
<match-one/>
</single-pool>
</connectionmanager>
</connectiondefinition-instance>
</connection-definition>
</outbound-resourceadapter>
</resourceadapter>
<adminobject>
<adminobject-interface>javax.jms.Topic</adminobject-interface>
<adminobject-class>org.codehaus.activemq.message.ActiveMQTopic</adminobject-class>
<adminobject-instance>
<message-destination-name>SGTopic1</message-destination-name>
<config-property-setting
name="PhysicalName">SGTopic1</config-property-setting>
</adminobject-instance>
</adminobject>
<adminobject>
<adminobject-interface>javax.jms.Queue</adminobject-interface>
<adminobject-class>org.codehaus.activemq.message.ActiveMQQueue</adminobject-class>
<adminobject-instance>
<message-destination-name>SGQueue1</message-destination-name>
<config-property-setting
name="PhysicalName">SGQueue1</config-property-setting>
</adminobject-instance>
</adminobject>
</connector>
David,
Thanks for the ideas,
What I tried today, without much luck is to deploy as an external module
in the same ear. I'm getting a different error at least!
I get this error on deploy.
Error: Unable to distribute WorkJ2EE.ear: A connector module must be
deployed using a Geronimo deployment plan (either
META-INF/geronimo-ra.xml in the RAR file or a standalone deployment
plan passed to the deployer).
Any thoughts?
Thanks,
Todd
My ear file looks like this.
META-INF
application.xml
geronimo-application.xml
MANIFEST.MF
activemq-ra-3.2.1.rar
jms-resource-plan.xml
WorkJ2EEEJB.jar
WorkJ2EEWeb.jar
My application.xml contents.
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<display-name>WorkJ2EE</display-name>
<module id="myeclipse.1140210775968">
<web>
<web-uri>WorkJ2EEWeb.war</web-uri>
<context-root>/WorkJ2EEWeb</context-root>
</web>
</module>
<module id="myeclipse.1140210776515">
<ejb>WorkJ2EEEJB.jar</ejb>
</module>
<module>
<connector>activemq-ra-3.2.1.rar</connector>
</module>
</application>
My geronimo-application.xml contents.
<?xml version="1.0" encoding="UTF-8"?>
<application
xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
configId="MyApplication">
<module>
<connector>activemq-ra-3.2.1.rar</connector>
<alt-dd>jms-resource-plan.xml</alt-dd>
</module>
</application>
My jms-resource-plan.xml file.
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
configId="silverglobe/ejb/WorkJ2EE/car">
<!--
##
## EJB module
## Module Definition
##
##
-->
<module>
<ejb>WorkJ2EEEJB.jar</ejb>
<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
configId="WorkTODDEJBs"
>
<enterprise-beans>
<message-driven>
<ejb-name>MDB1</ejb-name>
<resource-adapter>
<resource-link>SGJMS</resource-link>
</resource-adapter>
<activation-config>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>TradeStreamerQueue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>acknowledgeMode</activation-config-property-name>
<activation-config-property-value>Auto-acknowledge</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>SubscriptionDurability</activation-config-property-name>
<activation-config-property-value>NonDurable</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
</enterprise-beans>
</openejb-jar>
</module>
<ext-module>
<connector>SGJMS</connector>
<external-path>activemq/activemq-ra/3.2.1/rar</external-path>
<connector
xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"
configId="SGJMS">
<resourceadapter>
<!-- how to connect to the JMS Server -->
<resourceadapter-instance>
<resourceadapter-name>TradeJMSResources</resourceadapter-name>
<config-property-setting
name="ServerUrl">tcp://localhost:61616</config-property-setting>
<config-property-setting name="UserName">not
needed</config-property-setting>
<config-property-setting name="Password">not
needed</config-property-setting>
<workmanager>
<gbean-link>DefaultWorkManager</gbean-link>
</workmanager>
</resourceadapter-instance>
<!-- defines a ConnectionFactory -->
<outbound-resourceadapter>
<connection-definition>
<connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
<connectiondefinition-instance>
<name>jms/SGQueueConnectionFactory</name>
<implemented-interface>javax.jms.QueueConnectionFactory</implemented-interface>
<connectionmanager>
<xa-transaction>
<transaction-caching/>
</xa-transaction>
<single-pool>
<max-size>10</max-size>
<min-size>0</min-size>
<blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
<idle-timeout-minutes>0</idle-timeout-minutes>
<match-one/>
</single-pool>
</connectionmanager>
</connectiondefinition-instance>
</connection-definition>
<connection-definition>
<connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
<connectiondefinition-instance>
<name>jms/SGTopicConnectionFactory</name>
<implemented-interface>javax.jms.TopicConnectionFactory</implemented-interface>
<connectionmanager>
<xa-transaction>
<transaction-caching/>
</xa-transaction>
<single-pool>
<max-size>10</max-size>
<min-size>0</min-size>
<blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
<idle-timeout-minutes>0</idle-timeout-minutes>
<match-one/>
</single-pool>
</connectionmanager>
</connectiondefinition-instance>
</connection-definition>
</outbound-resourceadapter>
</resourceadapter>
<adminobject>
<adminobject-interface>javax.jms.Topic</adminobject-interface>
<adminobject-class>org.codehaus.activemq.message.ActiveMQTopic</adminobject-class>
<adminobject-instance>
<message-destination-name>TradeStreamerTopic</message-destination-name>
<config-property-setting
name="PhysicalName">TradeStreamerTopic</config-property-setting>
</adminobject-instance>
</adminobject>
<adminobject>
<adminobject-interface>javax.jms.Queue</adminobject-interface>
<adminobject-class>org.codehaus.activemq.message.ActiveMQQueue</adminobject-class>
<adminobject-instance>
<message-destination-name>TradeBrokerQueue</message-destination-name>
<config-property-setting
name="PhysicalName">TradeBrokerQueue</config-property-setting>
</adminobject-instance>
</adminobject>
</connector>
</ext-module>
</application>