Example usage for javax.jms TextMessage getJMSTimestamp

List of usage examples for javax.jms TextMessage getJMSTimestamp

Introduction

In this page you can find the example usage for javax.jms TextMessage getJMSTimestamp.

Prototype


long getJMSTimestamp() throws JMSException;

Source Link

Document

Gets the message timestamp.

Usage

From source file:eu.planets_project.tb.impl.system.batch.listener.BatchExperimentListenerImpl.java

public void doOnMessage(Message m, long timeOutMillis, Thread thread) {
    log.debug("BatchExecutionListener: doOnMessage");
    //1.check if message got redelivered before doing any processing
    try {//w w w . j  a v  a 2  s.  com
        if (m.getJMSRedelivered()) {
            log.debug(
                    "BatchExperimentListener_shortTimeout: onMessage: re-receive message from the queue. Not processing it");
            return;
        }
    } catch (JMSException e) {
        log.debug(e);
        return;
    }

    //2. extract the message: it contains the ticket for identifying the job on the workflow system
    TextMessage msg = null;
    String ticket = "";
    String batchProcessorID = "";
    if (m instanceof TextMessage) {
        msg = (TextMessage) m;
        try {
            ticket = msg.getText();
            batchProcessorID = msg.getStringProperty(BatchProcessor.QUEUE_PROPERTY_NAME_FOR_SENDING);

            log.debug("BatchExperimentListener_shortTimeout: received message at timestamp: "
                    + msg.getJMSTimestamp() + " for ticket: " + ticket + "on batch processor: "
                    + batchProcessorID);
        } catch (JMSException e) {
            log.debug(e);
            return;
        }
    } else {
        return;
    }

    //3. get the BatchProcessing system that's notified
    TestbedBatchProcessorManager batchManager = TestbedBatchProcessorManager.getInstance();
    BatchProcessor bp = batchManager.getBatchProcessor(batchProcessorID);

    //check rollback and if batch processor has persistent jobs
    if ((bp.getJob(ticket) == null) || (bp.getJobStatus(ticket).equals(TestbedBatchJob.NO_SUCH_JOB))) {
        log.debug("EJBTransactionRollback - BatchProcessor no persistent job - dropp job: " + ticket);
        return;
    }

    //4. check for updates and store extracted information in experiment
    long t0 = System.currentTimeMillis();
    long t1 = System.currentTimeMillis();

    boolean bInfomredStarted = false;
    //do until we have reached our time-out time or completed
    while (t1 - t0 < timeOutMillis) {

        //a) check started
        //use batchProcessor specific implementation for checking on this.
        boolean bStarted = bp.isStarted(ticket);
        if (bStarted) {
            if (!bInfomredStarted) {
                //callback: inform once about started
                bp.notifyStart(ticket, bp.getJob(ticket));
                log.debug("BatchExecutionListener: notify STARTED for: " + ticket);
                bInfomredStarted = true;
            }

            if (bp.isRunning(ticket)) {
                TestbedBatchJob job = bp.getJob(ticket);
                job.setStatus(TestbedBatchJob.RUNNING);
                bp.notifyRunning(ticket, job);
                log.debug("BatchExecutionListener: notify RUNNING for: " + ticket);

            }

            if (bp.isUpdated(ticket)) {
                bp.notifyUpdate(ticket, bp.getJob(ticket));
                log.debug("BatchExecutionListener: notify UPDATE for: " + ticket);

            }

            if (bp.isFailed(ticket)) {
                TestbedBatchJob job = bp.getJob(ticket);
                job.setStatus(TestbedBatchJob.FAILED);
                bp.notifyFailed(ticket, job);
                log.debug("BatchExecutionListener: notify FAILED for: " + ticket);

            }

            //check if completed
            if (bp.isCompleted(ticket)) {
                TestbedBatchJob job = bp.getJob(ticket);
                job.setStatus(TestbedBatchJob.DONE);
                bp.notifyComplete(ticket, job);
                log.debug("BatchExecutionListener: notify COMPLETE for: " + ticket);

                return;
            }

        }

        //status is: still no completed - sleep and repoll
        try {
            Thread.sleep(sleep);
        } catch (InterruptedException e) {
            log.debug("Error while waiting for ticket: " + ticket, e);
            TestbedBatchJob job = bp.getJob(ticket);
            job.setStatus(TestbedBatchJob.FAILED);
            bp.notifyFailed(ticket, job);
            return;
        }
        t1 = System.currentTimeMillis();
    }

    //b) in this case a time-out occurred
    TestbedBatchJob job = bp.getJob(ticket);
    job.setStatus(TestbedBatchJob.FAILED);
    job.setWorkflowFailureReport(new String("BatchExperimentListener with timeout of " + timeOutMillis / 1000
            + " Sec. has timed-out. This normally indicates a failure within the remote workflow execution processor"));
    bp.notifyFailed(ticket, job);
    log.debug("BatchExecutionListener: notify FAILED due to time-out for: " + ticket);
}

