Package org.exolab.jms.net.connector

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


            String remoteHost = socket.getInetAddress().getHostAddress();
            int remotePort = socket.getPort();
            _remoteURI = URIHelper.create(uri.getScheme(), remoteHost,
                                          remotePort);
        } catch (InvalidURIException exception) {
            throw new ResourceException("Failed to create URI", exception);
        }
    }
View Full Code Here


            String msg = "Failed to connect to " + host + ":" + port;
            _log.debug(msg, exception);
            if (exception instanceof java.net.ConnectException) {
                throw new ConnectException(msg, exception);
            }
            throw new ResourceException(msg, exception);
        }
    }
View Full Code Here

        _remoteURI = info.getURI();
        try {
            _localURI = URIHelper.create("vm", null, -1,
                                         UUIDGenerator.create());
        } catch (InvalidURIException exception) {
            throw new ResourceException("Failed to generate local URI",
                                        exception);
        }
        VMInvoker invoker = new VMInvoker(this);
        _remoteInvoker = VMManagedConnectionAcceptor.connect(principal, info,
                                                             invoker,
View Full Code Here

     */
    public ManagedConnection createManagedConnection(Principal principal,
                                                     ConnectionRequestInfo info)
            throws ResourceException {
        if (!(info instanceof RMIRequestInfo)) {
            throw new ResourceException("Argument 'info' must be of type "
                                        + RMIRequestInfo.class.getName());
        }
        return new RMIManagedConnection(principal, (RMIRequestInfo) info);
    }
View Full Code Here

    public ManagedConnectionAcceptor createManagedConnectionAcceptor(
            Authenticator authenticator, ConnectionRequestInfo info)
            throws ResourceException {

        if (!(info instanceof RMIRequestInfo)) {
            throw new ResourceException("Argument 'info' must be of type "
                                        + RMIRequestInfo.class.getName());
        }
        RMIRequestInfo rmiInfo = (RMIRequestInfo) info;
        return new RMIManagedConnectionAcceptor(authenticator, rmiInfo);
    }
View Full Code Here

        _localInvoker = new RMIInvokerImpl();
        _localInvoker.setConnection(this);
        try {
            UnicastRemoteObject.exportObject(_localInvoker);
        } catch (RemoteException exception) {
            throw new ResourceException("Failed to export invocation handler",
                                        exception);
        }
        try {
            _remoteInvoker = factory.createInvoker(principal, _localInvoker,
                                                   _localURI.toString());
        } catch (AccessException exception) {
            throw new SecurityException(exception.getMessage(), exception);
        } catch (RemoteException exception) {
            if (exception.detail instanceof AccessException) {
                throw new SecurityException(exception.getMessage(),
                                            exception.detail);
            }
            throw new ResourceException("Failed to create invocation handler",
                                        exception);
        }
        _principal = principal;
    }
View Full Code Here

                        = getConnectionEventListener();
                if (listener != null) {
                    listener.pinged(this);
                }
            } catch (RemoteException exception) {
                throw new ResourceException(exception);
            }
        } else {
            throw new IllegalStateException("Connection not established");
        }
    }
View Full Code Here

                if (!UnicastRemoteObject.unexportObject(localInvoker, true)) {
                    _log.warn("Failed to unexport invocation handler");
                }
            }
        } catch (RemoteException exception) {
            throw new ResourceException(
                    "Failed to unexport invocation handler", exception);
        } finally {
            synchronized (this) {
                _localInvoker = null;
                _remoteInvoker = null;
View Full Code Here

        URI result;
        String path = UUIDGenerator.create();
        try {
            result = URIHelper.create("rmi", null, -1, path);
        } catch (InvalidURIException exception) {
            throw new ResourceException("Failed to generate local URI",
                                        exception);
        }
        return result;
    }
View Full Code Here

    public String get(String name) throws ResourceException {
        Object result = null;
        name = getName(name);
        result = _properties.get(name);
        if (result != null && !(result instanceof String)) {
            throw new ResourceException("Invalid type for property=" + name);
        }
        return (String) result;
    }
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.