Author |
Message
|
saiprash |
Posted: Sat Nov 22, 2008 3:11 am Post subject: MDB deployed in WebLogic and Queues in IBM MQ |
|
|
Newbie
Joined: 22 Nov 2008 Posts: 3
|
Hi all,
I have a MDB which is deployed in Weblogic 10.0 and created queues in IBM MQ 6. The state of MDB is active. But its not picking up the messages from the Queue. And there is no expection thrown also in the Web Logic log file.
To test the MQ series binding file, i created a standalone client, which puts and picks the message. It works fine.
And the MDB if deployed in OC4J, picks the messages and processes. So MDB also working fine. So I think i have missed out some configuration. Can anyone tell what i have missed out.
Please help me out in this.
Thanks in advance.
Steps used are:
1.Deployed jms-xa-adp.rar file in OC4J.
Code: |
<?xml version="1.0" encoding="UTF-8"?>
<connector>
<display-name>Weblogic Messaging Bridge Adapter (XA)</display-name>
<vendor-name>BEA System</vendor-name>
<spec-version>1.0</spec-version>
<eis-type>JMS Service</eis-type>
<version>1.0.2</version>
<resourceadapter>
<managedconnectionfactory-class>weblogic.jms.adapter.JMSManagedConnectionFactory</managedconnectionfactory-class>
<connectionfactory-interface>weblogic.jms.bridge.AdapterConnectionFactory</connectionfactory-interface>
<connectionfactory-impl-class>weblogic.jms.adapter.JMSBaseConnectionFactory</connectionfactory-impl-class>
<connection-interface>weblogic.jms.bridge.AdapterConnection</connection-interface>
<connection-impl-class>weblogic.jms.adapter.JMSBaseConnection</connection-impl-class>
<transaction-support>XATransaction</transaction-support>
<config-property>
<config-property-name>ConnectionURL</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>file:/C:/JNDIDirectory</config-property-value>
</config-property>
<config-property>
<config-property-name>InitialContextFactory</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>com.sun.jndi.fscontext.RefFSContextFactory</config-property-value>
</config-property>
<config-property>
<config-property-name>ConnectionFactoryJNDI</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>WLReceiverQCF</config-property-value>
</config-property>
<config-property>
<config-property-name>DestinationJNDI</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>WLReceiverQueue</config-property-value>
</config-property>
<config-property>
<config-property-name>DestinationType</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>Queue</config-property-value>
</config-property>
<config-property>
<config-property-name>AdapterType</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>XATransaction</config-property-value>
</config-property>
<authentication-mechanism>
<authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
<credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
</authentication-mechanism>
<reauthentication-support>false</reauthentication-support>
</resourceadapter>
</connector>
|
2. Created JMS Module, under it created Foriegn Server, Inside that created Connection factories and Destinations.
3.Deployed the MDB.
weblogic-ejb-jar.xml
Code: |
<?xml version="1.0"?>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<!-- EJB Reference Name -->
<ejb-name>MDB_Bean</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>200</max-beans-in-free-pool>
<initial-beans-in-free-pool>5</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>WLReceiverQueue</destination-jndi-name>
<initial-context-factory>com.sun.jndi.fscontext.RefFSContextFactory</initial-context-factory>
<connection-factory-jndi-name>WLReceiverQCF</connection-factory-jndi-name>
</message-driven-descriptor>
<!-- EJB Reference Descriptions STARTS-->
<reference-descriptor>
<!-- EJB Resource Reference Descriptions STARTS-->
<resource-description>
<res-ref-name>FCDEV</res-ref-name>
<jndi-name>FCDEV</jndi-name>
</resource-description>
<resource-description>
<res-ref-name>WLReceiverQCF</res-ref-name>
<jndi-name>WLReceiverQCF</jndi-name>
</resource-description>
<!-- EJB Resource Reference Descriptions ENDS-->
<!-- EJB Resource environment Reference Descriptions STARTS-->
<resource-env-description>
<res-env-ref-name>WLReplyQueue</res-env-ref-name>
<jndi-name>WLReplyQueue</jndi-name>
</resource-env-description>
<resource-env-description>
<res-env-ref-name>WLDLQQueue</res-env-ref-name>
<jndi-name>WLDLQQueue</jndi-name>
</resource-env-description>
<!-- EJB Resource environment Reference Descriptions ENDS-->
</reference-descriptor>
<!-- EJB Reference Descriptions ENDS-->
</weblogic-enterprise-bean>
</weblogic-ejb-jar> |
ejb-jar.xml
Code: |
<?xml version="1.0"?>
<enterprise-beans>
<message-driven>
<display-name>MDB Bean</display-name>
<ejb-name>MDB_Bean</ejb-name>
<ejb-class>com.mdb.MDBBean</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<env-entry>
<env-entry-name>propertyPath</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>D:/MDB/config/</env-entry-value>
</env-entry>
<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>DestinationName</activation-config-property-name>
<activation-config-property-value>WLReceiverQueue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>ConnectionFactoryJndiName</activation-config-property-name>
<activation-config-property-value>WLReceiverQCF</activation-config-property-value>
</activation-config-property>
</activation-config>
<resource-ref>
<description>Connection Factory for Response / DLQ</description>
<res-ref-name>WLReceiverQCF</res-ref-name>
<res-type>javax.jms.XAQueueConnectionFactory</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-env-ref>
<description>Queue to send reply to</description>
<resource-env-ref-name>WLReplyQueue</resource-env-ref-name>
<resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
</resource-env-ref>
<resource-env-ref>
<description>MDB Dead Letter Queue</description>
<resource-env-ref-name>WLDLQQueue</resource-env-ref-name>
<resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
</resource-env-ref>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MDB_Bean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
|
|
|
Back to top |
|
 |
