Package org.mom4j.xcp

Examples of org.mom4j.xcp.XcpException


            parser.setErrorHandler(dh);
            parser.parse(in);
            req = new XcpRequestImpl(dh.getRootElement(), dh.getProtocolName(), queue);
        } catch(Exception ex) {
            log.error("Error while reading request data", ex);
            throw new XcpException(ex.getMessage());
        } finally {
            try { dh.cleanUp(); } catch(Exception ex) {}
            this.docHandlers.releaseObject(dh);
        }
       
View Full Code Here


                b.setValue(newPath);
                OutputStream out = req.getOutputStream();
                try {
                    b.writeTo(out);
                } catch(IOException ex) {
                    throw new XcpException(ex.getMessage());
                } finally {
                    try { out.close(); } catch(Exception ex) {}
                }
            } else if(b.getAction().equals(XcpBinding.ACTION_REBIND)) {
                NamingServer.this.bind(b.getPath(), b.getName(), b.getValue());
            } else if(b.getAction().equals(XcpBinding.ACTION_UNBIND)) {
                NamingServer.this.unbind(b.getPath(), b.getName());
            } else if(b.getAction().equals(XcpBinding.ACTION_LOOKUP)) {
                Object o = (Object)NamingServer.this.lookup(b.getPath(), b.getName());
                b.setValue(o);
                OutputStream out = req.getOutputStream();
                try {
                    b.writeTo(out);
                } catch(IOException ex) {
                    throw new XcpException(ex.getMessage());
                } finally {
                    try { out.close(); } catch(Exception ex) {}
                }
            } else if(b.getAction().equals(XcpBinding.ACTION_LIST)) {
                Object o = NamingServer.this.list(b.getPath(), b.getName());
                b.setValue(o);
                OutputStream out = req.getOutputStream();
                try {
                    b.writeTo(out);
                } catch(IOException ex) {
                    throw new XcpException(ex.getMessage());
                } finally {
                    try { out.close(); } catch(Exception ex) {}
                }
            }
        }
View Full Code Here

    {
        try {
            this.console.register(destination, consumerId, messageSelector);
        } catch(javax.jms.JMSException ex) {
            log.error("failed to register messaging client", ex);
            throw new XcpException(ex.getMessage());
        }
    }
View Full Code Here

            writer.write(ret.getTagClosed());
            writer.flush();
            writer.close();
        } catch(Exception ex) {
            log.error("failed to register durable subscriber", ex);
            throw new XcpException(ex.getMessage());
        }
    }
View Full Code Here

    {
        try {
            this.console.unregister(destination, consumerId);
        } catch(javax.jms.JMSException ex) {
            log.error("Unregister failed", ex);
            throw new XcpException(ex.getMessage());
        }
    }
View Full Code Here

    {
        try {
            this.console.unregisterDur(subscriberName);
        } catch(javax.jms.JMSException ex) {
            log.error("UnregisterDur failed", ex);
            throw new XcpException(ex.getMessage());
        }
    }
View Full Code Here

        try {
            String dest = msg.getDestination();
            this.console.send(sid, dest, msg.getMessage(), transacted);
        } catch(Exception ex) {
            log.error("failed sending message", ex);
            throw new XcpException(ex.getMessage());
        }
    }
View Full Code Here

            writer.write(ret.getTagClosed());
            writer.flush();
            writer.close();
        } catch(Exception ex) {
            log.error("Receiving a message failed", ex);
            throw new XcpException(ex.getMessage());
        }
    }
View Full Code Here

    {
        try {
            this.console.createQueue(msg.getDestination());
        } catch(Exception ex) {
            log.error("createQueue failed", ex);
            throw new XcpException(ex.getMessage());
        }
    }
View Full Code Here

    {
        try {
            this.console.createTopic(msg.getDestination());
        } catch(Exception ex) {
            log.error("createTopic failed", ex);
            throw new XcpException(ex.getMessage());
        }
    }
View Full Code Here

TOP

Related Classes of org.mom4j.xcp.XcpException

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.