Hi All,
I have deployed my message driven bean code packaged as an ear file in weblogic 10.3 server, but the MDB class onmessage() method is not executing when the message coming to the queue configured for MDB.
I am not able to figure out the issue and same ear file is running in the
JBoss server.
############My MDB class is: #################
import javax.ejb.MessageDriven;
import javax.ejb.ActivationConfigProperty;
import javax.jms.Message;
import javax.jms.MessageListener;
import com.hp.weblogic.adapter.generic.WeblogicJmsMessageSenderThread;
import com.hp.weblogic.adapter.server.WeblogicServerConfigConstant;
@MessageDriven(
activationConfig = {
@ActivationConfigProperty(
propertyName="connectionFactoryJndiName",
propertyValue="jms/grsConnectionFactory"),
@ActivationConfigProperty(
propertyName="destinationType",
propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(
propertyName="acknowledgeMode",
propertyValue="Auto-acknowledge")},
mappedName = "jms/dealGrsClaimRequestQueue"
)
public class DealGrsClaimRequestQueueMDB implements MessageListener {
//private final static Logger logger=Logger.getLogger("DealGrsClaimRequestQueueMDB");
public void onMessage(Message message) {
try{
System.out.println("**********latest**** Message listened by DealGrsClaimRequestQueueMDB**********************");
WeblogicJmsMessageSenderThread.getJmsMessage(message,WeblogicServerConfigConstant.DEAL_GRS_CLAIM_REQUEST_QUEUE);
}catch (Exception e) {
e.printStackTrace();
}
}
}
##### my weblogic-ejb-jar.xml file is ###########
<?xml version = '1.0' encoding = 'windows-1252'?>
<weblogic-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-ejb-jar
http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd"
xmlns="http://www.bea.com/ns/weblogic/weblogic-ejb-jar">
<weblogic-enterprise-bean>
<ejb-name>DealGrsClaimRequestQueueMDB</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>2</max-beans-in-free-pool>
<initial-beans-in-free-pool>2</initial-beans-in-free-pool>
</pool>
</message-driven-descriptor>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
######## My application.xml file is : ##########
<?xml version = '1.0' encoding = 'windows-1252'?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5" xmlns="http://java.sun.com/xml/ns/javaee">
<display-name>weblogictojbossJmsBridge</display-name>
<module>
<
ejb>MessageReceiverMDB.jar</ejb>
</module>
</application>
I have created a jar file using the class file and weblogic-ejb-jar.xml file and then i have placed this jar in the ear file with APP-INF/lib and META-INF/application.xml and META-INF/MENIFEST.MF.
I am not using any ejb-jar.xml file for ejb declaration.
Can anybody help me to resolve this issue.
Regards
Sanjeev Kumar