Hi all...
I'm facing a strange kind of problem with MDB using weblogic 9.2
The code worked perfectly in weblogic 8.1
This is wht i'm trying to achieve..
i'm having a MDB which implements a onMessage().
I'm publishing message thru a standalone client. Publishing works fine..
The problem is onMessage(javax.jms.Message msg) is never been called .
when i monitor it shows that messages are recieved..
Am is missing something that is really important..
Here is my code ,
public class PaymentProcessorBean implements MessageDrivenBean, MessageListener {
public PaymentProcessorBean() {
super();
// TODO Auto-generated constructor stub
}
public void setMessageDrivenContext(MessageDrivenContext ctx)
throws EJBException {
// TODO Auto-generated method stub
}
public void ejbRemove() throws EJBException {
// TODO Auto-generated method stub
}
public void onMessage(Message message) {
ObjectMessage objMsg=(ObjectMessage)message;
try {
System.out.println(message);
} catch (JMSException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
here are the 2 xml files....
<message-driven >
<description><![CDATA[Description for PaymentProcessor]]></description>
<display-name>Name for PaymentProcessor</display-name>
<ejb-name>PaymentProcessor</ejb-name>
<ejb-class>com.exo.epayment.ejb.PaymentProcessorBean</ejb-class>
<transaction-type>Container</transaction-type>
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
</message-driven>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>PaymentProcessor</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>10</max-beans-in-free-pool>
<initial-beans-in-free-pool>2</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>jms/JMSQueue</destination-jndi-name>
<initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
<provider-url>
t3://localhost:7001</provider-url>
<connection-factory-jndi-name>jms/JMSConnectionFactory</connection-factory-jndi-name>
<jms-polling-interval-seconds>20</jms-polling-interval-seconds>
</message-driven-descriptor>
<jndi-name>PaymentProcessor</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
Am i missing something somewhere???
any help in this is highly appreciated..
thanks in advance.
Manoj