Package org.exolab.jms.net.connector

Examples of org.exolab.jms.net.connector.ResourceException


        String name = getName(uri);

        try {
            registry.bind(name, factory);
        } catch (AlreadyBoundException exception) {
            throw new ResourceException("Binding exists for " + name,
                                        exception);
        } catch (RemoteException exception) {
            throw new ResourceException("Failed to bind connection factory",
                                        exception);
        }
    }
View Full Code Here


                              Registry registry) throws ResourceException {
        String name = getName(uri);
        try {
            registry.unbind(name);
        } catch (NotBoundException exception) {
            throw new ResourceException("No binding exists for " + name,
                                        exception);
        } catch (RemoteException exception) {
            throw new ResourceException("Failed to unbind connection factory",
                                        exception);
        }
    }
View Full Code Here

        if (registry == null) {
            try {
                registry = LocateRegistry.getRegistry(port);
                port = 0;
            } catch (RemoteException nested) {
                throw new ResourceException(
                        "Failed to create or locate a registry, port=" + port,
                        nested);
            }
        }

        _factory = new RMIInvokerFactoryImpl(_authenticator, this, listener);

        try {
            UnicastRemoteObject.exportObject(_factory, port);
        } catch (RemoteException exception) {
            throw new ResourceException("Failed to export object", exception);
        }

        RegistryHelper.bind(_factory, _uri, registry);
        _registry = registry;
    }
View Full Code Here

                    if (!UnicastRemoteObject.unexportObject(_registry, true)) {
                        _log.warn("Failed to unexport registry");
                    }
                }
            } catch (RemoteException exception) {
                throw new ResourceException(
                        "Failed to close connection acceptor", exception);
            } finally {
                _factory = null;
                _registry = null;
            }
View Full Code Here

                host = info.getHostAddress();
            }
            int backlog = info.getConnectionRequestQueueSize();
            _socket = createServerSocket(port, backlog, host);
        } catch (IOException exception) {
            throw new ResourceException(
                    "Failed to create server socket for URI=" + info.getURI(),
                    exception);
        }

        _group = new ThreadGroup(_uri.toString());
View Full Code Here

     * @throws ResourceException if connections cannot be accepted
     */
    public synchronized void accept(ManagedConnectionAcceptorListener listener)
            throws ResourceException {
        if (_dispatcher != null) {
            throw new ResourceException(
                    "Acceptor is already accepting connections on URI=" + _uri);
        }

        _dispatcher = new Dispatcher(listener);
        _dispatcher.start();
View Full Code Here

        } else if (_socket != null) {
            try {
                _socket.close();
                _socket = null;
            } catch (IOException exception) {
                throw new ResourceException("Failed to close socket",
                                            exception);
            }
        }
    }
View Full Code Here

        }
        if (multiplexer != null) {
            try {
                multiplexer.ping(0);
            } catch (IOException exception) {
                throw new ResourceException(exception.getMessage(), exception);
            }
        } else {
            throw new IllegalStateException("Connection not established");
        }
    }
View Full Code Here

            } else {
                if (endpoint != null) {
                    try {
                        endpoint.close();
                    } catch (IOException exception) {
                        throw new ResourceException("Failed to close endpoint",
                                                    exception);
                    }
                }
            }
        } finally {
View Full Code Here

                if (channel != null) {
                    channel.destroy();
                }
            }
        } else {
            response = new Response(new ResourceException("Connection lost"));
        }

        return response;
    }
View Full Code Here

TOP

Related Classes of org.exolab.jms.net.connector.ResourceException

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.