Package org.jboss.gravia.runtime

Examples of org.jboss.gravia.runtime.ServiceException


                result = factoryHolder.getService();

            } catch (Throwable th) {
                String message = "Cannot get factory value from: " + this;
                ServiceException ex = new ServiceException(message, ServiceException.FACTORY_EXCEPTION, th);
                LOGGER.error(message, ex);
            }
        } finally {
            Thread.currentThread().setContextClassLoader(tccl);
        }
View Full Code Here


            ServiceFactoryHolder factoryHolder = getFactoryHolder(module);
            if (factoryHolder != null) {
                try {
                    factoryHolder.ungetService();
                } catch (RuntimeException rte) {
                    ServiceException ex = new ServiceException("Cannot unget factory value", ServiceException.FACTORY_EXCEPTION, rte);
                    LOGGER.error("Cannot unget factory value", ex);
                }
            }
        }
    }
View Full Code Here

                // when the service was registered or the ServiceFactory object throws an exception,
                // null is returned and a Framework event of type {@link FrameworkEvent#ERROR}
                // containing a {@link ServiceException} describing the error is fired.
                if (value == null) {
                    String message = "Cannot get factory value from: " + factory;
                    ServiceException ex = new ServiceException(message, ServiceException.FACTORY_ERROR);
                    LOGGER.error(message, ex);
                }

            } finally {
                factoryRecursion.set(null);
View Full Code Here

                result = factoryHolder.getService();

            } catch (Throwable th) {
                String message = "Cannot get factory value from: " + this;
                ServiceException ex = new ServiceException(message, ServiceException.FACTORY_EXCEPTION, th);
                LOGGER.error(message, ex);
            }
        } finally {
            Thread.currentThread().setContextClassLoader(tccl);
        }
View Full Code Here

            ServiceFactoryHolder factoryHolder = getFactoryHolder(module);
            if (factoryHolder != null) {
                try {
                    factoryHolder.ungetService();
                } catch (RuntimeException rte) {
                    ServiceException ex = new ServiceException("Cannot unget factory value", ServiceException.FACTORY_EXCEPTION, rte);
                    LOGGER.error("Cannot unget factory value", ex);
                }
            }
        }
    }
View Full Code Here

                // when the service was registered or the ServiceFactory object throws an exception,
                // null is returned and a Framework event of type {@link FrameworkEvent#ERROR}
                // containing a {@link ServiceException} describing the error is fired.
                if (value == null) {
                    String message = "Cannot get factory value from: " + factory;
                    ServiceException ex = new ServiceException(message, ServiceException.FACTORY_ERROR);
                    LOGGER.error(message, ex);
                }

            } finally {
                factoryRecursion.set(null);
View Full Code Here

                // when the service was registered or the ServiceFactory object throws an exception,
                // null is returned and a Framework event of type {@link FrameworkEvent#ERROR}
                // containing a {@link ServiceException} describing the error is fired.
                if (result == null) {
                    String message = "Cannot get factory value from: " + this;
                    ServiceException ex = new ServiceException(message, ServiceException.FACTORY_ERROR);
                    Thread.currentThread().setContextClassLoader(null);
                    LOGGER.error(message, ex);
                }

            } catch (Throwable th) {
                String message = "Cannot get factory value from: " + this;
                ServiceException ex = new ServiceException(message, ServiceException.FACTORY_EXCEPTION, th);
                LOGGER.error(message, ex);
            } finally {
                factoryRecursion.remove();
            }
        } finally {
View Full Code Here

            ServiceFactoryHolder factoryHolder = getFactoryHolder(module);
            if (factoryHolder != null) {
                try {
                    factoryHolder.ungetService();
                } catch (RuntimeException rte) {
                    ServiceException ex = new ServiceException("Cannot unget factory value", ServiceException.FACTORY_EXCEPTION, rte);
                    LOGGER.error("Cannot unget factory value", ex);
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.gravia.runtime.ServiceException

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.