私はこのメッセージが認識されていないというエラーを受け取ります:
javax.jms.IllegalStateException: Message not delivered
at com.tibco.tibjms.TibjmsxSessionImp._confirmNonTransacted(TibjmsxSessionImp.java:3295)
at com.tibco.tibjms.TibjmsxSessionImp._confirm(TibjmsxSessionImp.java:3644)
at com.tibco.tibjms.TibjmsxSessionImp._confirmNonAuto(TibjmsxSessionImp.java:4980)
at com.tibco.tibjms.TibjmsMessage.acknowledge(TibjmsMessage.java:609)
これが私のコードです:
public processMessage(Message pMessage){
try{
performOperation();
}
catch(Exception e){
}finally{
if (pMessage != null) {
try {
pMessage.acknowledge();
} catch (Exception e) {
try {
if (pMessage.getJMSRedelivered()) {
log.info("Message has been redelivered");
} else
log.error(("Message has not been delivered"),e);
} catch (JMSException e1) {
log.error(e1);
}
}
}
return null;
}
public boolean performOperation(somedata){
try{
insert into database
}
catch(DataIntegrityViolationException e){
do something
if (pMessage != null){
pMessage.acknowledge();
}
}
}
}