Examples of XcpMessage


Examples of org.mom4j.messaging.XcpMessage

    void register(DestinationImpl dest, String consumerId, String messageSelector)
        throws JMSException
    {
        int pos = consumerId.lastIndexOf("@");
        XcpMessage message = new XcpMessage(consumerId.substring(0, pos),
                                            XcpMessage.ACTION_REGISTER,
                                            dest.getName(),
                                            consumerId);
        message.setMessageSelector(messageSelector);
        try {
            this.sender.send(message);
        } catch(java.io.IOException ex) {
            JMSException jmsx = new JMSException(ex.getMessage());
            jmsx.setLinkedException(ex);
View Full Code Here

Examples of org.mom4j.messaging.XcpMessage

                       String consumerId,
                       String messageSelector)
        throws JMSException
    {
        int pos = consumerId.lastIndexOf("@");
        XcpMessage message = new XcpMessage(consumerId.substring(0, pos),
                                            XcpMessage.ACTION_REGISTER_DUR,
                                            dest.getName(),
                                            consumerId);
        message.setMessageSelector(messageSelector);
        message.setSubscriberName(name + "@" + ID_SUFFIX);
        XcpResponse resp = null;
        try {
            resp = this.sender.send(message, new XcpMessageHandler());
        } catch(java.io.IOException ex) {
            JMSException jmsx = new JMSException(ex.getMessage());
            jmsx.setLinkedException(ex);
            throw jmsx;
        }
        XcpMessage msg = (XcpMessage)resp.getRootElement();

        return msg.getConsumerId();
    }
View Full Code Here

Examples of org.mom4j.messaging.XcpMessage

    void unregister(DestinationImpl dest, String consumerId)
        throws JMSException
    {
        int pos = consumerId.lastIndexOf("@");
        XcpMessage message = new XcpMessage(consumerId.substring(0, pos),
                                            XcpMessage.ACTION_UNREGISTER,
                                            dest.getName(),
                                            consumerId);
        try {
            this.sender.send(message);
View Full Code Here

Examples of org.mom4j.messaging.XcpMessage


    void unregisterDur(String sessionId, String name)
        throws JMSException
    {
        XcpMessage message = new XcpMessage(sessionId,
                                            XcpMessage.ACTION_UNREGISTER_DUR);
        message.setSubscriberName(name + "@" + ID_SUFFIX);
        try {
            this.sender.send(message);
        } catch(java.io.IOException ex) {
            JMSException jmsx = new JMSException(ex.getMessage());
            jmsx.setLinkedException(ex);
View Full Code Here

Examples of org.mom4j.messaging.XcpMessage

        if(this.sessions.get(sid) == null)
            throw new javax.jms.IllegalStateException("session is closed");

        String action = queue ? XcpMessage.ACTION_CREATE_QUEUE
                              : XcpMessage.ACTION_CREATE_TOPIC;
        XcpMessage message = new XcpMessage(sid, action, name);
        try {
            this.sender.send(message);
        } catch(java.io.IOException ex) {
            JMSException jmsx = new JMSException(ex.getMessage());
            jmsx.setLinkedException(ex);
View Full Code Here

Examples of org.mom4j.messaging.XcpMessage

       
        DestinationImpl d = (DestinationImpl)msg.getJMSDestination();
        String action = session.isTransacted
                      ? XcpMessage.ACTION_SEND_TX
                      : XcpMessage.ACTION_SEND;
        XcpMessage message = new XcpMessage(sid, action, d.getName());
        message.setMessage(msg);
        try {
            this.sender.send(message);
        } catch(java.io.IOException ex) {
            JMSException jmsx = new JMSException(ex.getMessage());
            jmsx.setLinkedException(ex);
View Full Code Here

Examples of org.mom4j.messaging.XcpMessage

        if(!session.isTransacted && session.ackMode != Session.CLIENT_ACKNOWLEDGE) {
            action = XcpMessage.ACTION_RECEIVE;
        } else {
            action = XcpMessage.ACTION_RECEIVE_TX;
        }
        XcpMessage message = new XcpMessage(sid,
                                            action,
                                            destinationName,
                                            consumerId);
        XcpResponse resp = null;
        try {
            resp = this.sender.send(message, new XcpMessageHandler());
        } catch(java.io.IOException ex) {
            JMSException jmsx = new JMSException(ex.getMessage());
            jmsx.setLinkedException(ex);
            throw jmsx;
        }
        message = (XcpMessage)resp.getRootElement();
       
        return message.getMessage();
    }
View Full Code Here

Examples of org.mom4j.messaging.XcpMessage

    {
        String sid = session.getSessionId();
        if(this.sessions.get(sid) == null)
            throw new javax.jms.IllegalStateException("session is closed");
       
        XcpMessage message = new XcpMessage(sid,
                                            XcpMessage.ACTION_COMMIT,
                                            null);
        try {
            this.sender.send(message);
        } catch(java.io.IOException ex) {
View Full Code Here

Examples of org.mom4j.messaging.XcpMessage

    {
        String sid = session.getSessionId();
        if(this.sessions.get(sid) == null)
            throw new javax.jms.IllegalStateException("session is closed");
       
        XcpMessage message = new XcpMessage(sid,
                                            XcpMessage.ACTION_ROLLBACK,
                                            null);
        try {
            this.sender.send(message);
        } catch(java.io.IOException ex) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.