Hello,
I had our application developer change the deployment descriptor, redeploy
and test and both the resource adapter and the MDB work perfectly now.
Thank you!
regards,
Conny
Ramesh.Parthasarathy_at_sun.com skrev 13.06.2006 09:21:35 :
> Hi Conny,
>
> There is a bug in the documentation ! The activation config property
> (ConnectionFactoryJndiName) in the mdb deployment descriptor should
> point to the connection factory lookup name (QCF in you case) rather
> than the JMS resource configured in the application server.
>
> So please modify your deployment descriptor to
>
> <activation-config-property-
> name>ConnectionFactoryJndiName</activation-config-property-name>
>
> <activation-config-property-value>QCF</activation-config-property-value>
>
>
> Sorry for the inconvenience, We will fix the documentation soon,
>
> Thanks
> -Ramesh
>
> conny.gyllendahl_at_crosskey.fi wrote:
> >
> >
> > First of all, my apologies if this has already been posten to the list
by
> > someone else.
> >
> > Sun application server 8.1 enterprise edition
> > IBM Websphere MQ 5.3
> > Solaris 10 / sparc
> >
> > We are trying to get an MDB to talk to a Websphere MQ qmgr using the
> > genericra.
> >
> > I have done the following:
> >
> > JMSAdmin:
> > def qcf(QCF) hostname(localhost) port(1414) channel(SYSTEM.DEF.SVRCONN)
> > transport(CLIENT) qmanager(QM1)
> > def q(TQueue) queue(QM1.QUEUE) qmanager(QM1)
> >
> > InitCtx> dis ctx
> >
> > Contents of InitCtx
> >
> > .bindings java.io.File
> > a QCF com.ibm.mq.jms.MQQueueConnectionFactory
> > a TQueue com.ibm.mq.jms.MQQueue
> >
> > 3 Object(s)
> > 0 Context(s)
> > 3 Binding(s), 2 Administered
> >
> > asadmin:
> > asadmin create-resource-adapter-config
> > --property=SupportsXA=false:ProviderIntegrationMode=jndi:
> UserName=###:Password=###:RMPolicy=OnePerPhysicalConnection:
> JndiProperties=java.naming.factory.url.pkgs\\=com.ibm.mq.jms.naming,
> java.naming.factory.initial\\=com.sun.jndi.fscontext.
> RefFSContextFactory,java.naming.provider.url\\=file\\:
> \\/\\/\\/var\\/mqm\\/jndi:LogLevel=finest
> > genericra
> > asadmin create-connector-connection-pool --raname genericra
> > --connectiondefinition javax.jms.QueueConnectionFactory
> > --transactionsupport NoTransaction --property
ConnectionFactoryJndiName=QCF
> > mypool
> > asadmin create-connector-resource --poolname mypool jms/MyQCF
> > asadmin create-admin-object --raname genericra --restype
javax.jms.Queue
> > --property DestinationJndiName=TQueue jms/RequestQ
> >
> > JVM-settings/Classpath suffix:
> > /opt/mqm/java/lib/com.ibm.mq.jar
> > /opt/mqm/java/lib/com.ibm.mqbind.jar
> > /opt/mqm/java/lib/com.ibm.mqjms.jar
> > /opt/mqm/java/lib/providerutil.jar
> > /opt/mqm/java/lib/jndi.jar
> > /opt/mqm/java/lib/fscontext.jar
> >
> > JVM-settings/Native library suffix:
> > /opt/mqm/java/lib
> > /opt/mqm/lib
> >
> > Now, if I'm not completely mistaken this should give the JMS queue
> > jms/RequestQ which would map to the MQ queue QM1.QUEUE
> >
> > Upon starting the application server I get the following errors:
> >
> > [#|2006-06-12T13:36:11.126
> > +0300|FINEST|sun-appserver-ee8.1_02|com.sun.
> genericjmsra|_ThreadID=10;|Properties
> > passed to InitialContext ::
> > {java.naming.provider.url=file:///var/mqm/jndi,
> > java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory,
> > java.naming.security.authentication=none,
> > java.naming.factory.url.pkgs=com.ibm.mq.jms.naming}|#]
> >
> > [#|2006-06-12T13:36:11.168
> > +0300|FINEST|sun-appserver-ee8.1_02|com.sun.
> genericjmsra|_ThreadID=10;|Looking
> > the JNDI name :jms/MyQCF|#]
> >
> > [#|2006-06-12T13:36:11.182
> > +0300|WARNING|sun-appserver-ee8.1_02|javax.enterprise.system.
> stream.err|_ThreadID=10;|javax.resource.spi.InvalidPropertyException:
> > MyQCF
> > at
> > com.sun.genericra.util.ExceptionUtils.
> newInvalidPropertyException(ExceptionUtils.java:40)
> > at
> > com.sun.genericra.util.ObjectBuilderFactory$JndiObjectBuilder.
> createObject(ObjectBuilderFactory.java:89)
> > at
> > com.sun.genericra.util.ObjectBuilder.build(ObjectBuilder.java:90)
> > at
> > com.sun.genericra.inbound.EndpointConsumer.
> initializeAdministeredObjects(EndpointConsumer.java:282)
> > at
> >
com.sun.genericra.inbound.EndpointConsumer.<init>(EndpointConsumer.java:69)
> > at
> > com.sun.genericra.GenericJMSRA.endpointActivation(GenericJMSRA.java:96)
> > at
> > com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.
> setup(ConnectorMessageBeanClient.java:221)
> > at
> > com.sun.ejb.containers.MessageBeanContainer.
> <init>(MessageBeanContainer.java:187)
> > at
> > com.sun.ejb.containers.ContainerFactoryImpl.
> createContainer(ContainerFactoryImpl.java:221)
> > at
> >
com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:477)
> > at
> >
com.sun.enterprise.server.ApplicationLoader.load(ApplicationLoader.java:125)
> > at
> > com.sun.enterprise.server.HttpServiceApplicationLoader.
> load(HttpServiceApplicationLoader.java:97)
> > at
> >
com.sun.enterprise.server.AbstractManager.load(AbstractManager.java:185)
> > at
> > com.sun.enterprise.server.ApplicationLifecycle.
> onStartup(ApplicationLifecycle.java:200)
> > at
> > com.sun.enterprise.server.ApplicationServer.
> onStartup(ApplicationServer.java:300)
> > at com.sun.enterprise.server.PEMain.run(PEMain.java:294)
> > at com.sun.enterprise.server.PEMain.main(PEMain.java:220)
> > Caused by: javax.naming.NameNotFoundException: MyQCF
> > at
> > com.sun.jndi.fscontext.RefFSContext.
> getObjectFromBindings(RefFSContext.java:400)
> > at
> > com.sun.jndi.fscontext.RefFSContext.lookupObject(RefFSContext.java:327)
> > at
> > com.sun.jndi.fscontext.RefFSContext.lookup(RefFSContext.java:146)
> > at com.sun.jndi.fscontext.FSContext.lookup(FSContext.java:127)
> > at javax.naming.InitialContext.lookup(InitialContext.java:351)
> > at
> > com.sun.genericra.util.ObjectBuilderFactory$JndiObjectBuilder.
> createObject(ObjectBuilderFactory.java:87)
> > ... 15 more
> > |#]
> >
> > Is it using the JNDI-settings for the resource adapter to try and look
up
> > jms/MyQCF, which should only be available
> > in the appserver JNDI namespace?
> >
> > I have tried to follow the integration guide but it feels as if I have
made
> > some silly mistake.
> >
> > Here's the sun-ejb-jar.xml:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD
Application
> > Server 8.1 EJB 2.1//EN"
> > "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_2_1-1.dtd">
> >
> > <sun-ejb-jar>
> > <enterprise-beans>
> > <unique-id>1</unique-id>
> > <ejb>
> > <ejb-name>RequestListener</ejb-name>
> > <jndi-name>jms/RequestQ</jndi-name>
> > <ejb-ref>
> > <ejb-ref-name>ejb/WebServiceEJBLocal</ejb-ref-name>
> > <jndi-name>ejb/WebServiceEJBLocal</jndi-name>
> > </ejb-ref>
> > <resource-ref>
> > <res-ref-name>jms/MyQCF</res-ref-name>
> > <jndi-name>jms/MyQCF</jndi-name>
> > </resource-ref>
> > <mdb-connection-factory>
> > <jndi-name>jms/MyQCF</jndi-name>
> > </mdb-connection-factory>
> > <!-- Activation related RA specific configuration for this MDB
-->
> > <mdb-resource-adapter>
> > <resource-adapter-mid>genericra</resource-adapter-mid>
> > <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>ConnectionFactoryJndiName</activation-config-property-name>
> >
> > <activation-config-property-value>jms/MyQCF</activation-config-
> property-value>
> > </activation-config-property>
> > <activation-config-property>
> >
> > <activation-config-property-name>DestinationJndiName</activation-
> config-property-name>
> >
> > <activation-config-property-value>jms/RequestQ</activation-config-
> property-value>
> > </activation-config-property>
> > <activation-config-property>
> >
> > <activation-config-property-name>MaxPoolSize</activation-config-
> property-name>
> >
> > <activation-config-property-value>32</activation-config-property-value>
> > </activation-config-property>
> > <activation-config-property>
> >
> > <activation-config-property-name>RedeliveryAttempts</activation-
> config-property-name>
> >
> > <activation-config-property-value>0</activation-config-property-value>
> > </activation-config-property>
> > <activation-config-property>
> >
> > <activation-config-property-name>ReconnectAttempts</activation-
> config-property-name>
> >
> > <activation-config-property-value>4</activation-config-property-value>
> > </activation-config-property>
> > <activation-config-property>
> >
> > <activation-config-property-name>ReconnectInterval</activation-
> config-property-name>
> >
> > <activation-config-property-value>10</activation-config-property-value>
> > </activation-config-property>
> > <activation-config-property>
> >
> > <activation-config-property-name>RedeliveryInterval</activation-
> config-property-name>
> >
> > <activation-config-property-value>1</activation-config-property-value>
> > </activation-config-property>
> > <activation-config-property>
> >
> > <activation-config-property-name>SendBadMessagesToDMD</activation-
> config-property-name>
> >
> >
<activation-config-property-value>false</activation-config-property-value>
> > </activation-config-property>
> > </activation-config>
> > </mdb-resource-adapter>
> > </ejb>
> > <ejb>
> > <ejb-name>WebServiceEJB</ejb-name>
> > </ejb>
> > </enterprise-beans>
> > </sun-ejb-jar>
> >
> > regards,
> > Conny
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_genericjmsra.dev.java.net
> > For additional commands, e-mail: users-help_at_genericjmsra.dev.java.net
> >
> >
>
> --
>
> Thanks,
> Ramesh
> Extn : 87695
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_genericjmsra.dev.java.net
> For additional commands, e-mail: users-help_at_genericjmsra.dev.java.net
>