Hi all. I'm trying to test a JCA Adapter I've written, and I've been using Glassfish v 2 as my applicaiton container. I've been successfully making outbound connections, and I'm trying to test my inbound connections. I've attached my ra.xml file, and here's the bit with the inbound spec
<inbound-resourceadapter>
<messageadapter>
<messagelistener>
<messagelistener-type>com.intecbilling.connector.TreEventListener</messagelistener-type>
<activationspec>
<activationspec-class>com.intecbilling.connector.TreEventActivationSpec</activationspec-class>
<required-config-property>
<config-property-name>ConnectionAddress</config-property-name>
<config-property-name>EventPatterns</config-property-name>
</required-config-property>
</activationspec>
</messagelistener>
</messageadapter>
</inbound-resourceadapter>
I've defined the interface TreEventListener, and the class TreEventActivationSpec, and the RAR file deploys fine into glassfish. As I mentioned, I can create Connection from connection pools with no worries.
So I've defined a new Enterprise application, containing a single Message-Driven Bean. I've defined the MDB as follows:
@MessageDriven(
name="TreEventBean",
messageListenerInterface=com.intecbilling.connector.TreEventListener.class,
activationConfig={
@ActivationConfigProperty(propertyName="ConnectionAddress",propertyValue="jca/SVConnector1"),
@ActivationConfigProperty(propertyName="EventPatterns",propertyValue="myPattern")
}
)
public class TreEventBean implements TreEventListener {
/**
* Method that will be called by the inbound Tre Event handler
*/
public void handleEvent(String eventName, List paramList) throws ResourceException {
System.out.println("In MDB: " + eventName + " with params " + paramList.toString());
}
}
When I go to deploy this application, I get the following errors in the server log:
[#|2007-09-14T10:14:45.698+1000|SEVERE|sun-appserver9.1|javax.enterprise.system.container.ejb.mdb|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;TreEventBean;com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : ;_RequestID=ea7f5ede-8571-47d7-a6fc-2119d9091c9f;|MDB00017: [TreEventBean]: Exception in creating message-driven bean container: [com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : ]|#]
[#|2007-09-14T10:14:45.699+1000|SEVERE|sun-appserver9.1|javax.enterprise.system.container.ejb.mdb|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;_RequestID=ea7f5ede-8571-47d7-a6fc-2119d9091c9f;|com.sun.enterprise.connectors.ConnectorRuntimeException
com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created :
at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.getPhysicalDestinationFromConfiguration(ActiveJmsResourceAdapter.java:1402)
at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.updateMDBRuntimeInfo(ActiveJmsResourceAdapter.java:1253)
at com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:170)
at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:209)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:280)
at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:535)
at com.sun.enterprise.server.ApplicationLoader.doLoad(ApplicationLoader.java:188)
at com.sun.enterprise.server.TomcatApplicationLoader.doLoad(TomcatApplicationLoader.java:126)
at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:243)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:336)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:210)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:645)
at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:918)
at com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:902)
at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:458)
at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:173)
at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:223)
at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:905)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:577)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:621)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:744)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69)
at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155)
at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122)
at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:174)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:624)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:624)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:624)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:268)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:631)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:562)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:803)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
|#]
[#|2007-09-14T10:14:45.707+1000|SEVERE|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : ;_RequestID=ea7f5ede-8571-47d7-a6fc-2119d9091c9f;|EJB5090: Exception in creating EJB container [com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : ]|#]
[#|2007-09-14T10:14:45.708+1000|SEVERE|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;_RequestID=ea7f5ede-8571-47d7-a6fc-2119d9091c9f;|appId=SVConnectorDemo moduleName=SVConnectorDemo-ejb_jar ejbName=TreEventBean|#]
[#|2007-09-14T10:14:45.709+1000|SEVERE|sun-appserver9.1|javax.enterprise.system.core.classloading|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;_RequestID=ea7f5ede-8571-47d7-a6fc-2119d9091c9f;|LDR5004: UnExpected error occured while creating ejb container
com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created :
at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.getPhysicalDestinationFromConfiguration(ActiveJmsResourceAdapter.java:1402)
at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.updateMDBRuntimeInfo(ActiveJmsResourceAdapter.java:1253)
at com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:170)
at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:209)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:280)
at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:535)
at com.sun.enterprise.server.ApplicationLoader.doLoad(ApplicationLoader.java:188)
at com.sun.enterprise.server.TomcatApplicationLoader.doLoad(TomcatApplicationLoader.java:126)
at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:243)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:336)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:210)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:645)
at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:918)
at com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:902)
at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:458)
at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:173)
at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:223)
at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:905)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:577)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:621)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:744)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69)
at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155)
at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122)
at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:174)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:624)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:624)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:624)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:268)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:631)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:562)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:803)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
|#]
[#|2007-09-14T10:14:45.724+1000|WARNING|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;SVConnectorDemo;_RequestID=ea7f5ede-8571-47d7-a6fc-2119d9091c9f;|CORE5021: Application NOT loaded: [SVConnectorDemo]|#]
[#|2007-09-14T10:14:45.727+1000|WARNING|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=17;_ThreadName=httpWorkerThread-4848-1;Error while loading application [SVConnectorDemo]. Please refer to the server log for more details. ;_RequestID=ea7f5ede-8571-47d7-a6fc-2119d9091c9f;|ADM1075:Error on listening event:[Error while loading application [SVConnectorDemo]. Please refer to the server log for more details. ]|#]
Based on these messages, I'm expecting this application to not be active. But when I look at the admin console, it's there. I have yet to test if I am receiving messages from my message provider, but i'm guessing not (as the ejb container encountered an error when being created... I can't tell if the container was discarded because of the error).
According to the JCA 1.5 specifications, Message-Driven Beans do not have to use JMS anymore. This is what I am trying to test. Is there a reason why Glassfish insists on creating a JMS resource when one is neither specified nor needed?
Thanks for any help,
Ed
[Message sent by forum member 'hildo' (hildo)]
http://forums.java.net/jive/thread.jspa?messageID=235342