From source file:org.dawnsci.commandserver.core.producer.ProcessConsumer.java

/**
 * WARNING - starts infinite loop - you have to kill 
 * @param uri//w  w w . ja  v  a2s  .  c  om
 * @param submitQName
 * @param statusTName
 * @param statusQName
 * @throws Exception
 */
private void monitorSubmissionQueue(URI uri, String submitQName, String statusTName, String statusQName)
        throws Exception {

    ConnectionFactory connectionFactory = ConnectionFactoryFacade.createConnectionFactory(uri);
    Connection connection = connectionFactory.createConnection();
    Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    Queue queue = session.createQueue(submitQName);

    final MessageConsumer consumer = session.createConsumer(queue);
    connection.start();

    System.out.println("Starting consumer for submissions to queue " + submitQName);
    while (isActive()) { // You have to kill it or call stop() to stop it!

        try {

            // Consumes messages from the queue.
            Message m = consumer.receive(1000);
            if (m != null) {

                // TODO FIXME Check if we have the max number of processes
                // exceeded and wait until we dont...

                TextMessage t = (TextMessage) m;
                ObjectMapper mapper = new ObjectMapper();

                final StatusBean bean = mapper.readValue(t.getText(), getBeanClass());

                if (bean != null) { // We add this to the status list so that it can be rendered in the UI

                    if (!isHandled(bean))
                        continue; // Consume it and move on

                    // Now we put the bean in the status queue and we 
                    // start the process
                    RemoteSubmission factory = new RemoteSubmission(uri);
                    factory.setLifeTime(t.getJMSExpiration());
                    factory.setPriority(t.getJMSPriority());
                    factory.setTimestamp(t.getJMSTimestamp());
                    factory.setQueueName(statusQName); // Move the message over to a status queue.

                    factory.submit(bean, false);

                    final ProgressableProcess process = createProcess(uri, statusTName, statusQName, bean);
                    if (process != null) {
                        if (process.isBlocking()) {
                            System.out.println("About to run job " + bean.getName() + " messageid("
                                    + t.getJMSMessageID() + ")");
                        }
                        processCount++;
                        process.start();
                        if (process.isBlocking()) {
                            System.out.println(
                                    "Ran job " + bean.getName() + " messageid(" + t.getJMSMessageID() + ")");
                        } else {
                            System.out.println("Started job " + bean.getName() + " messageid("
                                    + t.getJMSMessageID() + ")");
                        }
                    }

                }
            }

        } catch (Throwable ne) {
            // Really basic error reporting, they have to pipe to file.
            ne.printStackTrace();
            setActive(false);
        }
    }

}

From source file:nl.nn.adapterframework.extensions.ifsa.jms.IfsaRequesterSender.java

/**
 * Execute a request to the IFSA service.
 * @return in Request/Reply, the retrieved message or TIMEOUT, otherwise null
 *///w  w  w. j a va 2  s  .  c om
public String sendMessage(String dummyCorrelationId, String message, Map params, String bifName, byte btcData[])
        throws SenderException, TimeOutException {
    String result = null;
    QueueSession session = null;
    QueueSender sender = null;
    Map udzMap = null;

    try {
        log.debug(getLogPrefix() + "creating session and sender");
        session = createSession();
        IFSAQueue queue;
        if (params != null && params.size() > 0) {
            // Use first param as serviceId
            String serviceId = (String) params.get("serviceId");
            if (serviceId == null) {
                serviceId = getServiceId();
            }
            String occurrence = (String) params.get("occurrence");
            if (occurrence != null) {
                int i = serviceId.indexOf('/',
                        serviceId.indexOf('/', serviceId.indexOf('/', serviceId.indexOf('/') + 1) + 1) + 1);
                int j = serviceId.indexOf('/', i + 1);
                serviceId = serviceId.substring(0, i + 1) + occurrence + serviceId.substring(j);
            }
            queue = getMessagingSource().lookupService(getMessagingSource().polishServiceId(serviceId));
            if (queue == null) {
                throw new SenderException(
                        getLogPrefix() + "got null as queue for serviceId [" + serviceId + "]");
            }
            if (log.isDebugEnabled()) {
                log.info(getLogPrefix() + "got Queue to send messages on [" + queue.getQueueName() + "]");
            }
            // Use remaining params as outgoing UDZs
            udzMap = new HashMap();
            udzMap.putAll(params);
            udzMap.remove("serviceId");
            udzMap.remove("occurrence");
        } else {
            queue = getServiceQueue();
        }
        sender = createSender(session, queue);

        log.debug(getLogPrefix() + "sending message with bifName [" + bifName + "]");

        TextMessage sentMessage = sendMessage(session, sender, message, udzMap, bifName, btcData);
        log.debug(getLogPrefix() + "message sent");

        if (isSynchronous()) {

            log.debug(getLogPrefix() + "waiting for reply");
            Message msg = getRawReplyMessage(session, queue, sentMessage);
            try {
                long tsReplyReceived = System.currentTimeMillis();
                long tsRequestSent = sentMessage.getJMSTimestamp();
                long tsReplySent = msg.getJMSTimestamp();
                //               long jmsTimestampRcvd = msg.getJMSTimestamp();
                ////                  long businessProcFinishSent=0;
                //               long businessProcStartRcvd=0;
                //               long businessProcStartSent=0;
                //               long businessProcFinishRcvd=0;
                //               if (sentMessage instanceof IFSAMessage) {
                //                  businessProcStartSent=((IFSAMessage)sentMessage).getBusinessProcessingStartTime();
                ////                     businessProcFinishSent=((IFSAMessage)sentMessage).getBusinessProcessingFinishTime();
                //               }
                //               if (msg instanceof IFSAMessage) {
                //                  businessProcStartRcvd=((IFSAMessage)msg).getBusinessProcessingStartTime();
                //                  businessProcFinishRcvd=((IFSAMessage)msg).getBusinessProcessingFinishTime();
                //               }
                if (log.isInfoEnabled()) {
                    log.info(getLogPrefix() + "A) RequestSent   [" + DateUtils.format(tsRequestSent) + "]");
                    log.info(getLogPrefix() + "B) ReplySent     [" + DateUtils.format(tsReplySent)
                            + "] diff (~queing + processing) [" + (tsReplySent - tsRequestSent) + "]");
                    log.info(getLogPrefix() + "C) ReplyReceived [" + DateUtils.format(tsReplyReceived)
                            + "] diff (transport of reply )[" + (tsReplyReceived - tsReplySent) + "]");
                    //                  log.info(getLogPrefix()+"C2) msgRcvd.businessProcStartRcvd  ["+DateUtils.format(businessProcStartRcvd) +"] ");
                    //                  log.info(getLogPrefix()+"D)  msgRcvd.jmsTimestamp           ["+DateUtils.format(jmsTimestampRcvd)      +"] diff ["+(jmsTimestampRcvd-businessProcStartSent)+"]");
                    //                  log.info(getLogPrefix()+"E)  msgRcvd.businessProcFinishRcvd ["+DateUtils.format(businessProcFinishRcvd)+"] diff ["+(businessProcFinishRcvd-jmsTimestampRcvd)+"] (=time spend on IFSA bus sending result?)");
                    //                  log.info(getLogPrefix()+"F)  timestampAfterRcvd             ["+DateUtils.format(timestampAfterRcvd)    +"] diff ["+(timestampAfterRcvd-businessProcFinishRcvd)+"] ");
                    //                  log.info(getLogPrefix()+"business processing time (E-C1) ["+(businessProcFinishRcvd-businessProcStartSent)+"] ");
                }
                //               if (businessProcessTimes!=null) {                  
                //                  businessProcessTimes.addValue(businessProcFinishRcvd-businessProcStartSent);
                //               }
            } catch (JMSException e) {
                log.warn(getLogPrefix() + "exception determining processing times", e);
            }
            if (msg instanceof TextMessage) {
                result = ((TextMessage) msg).getText();
            } else {
                if (msg.getClass().getName().endsWith("IFSAReportMessage")) {
                    if (msg instanceof IFSAReportMessage) {
                        IFSAReportMessage irm = (IFSAReportMessage) msg;
                        if (isThrowExceptions()) {
                            throw new SenderException(getLogPrefix() + "received IFSAReportMessage ["
                                    + ToStringBuilder.reflectionToString(irm) + "], NoReplyReason ["
                                    + irm.getNoReplyReason() + "]");
                        }
                        log.warn(getLogPrefix() + "received IFSAReportMessage ["
                                + ToStringBuilder.reflectionToString(irm) + "], NoReplyReason ["
                                + irm.getNoReplyReason() + "]");
                        result = "<IFSAReport>" + "<NoReplyReason>" + irm.getNoReplyReason()
                                + "</NoReplyReason>" + "</IFSAReport>";

                    }
                } else {
                    log.warn(getLogPrefix() + "received neither TextMessage nor IFSAReportMessage but ["
                            + msg.getClass().getName() + "]");
                    result = msg.toString();
                }
            }
            if (result == null) {
                log.info(getLogPrefix() + "received null reply");
            } else {
                if (log.isDebugEnabled()) {
                    if (AppConstants.getInstance().getBoolean("log.logIntermediaryResults", false)) {
                        log.debug(getLogPrefix() + "received reply [" + result + "]");
                    } else {
                        log.debug(getLogPrefix() + "received reply");
                    }
                } else {
                    log.info(getLogPrefix() + "received reply");
                }
            }
        } else {
            result = sentMessage.getJMSMessageID();
        }
    } catch (JMSException e) {
        throw new SenderException(getLogPrefix() + "caught JMSException in sendMessage()", e);
    } catch (IfsaException e) {
        throw new SenderException(getLogPrefix() + "caught IfsaException in sendMessage()", e);
    } finally {
        if (sender != null) {
            try {
                log.debug(getLogPrefix() + "closing sender");
                sender.close();
            } catch (JMSException e) {
                log.debug(getLogPrefix() + "Exception closing sender", e);
            }
        }
        closeSession(session);
    }
    if (isThrowExceptions() && result != null && result.startsWith("<exception>")) {
        throw new SenderException("Retrieved exception message from IFSA bus: " + result);
    }
    return result;
}

From source file:org.codehaus.stomp.StompTest.java

public void testSendMessage() throws Exception {

    MessageConsumer consumer = session.createConsumer(queue);

    String frame = "CONNECT\n" + "login: brianm\n" + "passcode: wombats\n\n" + Stomp.NULL;
    sendFrame(frame);/*from   w ww  . j  av a  2s. c  om*/

    frame = receiveFrame(10000);
    Assert.assertTrue(frame.startsWith("CONNECTED"));

    frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n\n" + "Hello World" + Stomp.NULL;

    sendFrame(frame);

    TextMessage message = (TextMessage) consumer.receive(1000);
    Assert.assertNotNull(message);
    Assert.assertEquals("Hello World", message.getText());

    // Make sure that the timestamp is valid - should
    // be very close to the current time.
    long tnow = System.currentTimeMillis();
    long tmsg = message.getJMSTimestamp();
    Assert.assertTrue(Math.abs(tnow - tmsg) < 1000);
}

From source file:org.codehaus.stomp.StompTest.java

public void testSendMessageWithReceipt() throws Exception {

    MessageConsumer consumer = session.createConsumer(queue);

    String frame = "CONNECT\n" + "login: brianm\n" + "passcode: wombats\n\n" + Stomp.NULL;
    sendFrame(frame);//from  w  w  w  . j  a v  a2s.  c om

    frame = receiveFrame(10000);
    Assert.assertTrue(frame.startsWith("CONNECTED"));

    frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n" + "receipt: 1234\n\n" + "Hello World"
            + Stomp.NULL;

    sendFrame(frame);

    String f = receiveFrame(10000);
    System.out.println(f);
    Assert.assertTrue(f.startsWith("RECEIPT"));
    Assert.assertTrue(f.indexOf("receipt-id:1234") >= 0);

    TextMessage message = (TextMessage) consumer.receive(1000);
    Assert.assertNotNull(message);
    Assert.assertEquals("Hello World", message.getText());

    // Make sure that the timestamp is valid - should
    // be very close to the current time.
    long tnow = System.currentTimeMillis();
    long tmsg = message.getJMSTimestamp();
    Assert.assertTrue(Math.abs(tnow - tmsg) < 1000);
}

From source file:org.mule.transport.jms.JmsMuleMessageFactoryTestCase.java

@Override
protected Object getValidTransportMessage() throws Exception {
    TextMessage textMessage = mock(TextMessage.class);
    when(textMessage.getText()).thenReturn(MESSAGE_TEXT);
    when(textMessage.getJMSCorrelationID()).thenReturn(null);
    when(textMessage.getJMSDeliveryMode()).thenReturn(Integer.valueOf(1));
    when(textMessage.getJMSDestination()).thenReturn(null);
    when(textMessage.getJMSExpiration()).thenReturn(Long.valueOf(0));
    when(textMessage.getJMSMessageID()).thenReturn("1234567890");
    when(textMessage.getJMSPriority()).thenReturn(Integer.valueOf(4));
    when(textMessage.getJMSRedelivered()).thenReturn(Boolean.FALSE);
    when(textMessage.getJMSReplyTo()).thenReturn(null);
    when(textMessage.getJMSTimestamp()).thenReturn(Long.valueOf(0));
    when(textMessage.getJMSType()).thenReturn(null);
    when(textMessage.getPropertyNames())
            .thenReturn(IteratorUtils.asEnumeration(IteratorUtils.arrayIterator(new Object[] { "foo" })));
    when(textMessage.getObjectProperty("foo")).thenReturn("bar");
    return textMessage;
}

From source file:org.wso2.carbon.appfactory.eventing.jms.AFMessageListener.java

@Override
public void onMessage(Message message) {
    if (log.isDebugEnabled()) {
        if (message instanceof MapMessage) {
            try {
                String messageBody = ((MapMessage) message).getString(TopicPublisher.MESSAGE_BODY);
                log.debug("Received a message:" + messageBody);
            } catch (JMSException e) {
                log.error("Error while getting message content.", e);
            }//from   ww  w  .  j ava  2s .c o m
        }
    }
    MapMessage mapMessage;
    if (message instanceof MapMessage) {
        mapMessage = (MapMessage) message;
        MessageStore.getInstance().addMessage(this.subscriptionId, mapMessage);
    } else if (message instanceof TextMessage) {
        //Todo:remove this. we only support mapMessages initially and below code is only for testing purpose.
        final TextMessage textMessage = (TextMessage) message;
        mapMessage = new MapMessage() {
            @Override
            public boolean getBoolean(String s) throws JMSException {
                return false; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public byte getByte(String s) throws JMSException {
                return 0; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public short getShort(String s) throws JMSException {
                return 0; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public char getChar(String s) throws JMSException {
                return 0; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public int getInt(String s) throws JMSException {
                return 0; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public long getLong(String s) throws JMSException {
                return 0; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public float getFloat(String s) throws JMSException {
                return 0; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public double getDouble(String s) throws JMSException {
                return 0; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public String getString(String s) throws JMSException {
                return textMessage.getText();
            }

            @Override
            public byte[] getBytes(String s) throws JMSException {
                return new byte[0]; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public Object getObject(String s) throws JMSException {
                return null; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public Enumeration getMapNames() throws JMSException {
                return null; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void setBoolean(String s, boolean b) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void setByte(String s, byte b) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void setShort(String s, short i) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void setChar(String s, char c) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void setInt(String s, int i) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void setLong(String s, long l) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void setFloat(String s, float v) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void setDouble(String s, double v) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void setString(String s, String s2) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void setBytes(String s, byte[] bytes) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void setBytes(String s, byte[] bytes, int i, int i2) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void setObject(String s, Object o) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public boolean itemExists(String s) throws JMSException {
                return false; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public String getJMSMessageID() throws JMSException {
                return textMessage.getJMSMessageID();
            }

            @Override
            public void setJMSMessageID(String s) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public long getJMSTimestamp() throws JMSException {
                return textMessage.getJMSTimestamp();
            }

            @Override
            public void setJMSTimestamp(long l) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public byte[] getJMSCorrelationIDAsBytes() throws JMSException {
                return new byte[0]; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void setJMSCorrelationIDAsBytes(byte[] bytes) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void setJMSCorrelationID(String s) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public String getJMSCorrelationID() throws JMSException {
                return textMessage.getJMSCorrelationID();
            }

            @Override
            public Destination getJMSReplyTo() throws JMSException {
                return null; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void setJMSReplyTo(Destination destination) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public Destination getJMSDestination() throws JMSException {
                return textMessage.getJMSDestination();
            }

            @Override
            public void setJMSDestination(Destination destination) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public int getJMSDeliveryMode() throws JMSException {
                return textMessage.getJMSDeliveryMode();
            }

            @Override
            public void setJMSDeliveryMode(int i) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public boolean getJMSRedelivered() throws JMSException {
                return textMessage.getJMSRedelivered();
            }

            @Override
            public void setJMSRedelivered(boolean b) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public String getJMSType() throws JMSException {
                return textMessage.getJMSType();
            }

            @Override
            public void setJMSType(String s) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public long getJMSExpiration() throws JMSException {
                return textMessage.getJMSExpiration();
            }

            @Override
            public void setJMSExpiration(long l) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public int getJMSPriority() throws JMSException {
                return textMessage.getJMSPriority();
            }

            @Override
            public void setJMSPriority(int i) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void clearProperties() throws JMSException {
                textMessage.clearProperties();
            }

            @Override
            public boolean propertyExists(String s) throws JMSException {
                return textMessage.propertyExists(s);
            }

            @Override
            public boolean getBooleanProperty(String s) throws JMSException {
                return false; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public byte getByteProperty(String s) throws JMSException {
                return 0; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public short getShortProperty(String s) throws JMSException {
                return 0; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public int getIntProperty(String s) throws JMSException {
                return 0; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public long getLongProperty(String s) throws JMSException {
                return 0; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public float getFloatProperty(String s) throws JMSException {
                return 0; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public double getDoubleProperty(String s) throws JMSException {
                return 0; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public String getStringProperty(String s) throws JMSException {
                return null; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public Object getObjectProperty(String s) throws JMSException {
                return null; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public Enumeration getPropertyNames() throws JMSException {
                return null; //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void setBooleanProperty(String s, boolean b) throws JMSException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void setByteProperty(String s, byte b) throws JMSException {
                textMessage.setByteProperty(s, b);
            }

            @Override
            public void setShortProperty(String s, short i) throws JMSException {
                textMessage.setShortProperty(s, i);
            }

            @Override
            public void setIntProperty(String s, int i) throws JMSException {
                textMessage.setIntProperty(s, i);
            }

            @Override
            public void setLongProperty(String s, long l) throws JMSException {
                textMessage.setLongProperty(s, l);
            }

            @Override
            public void setFloatProperty(String s, float v) throws JMSException {
                textMessage.setFloatProperty(s, v);
            }

            @Override
            public void setDoubleProperty(String s, double v) throws JMSException {
                textMessage.setDoubleProperty(s, v);
            }

            @Override
            public void setStringProperty(String s, String s2) throws JMSException {
                textMessage.setStringProperty(s, s2);
            }

            @Override
            public void setObjectProperty(String s, Object o) throws JMSException {
                textMessage.setObjectProperty(s, o);
            }

            @Override
            public void acknowledge() throws JMSException {
                textMessage.acknowledge();
            }

            @Override
            public void clearBody() throws JMSException {
                textMessage.clearBody();
            }
        };
        MessageStore.getInstance().addMessage(this.subscriptionId, mapMessage);
    }

}