Package org.apache.avalon.framework.service

Examples of org.apache.avalon.framework.service.ServiceException


        {
            return beanFactory.getBean(key);
        }
        catch(Exception e)
        {
            throw new ServiceException(key, "Unable to lookup service using Spring's BeanFactory", e);
        }
    }
View Full Code Here


                            services.keySet() );
        if( 3 != services.size() )
        {
            final String message =
                "Expected to get 3 services but got " + services.size();
            throw new ServiceException( Service1.class.getName() + "{}",
                                        message );
        }

        final Iterator iterator = services.keySet().iterator();
        while( iterator.hasNext() )
        {
            final String key = (String)iterator.next();
            final Service1 service1 = (Service1)services.get( key );
            if( null == service1 )
            {
                final String message = "Expected non null service entry for " +
                    key;
                throw new ServiceException( Service1[].class.getName(),
                                            message );
            }
        }
    }
View Full Code Here

                            Arrays.asList( services ) );
        if( 3 != services.length )
        {
            final String message =
                "Expected to get 3 services but got " + services.length;
            throw new ServiceException( Service1[].class.getName(), message );
        }

        checkEntry( services, 0 );
        checkEntry( services, 1 );
        checkEntry( services, 2 );
View Full Code Here

    {
        if( null == services[ index ] )
        {
            final String message = "Expected non null service entry for " +
                index;
            throw new ServiceException( Service1[].class.getName(), message );
        }
    }
View Full Code Here

                    Web3DataSourceSelectorImpl.pools.put(obj, pool);
                }
            }
        } catch (Exception ex) {
            getLogger().error(ex.getMessage(), ex);
            throw new ServiceException(null, ex.getMessage());
        } finally {
            Web3DataSourceSelectorImpl.lock.release();
        }
        getLogger().debug("Returning Web3DataSource[" + pool + "]");
        return pool;
View Full Code Here

        }
    }

    public Object select(Object hint) throws ServiceException {
        if (!isSelectable(hint))
            throw new ServiceException((String)hint, "Non-existing component for this hint");
        String stringHint = (String)hint;
        return components.get(stringHint);
    }
View Full Code Here

                if ( o instanceof ComponentSelector ) {
                    o = new ComponentSelectorWrapper((ComponentSelector)o);
                }
                return o;
            } catch (ComponentException ce) {
                throw new ServiceException("ComponentManagerWrapper", "Unable to lookup component: " + role, ce);
            }
        }
View Full Code Here

                if ( o instanceof ComponentSelector ) {
                    o = new ComponentSelectorWrapper((ComponentSelector)o);
                }
                return o;
            } catch (ComponentException ce) {
                throw new ServiceException("ComponentServiceWrapper", "Unable to lookup component: " + role, ce);
            }
        }
View Full Code Here

        }
    }

    public Object select(Object hint) throws ServiceException {
        if (!isSelectable(hint))
            throw new ServiceException((String)hint, "Non-existing component for this hint");
        String stringHint = (String)hint;
        return components.get(stringHint);
    }
View Full Code Here

        // add the provider for the authentication context
        try {
            AuthenticationContextProvider contextProvider = new AuthenticationContextProvider();
            contextManager.addSessionContextProvider(contextProvider, AuthenticationConstants.SESSION_CONTEXT_NAME);
        } catch (ProcessingException local) {
            throw new ServiceException("Unable to register provider for authentication context.", local);
        }
  }
View Full Code Here

TOP

Related Classes of org.apache.avalon.framework.service.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.