Examples of ManagedLifecycleException


Examples of org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException

    private void stopJBRServer() throws ManagedLifecycleException {
        try {
            connector.stop();
            logger.info("JBoss Remoting Gateway listener '" + getConfig().getName() + "' stopped.");
        } catch (Throwable throwable) {
            throw new ManagedLifecycleException("Unable to stop Remoting Listener instsance " + getClass().getName(), throwable);
        } finally {
            connector = null;
        }
    }
View Full Code Here

Examples of org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException

                {
                    instanceClass = ClassUtil.forName(classname, LifecycleUtil.class) ;
                }
                catch (final ClassNotFoundException cnfe)
                {
                    throw new ManagedLifecycleException("Could not locate managed instance " + classname) ;
                }

                if (!ManagedLifecycle.class.isAssignableFrom(instanceClass))
                {
                    if (WebGatewayDeploymentFactory.class.isAssignableFrom(instanceClass)) {
                        // These guys are deployed as sub deployments by the main
                        // deployer, so we skip them here if they don't implement
                        // ManagedLifecycle...
                        continue;
                    }
                   
                    throw new ManagedLifecycleException("Managed instance " + classname + " does not implement ManagedLifecycle") ;
                }
               
                final Constructor constructor ;
                try
                {
                    constructor = instanceClass.getConstructor(new Class[] {ConfigTree.class}) ;
                }
                catch (final NoSuchMethodException nsme)
                {
                    throw new ManagedLifecycleException("Managed instance [" + classname +
                            "] does not have correct constructor.  This class must contain a public constructor of the form 'public " +
                            instanceClass.getSimpleName() + "(" + ConfigTree.class.getName() + " config);'");
                }
                final ManagedLifecycle instance ;
                try
                {
                    instance = (ManagedLifecycle)constructor.newInstance(child) ;
                }
                catch (final Exception ex)
                {
                    throw new ManagedLifecycleException("Unexpected exception while instantiating managed instance", ex) ;
                }
                instances.add(instance) ;
            }
        }
       
View Full Code Here

Examples of org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException

      // Needed to retain prior semantics of fail-on-initialise if service lookup fails
        try {
          Collection<EPR> _targetEprs = RegistryUtil.getEprs(_targetServiceCategory,
                    _targetServiceName);
            if (null == _targetEprs || _targetEprs.size() < 1)
                throw new ManagedLifecycleException("EPR <"
                        + _targetServiceName + "> not found in registry");
        } catch (ServiceNotFoundException snfe) {
          throw new ManagedLifecycleException("EPR <" + _targetServiceName + " "
            + _targetServiceName + "> not found in registry");
       }
        catch (final RegistryException re) {
            throw new ManagedLifecycleException(
                    "Unexpected registry exception", re);
        }

        try {
          _serviceInvoker = new ServiceInvoker(_targetServiceCategory, _targetServiceName);
        } catch (MessageDeliverException e) {
          throw new ManagedLifecycleException(e);
        }

        durableSubscriptionName = _config.getAttribute(JMSEpr.DURABLE_SUBSCRIPTION_NAME);
       
        try {
            prepareMessageReceiver();
        }
        catch (final ConnectionException ce) {
            throw new ManagedLifecycleException(
                    "Unexpected connection exception from prepareMessageReceiver",
                    ce);
        }
        catch (final JMSException jmse) {
            throw new ManagedLifecycleException(
                    "Unexpected JMS error from prepareMessageReceiver", jmse);
        }
        catch (final ConfigurationException ce) {
            throw new ManagedLifecycleException(
                    "Unexpected configuration exception from prepareMessageReceiver",
                    ce);
        } catch (final NamingContextException nce) {
            throw new ManagedLifecycleException(
                    "Unexpected naming context exception from prepareMessageReceiver",
                    nce);
        }

        if (_serviceName != null) {
            try {
                RegistryUtil.register(_config, _myEpr);
            }
            catch (final RegistryException re) {
                throw new ManagedLifecycleException(
                        "Unexpected error during registration for epr "
                                + _myEpr, re);
            }
        }
    }
View Full Code Here

Examples of org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException

            pipeline = new ActionProcessingPipeline(getConfig()) ;
            pipeline.initialise() ;
        }
        catch (final ConfigurationException ce)
        {
            throw new ManagedLifecycleException("Unexpected exception configuring action processing pipeline", ce) ;
        }
        pipeline.setTransactional(isTransactional()) ;
       
        try
        {
            RegistryUtil.register(getConfig(), serviceEPR) ;
        }
        catch (final RegistryException re)
        {
            throw new ManagedLifecycleException("Unexpected exception while registering service", re) ;
        }
    }
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.