Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMS subscription problem

 
rajareddy annavaarm
Ranch Hand
Posts: 96
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using message driven bean and Foreign JMS server to publish messages..When I am submtting a form ,some parameters from that form should be sent to QUEUE.Here publishing works always.But subscription by Message Driven Bean works sometimes and sometimes not.what might be the reason?
 
p anish
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One reason could be for the same queue there might be some other consumers also. Make sure that only your MDB is receiving message from the queue.
Thanks,
Anish
 
rajareddy annavaarm
Ranch Hand
Posts: 96
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my ejb-jar.xml

<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd'>

<ejb-jar>
<display-name>evtEJB</display-name>
<enterprise-beans>
<message-driven>
<ejb-name>LRIALRRSEventSubscriberMDBean</ejb-name>
<ejb-class>com.sns.event.ejb.EventSubscriberMDBean</ejb-class>
<transaction-type>Container</transaction-type>
<!--
<message-selector>EventType = 'CLBILLINGTXN'</message-selector>
-->
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>
javax.jms.Queue
</destination-type>
</message-driven-destination>

<env-entry>
<env-entry-name>LRIALRRSMSG</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>java:comp/env/ejb/alrrs/AutoReplyListenerHome</env-entry-value>
</env-entry>

<ejb-ref>
<ejb-ref-name>ejb/alrrs/AutoReplyListenerHome</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.sns.govt.lri.alrrs.autoreply.interfaces.AutoReplyListenerHome</home>
<remote>com.sns.govt.lri.alrrs.autoreply.interfaces.AutoReplyListener</remote>
<ejb-link>AutoReplyListener</ejb-link>
</ejb-ref>

<resource-ref>
<res-ref-name>jdbc/evtDSLocal</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>LRIALRRSEventSubscriberMDBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
</assembly-descriptor>

</ejb-jar>


weblogic-ejb-jar.xml

<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN' 'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>

<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>LRIALRRSEventSubscriberMDBean</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>5</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>

<destination-jndi-name>evtLRIALRRSQueue</destination-jndi-name>

<!-- <initial-context-factory>com.sun.jndi.ldap.LdapCtxFactory</initial-context-factory>

<provider-url>ldap://ddirsn01.asianconnect.com:389/ou=mqseries,o=asianconnect.com</provider-url> -->


<connection-factory-jndi-name>evtqcf</connection-factory-jndi-name>
</message-driven-descriptor>


<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/evtDSLocal</res-ref-name>
<jndi-name>jdbc/evtDSLocal</jndi-name>
</resource-description>

<ejb-reference-description>
<ejb-ref-name>ejb/alrrs/AutoReplyListenerHome</ejb-ref-name>
<jndi-name>ejb/lrirel1_0/alrrsrel1_0/AutoReplyListener</jndi-name>
</ejb-reference-description>
</reference-descriptor>
<jndi-name>ejb/lrirel1_0/alrrsrel1_0/EventSubscriberMDBean</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>


still subscription works sometimes and sometimes not.But publishing works always.

urgently needed solution
 
rajareddy annavaarm
Ranch Hand
Posts: 96
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my ejb-jar.xml

<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd'>

<ejb-jar>
<display-name>evtEJB</display-name>
<enterprise-beans>
<message-driven>
<ejb-name>LRIALRRSEventSubscriberMDBean</ejb-name>
<ejb-class>com.sns.event.ejb.EventSubscriberMDBean</ejb-class>
<transaction-type>Container</transaction-type>
<!--
<message-selector>EventType = 'CLBILLINGTXN'</message-selector>
-->
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>
javax.jms.Queue
</destination-type>
</message-driven-destination>

<env-entry>
<env-entry-name>LRIALRRSMSG</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>java:comp/env/ejb/alrrs/AutoReplyListenerHome</env-entry-value>
</env-entry>

<ejb-ref>
<ejb-ref-name>ejb/alrrs/AutoReplyListenerHome</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.sns.govt.lri.alrrs.autoreply.interfaces.AutoReplyListenerHome</home>
<remote>com.sns.govt.lri.alrrs.autoreply.interfaces.AutoReplyListener</remote>
<ejb-link>AutoReplyListener</ejb-link>
</ejb-ref>

<resource-ref>
<res-ref-name>jdbc/evtDSLocal</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>LRIALRRSEventSubscriberMDBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
</assembly-descriptor>

</ejb-jar>


weblogic-ejb-jar.xml

<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN' 'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>

<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>LRIALRRSEventSubscriberMDBean</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>5</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>

<destination-jndi-name>evtLRIALRRSQueue</destination-jndi-name>

<!-- <initial-context-factory>com.sun.jndi.ldap.LdapCtxFactory</initial-context-factory>

<provider-url>ldap://ddirsn01.asianconnect.com:389/ou=mqseries,o=asianconnect.com</provider-url> -->


<connection-factory-jndi-name>evtqcf</connection-factory-jndi-name>
</message-driven-descriptor>


<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/evtDSLocal</res-ref-name>
<jndi-name>jdbc/evtDSLocal</jndi-name>
</resource-description>

<ejb-reference-description>
<ejb-ref-name>ejb/alrrs/AutoReplyListenerHome</ejb-ref-name>
<jndi-name>ejb/lrirel1_0/alrrsrel1_0/AutoReplyListener</jndi-name>
</ejb-reference-description>
</reference-descriptor>
<jndi-name>ejb/lrirel1_0/alrrsrel1_0/EventSubscriberMDBean</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>


still subscription works sometimes and sometimes not.But publishing works always.

urgently needed solution
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic