Package org.apache.geronimo.messaging

Examples of org.apache.geronimo.messaging.CommunicationException


                marshalled = memOut.toByteArray();
                memOut.reset();
            }
        } catch (IOException e) {
            log.error(e);
            throw new CommunicationException(e);
        }
        PlainDownPacket downPacket = new PlainDownPacket();
        ByteBuffer buffer = ByteBuffer.allocate(marshalled.length);
        buffer.put(marshalled);
        buffer.flip();
        downPacket.setBuffers(Collections.singleton(buffer));
        synchronized(protocol) {
            try {
                protocol.sendDown(downPacket);
            } catch (ProtocolException e) {
                log.error(e);
                throw new CommunicationException(e);
            }
        }
    }
View Full Code Here


                    header2.addHeader(
                        MsgHeaderConstants.DEST_NODE_PATH,
                        NodeInfo.pop(path));
                    RemoteNode remoteNode = findRemoteNode(target);
                    if ( null == remoteNode ) {
                        throw new CommunicationException(target +
                            " has failed during a topology reconfiguration.");
                    }
                    out = remoteNode.getMsgConsumerOut();
                } else {
                    // A path has not already been computed. Computes one.
                    NodeInfo src = (NodeInfo)
                        header2.getHeader(MsgHeaderConstants.SRC_NODE);
                    NodeTopology topo = markTopology(header2);
                    path = topo.getPath(src, target);
                    if (null == path) {
                        throw new CommunicationException("{" + target
                            + "} is not reachable by {" + src +
                            "} in the topology " + topo);
                    }
                    RemoteNode remoteNode = findRemoteNode(path[0]);
                    if ( null == remoteNode ) {
                        throw new CommunicationException(path[0] +
                            " has failed during a topology reconfiguration.");
                    }
                    out = remoteNode.getMsgConsumerOut();
                   
                    // Inserts the computed path and the new dests.
View Full Code Here

                aHeader.addHeader(MsgHeaderConstants.TOPOLOGY_VERSION,
                    new Integer(topo.getVersion()));
            } else if ( version.intValue() == preparedTopology.getVersion() ) {
                topo = preparedTopology;
            } else if ( version.intValue() != topo.getVersion() ) {
                throw new CommunicationException("Topology version " +
                    version + " too old.");
            }
            return topo;
        }
View Full Code Here

                marshalled = memOut.toByteArray();
                memOut.reset();
            }
        } catch (IOException e) {
            log.error(e);
            throw new CommunicationException(e);
        }
        PlainDownPacket downPacket = new PlainDownPacket();
        ByteBuffer buffer = ByteBuffer.allocate(marshalled.length);
        buffer.put(marshalled);
        buffer.flip();
        downPacket.setBuffers(Collections.singleton(buffer));
        synchronized(protocol) {
            try {
                protocol.sendDown(downPacket);
            } catch (ProtocolException e) {
                log.error(e);
                throw new CommunicationException(e);
            }
        }
    }
View Full Code Here

                    header2.addHeader(
                        MsgHeaderConstants.DEST_NODE_PATH,
                        NodeInfo.pop(path));
                    RemoteNode remoteNode = findRemoteNode(target);
                    if ( null == remoteNode ) {
                        throw new CommunicationException(target +
                            " has failed during a topology reconfiguration.");
                    }
                    out = remoteNode.getMsgConsumerOut();
                } else {
                    // A path has not already been computed. Computes one.
                    NodeInfo src = (NodeInfo)
                        header2.getHeader(MsgHeaderConstants.SRC_NODE);
                    NodeTopology topo = markTopology(header2);
                    path = topo.getPath(src, target);
                    if (null == path) {
                        throw new CommunicationException("{" + target
                            + "} is not reachable by {" + src +
                            "} in the topology " + topo);
                    }
                    RemoteNode remoteNode = findRemoteNode(path[0]);
                    if ( null == remoteNode ) {
                        throw new CommunicationException(path[0] +
                            " has failed during a topology reconfiguration.");
                    }
                    out = remoteNode.getMsgConsumerOut();
                   
                    // Inserts the computed path and the new dests.
View Full Code Here

                aHeader.addHeader(MsgHeaderConstants.TOPOLOGY_VERSION,
                    new Integer(topo.getVersion()));
            } else if ( version.intValue() == preparedTopology.getVersion() ) {
                topo = preparedTopology;
            } else if ( version.intValue() != topo.getVersion() ) {
                throw new CommunicationException("Topology version " +
                    version + " too old.");
            }
            return topo;
        }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.messaging.CommunicationException

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.