Hi,
I am very new to MDB�s. I want to do a simple check for a connection to my backend before executing the onMessage() method of my MDB.
Is there any way by which I can prevent the
EJB container from calling the onMessage(). Basically I want to execute the onMessage() only if my check condition passes. The logic should be some thing like below:
if(Connection.status == running){
onMessage(){}
}
Do we have any facilities to do some think like above? Or else what I want to do is to check the connection condition inside onMessage() call and I want to block the further processing of the messages in the queue, some thing as shown below:
onMessage(){
if(Connection.status == running){
// Process further
}else{
// Block further processing and also the calls to onMessage() by the container
}
}
Any body who know how to do the below:
1.I want to execute the onMessage() only if my check condition passes.
2.How to block further processing of the onMessage() by the EJB container till my condition check passes
Thanks & Regards
-Sandeep