atheek |
Posted: Sat Nov 22, 2008 3:55 am Post subject: |
|
|
 Partisan
Joined: 01 Jun 2006 Posts: 327 Location: Sydney
|
Quote: |
<destination-jndi-name>WLReceiverQueue</destination-jndi-name>
<initial-context-factory>com.sun.jndi.fscontext.RefFSContextFactory</initial-context-factory>
<connection-factory-jndi-name>WLReceiverQCF</connection-factory-jndi-name> |
Are you sure the correct jndi is provided for destination and queue.
The destination and connection factory jndi name should be the same as the local jndi names in the foreign jms setup. Also you don't have to specify the initial context factory in weblogic-ejb.jar. It will be specified in the configuration for foreign jms server.
From the jndi names you provided (WLReceiverQueue and WLReceiverQCF), I have a feeling you have configured the mdb to listen to a local weblogic jms queue rather than the MQ. |
|
Back to top |
|
 |
saiprash |
Posted: Tue Nov 25, 2008 4:30 am Post subject: |
|
|
Newbie
Joined: 22 Nov 2008 Posts: 3
|
Hi,
Thanks alot for the reply. Here this is the local JNDI name of the QCF and Queue names. I tried using the remote name, but still dint work.
Which are we suppose to give here.
My local JNDI QCF name: WLReceiverQCF
My Remote JNDI QCF, which is in binding file: MDQCF
My Local In Queue:WLReceiverQueue
My Remote In Queue, which is in MQ:MDB_IN_QUEUE
My Local Out Queue:WLReplyQueue
My Local Remote Queue, which is in MQ:MDB_OUT_QUEUE
Can u please help me on this |
|
Back to top |
|
 |
atheek |
Posted: Thu Nov 27, 2008 2:20 am Post subject: |
|
|
 Partisan
Joined: 01 Jun 2006 Posts: 327 Location: Sydney
|
You need to specify local jndi names only ie. WLReceiverQCF and WLReceiverQ.
Check server jndi tree and ensure these are there. In WLS 9.2 I have seen the local jndi names appear in the server jndi tree with a "!" mark, which would cause a similar situation. A bounce of the server would fix that issue.
I really doubt this is the case for you. You might have missed some steps in the configuration. Double check to ensure. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Nov 27, 2008 4:13 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Did you bind the information in the .bindings file into the WL JNDI context?
This way you only specify WL aware JNDI components when setting up your MDB.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
saiprash |
Posted: Fri Nov 28, 2008 3:37 am Post subject: |
|
|
Newbie
Joined: 22 Nov 2008 Posts: 3
|
Hi all,
Thanks for the help.Problem is solved.
Issues were with my config files(weblogic-ejb-jar.xml and ejb-jar.xml)
In ejb-jar.xml,
Code: |
<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>DestinationName</activation-config-property-name>
<activation-config-property-value>WLReceiverQueue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>ConnectionFactoryJndiName</activation-config-property-name>
<activation-config-property-value>WLReceiverQCF</activation-config-property-value>
</activation-config-property>
</activation-config>
|
is not required.
And in weblogic-ejb-jar.xml
Code: |
<initial-context-factory>com.sun.jndi.fscontext.RefFSContextFactory</initial-context-factory>
|
|
|
Back to top |
|
 |
Mani744 |
Posted: Mon Jan 21, 2013 3:58 am Post subject: |
|
|
Newbie
Joined: 21 Jan 2013 Posts: 1
|
Hi saiPrakash,
I am also looking for the same requirement can u plz share the code,it will help me a lot.
Thanks in advance
Mani |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jan 21, 2013 6:21 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Mani744 wrote: |
I am also looking for the same requirement |
Same requirement, if it's the same platform as the OP was using I've found your problem....
Mani744 wrote: |
can u plz share the code,it will help me a lot. |
Given that the OP has not posted anything since this thread 4 years ago, I'd not hold my breath waiting. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|