java - how to save the messages one by one in jms -




i reading xml jms queue using activemq jms service , saving data database, i'm getting duplicate values in database because multiple xml processed @ time; need save 1 one xml.

@messagedriven (name = "testmessagebean", activationconfig =  {     @activationconfigproperty(propertyname  = "destination",propertyvalue = "jmstestueue?consumer.exclusive=true"),     @activationconfigproperty(propertyname  = "destinationtype",propertyvalue = "javax.jms.queue"),     @activationconfigproperty(propertyname  = "acknowledgemode",propertyvalue = "auto-acknowledge"),     @activationconfigproperty(propertyname = "maxsession", propertyvalue = "1") }) public class favouritesmdb implements messagelistener {     @inject     @ejb     private testslsb testslsb;     public void onmessage(message message) {         string xmlmessage = "";         if (message instanceof textmessage) {             textmessage msg = (textmessage) message;             try {                 xmlmessage = msg.gettext();                 testslsb.saverecords(xmlmessage);             } catch (exception e) {         }      } } 





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -