Package com.sun.messaging.jmq.jmsservice

Examples of com.sun.messaging.jmq.jmsservice.JMSServiceReply


    /**
     *  Rollback the transaction for this session
     */
    protected void _rollback(String methodName)
    throws JMSException{
        JMSServiceReply reply = null;
        try {
            //XXX:Set the Redelivered Flag until CTS changes the test
            reply = jmsservice.rollbackTransaction(this.connectionId,
                    this.transactionId, null, true, true);
            //XXX:Set the Redelivered Flag until CTS changes the test
View Full Code Here


     @throws JMSException if any JMS server error occurred
     */
    protected long _createProducerId(
            com.sun.messaging.jmq.jmsservice.Destination destination)
    throws JMSException {
        JMSServiceReply reply;
        long producerId = 0L;
        try {
            reply = jmsservice.addProducer(this.connectionId, this.sessionId,
                    destination);
            try {
                producerId = reply.getJMQProducerID();               
            } catch (NoSuchFieldException nsfe){
                String exerrmsg = _lgrMID_EXC +
                        "JMSServiceException:Missing JMQProducerID";
                JMSException jmse = new JMSException(exerrmsg);
                jmse.initCause(nsfe);
View Full Code Here

     */
    private DirectConsumer _createAndAddConsumer(String methodName,
            Destination destination,
            String selector, String durableName, boolean noLocal)
    throws JMSException {
        JMSServiceReply reply;
        long consumerId = 0L;
        com.sun.messaging.jmq.jmsservice.Destination jmsservice_dest;

        if (_logFINE){
            _loggerJS.fine(_lgrMID_INF + "sessionId=" + this.sessionId +
                    ":" + methodName +
                    ":Destination=" + destination + ":Selector=" + selector +
                    ":DurableName=" + durableName + ":noLocal=" + noLocal);
        }
        this._checkIfClosed(methodName);

        jmsservice_dest = this._checkDestinationForConsumer(destination);
        DirectConsumer consumer = new DirectConsumer(this, jmsservice,
                destination, jmsservice_dest, noLocal, selector, durableName);
        try {
            reply = jmsservice.addConsumer(connectionId, sessionId,
                    jmsservice_dest, selector, durableName,
                    this.getConnection()._getClientID(),
                    noLocal,
                    //XXX:tharakan:using false for shared temporarily
                    false);
            try {
                //Set consumerId right away
                consumerId = reply.getJMQConsumerID();
                consumer._setConsumerId(consumerId);
            } catch (NoSuchFieldException nsfe){
                String exerrmsg = _lgrMID_EXC +
                        "JMSServiceException:Missing JMQConsumerID";
                JMSException jmse = new JMSException(exerrmsg);
View Full Code Here

     @throws JMSException if any JMS error occurred.
     */
    private DirectQueueBrowser _createAndAddBrowser(String methodName,
            Queue destination, String selector)
    throws JMSException {
        JMSServiceReply reply;
        long consumerId = 0L;
        DirectQueueBrowser browser = null;
        com.sun.messaging.jmq.jmsservice.Destination jmsservice_dest;

        if (_logFINE){
            _loggerJS.fine(_lgrMID_INF+"sessionId="+sessionId+":"+methodName+
                    ":Destination="+destination+":selector="+selector);
        }
        this._checkIfClosed(methodName);

        jmsservice_dest = this._checkDestinationForConsumer(destination);
        try {
            reply = jmsservice.addBrowser(connectionId, sessionId,
                    jmsservice_dest, selector);
            try {
                //Must get a consumerId from the addBrowser method
                consumerId = reply.getJMQConsumerID();
            } catch (NoSuchFieldException nsfe){
                String exerrmsg = _lgrMID_EXC + methodName +
                        "JMSServiceException:Missing JMQConsumerID";
                JMSException jmse = new JMSException(exerrmsg);
                jmse.initCause(nsfe);
View Full Code Here

    }

    protected void _acknowledgeMessage(DirectPacket msgPkt, long consumerId,
            long transactionId, JMSService.MessageAckType ackType)
    throws JMSException {
        JMSServiceReply reply;
        JMSServiceReply.Status status;
        try {
            reply = jmsservice.acknowledgeMessage(this.connectionId,
                    this.sessionId, consumerId,
                    msgPkt.getReceivedSysMessageID(), transactionId,
View Full Code Here

     *  Set a JMS MessageListener on this MessageConsumer
     */
    public void setMessageListener(javax.jms.MessageListener msgListener)
    throws JMSException{
        String methodName = "setMessageListener()";
        JMSServiceReply jmsReply = null;
        _loggerJMC.fine(_lgrMID_INF+
                "connectionId="+connectionId+":"+methodName +
                "=" + msgListener);
        this._checkIfClosed(methodName);
        if (msgListener == null){
View Full Code Here

                    ":transactionId=" + this.mTransactionId //+
                    //+"Xid="+mqxid.toString()
                    );
        }
             
         JMSServiceReply reply = null;
         JMSServiceReply.Status status;
         try {
             reply = jmsservice.commitTransaction(this.connectionId,
                    this.mTransactionId, foreignXid,
                    (onePhase ? XAResource.TMONEPHASE : XAResource.TMNOFLAGS)
View Full Code Here

            _loggerJX.fine(_lgrMID_INF + methodName + ":flags=" + flags +
                    ":transactionId=" + this.mTransactionId //+
                    //":Xid="+mqxid.toString()
                    );
        }
        JMSServiceReply reply = null;
        JMSServiceReply.Status status;
        try {
            reply = jmsservice.endTransaction(this.connectionId,
                    this.mTransactionId, foreignXid, flags);
            if (_logFINE){
View Full Code Here

        }

        //JMS does not do RDONLY transactions
        int result = XA_OK;

        JMSServiceReply reply = null;
        JMSServiceReply.Status status;
        try {
            reply = jmsservice.prepareTransaction(this.connectionId,
                    this.mTransactionId, foreignXid);
            if (_logFINE){
View Full Code Here

                    ":transactionId="+ this.mTransactionId //+
                    //":Xid="+mqxid.toString());
                    );
        }
                     
        JMSServiceReply reply = null;
        JMSServiceReply.Status status;
        try {
            reply = jmsservice.rollbackTransaction(this.connectionId,
                    this.mTransactionId, foreignXid,
                    true, true
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.jmsservice.JMSServiceReply

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.