Package org.osgi.service.component

Examples of org.osgi.service.component.ComponentException


        {
            // only register the component if there is a m_registration for it !
            if ( m_componentHoldersByName.get( key ) != null )
            {
                // this is not expected if all works ok
                throw new ComponentException( "The component name '{0}" + componentHolder.getComponentMetadata().getName()
                    + "' has already been registered." );
            }

            m_componentHoldersByName.put( key, componentHolder );
        }
View Full Code Here


        if ( m_name == null )
        {
            // 112.4.3 name is optional defaulting to implementation class name since DS 1.1
            if ( m_namespaceCode < XmlHandler.DS_VERSION_1_1 )
            {
                throw new ComponentException( "The component name has not been set" );
            }
            setName( getImplementationClassName() );
        }

        // 112.10 There must be one implementation element and the class atribute is required
View Full Code Here

     *
     * @param reason The explanation for failing to validate this component.
     */
    ComponentException validationFailure( String reason )
    {
        return new ComponentException( "Component " + getName() + " validation failed: " + reason );
    }
View Full Code Here

        // Get the Metadata-Location value from the manifest
        String descriptorLocations = ( String ) m_bundle.getHeaders().get( "Service-Component" );
        if ( descriptorLocations == null )
        {
            throw new ComponentException( "Service-Component entry not found in the manifest" );
        }

        initialize( descriptorLocations );
    }
View Full Code Here

   *
   * @see ch.digitalcafe.weblounge.zfv.ZFVPersistence#setEntityManager(javax.persistence.EntityManager)
   */
  public void setEntityManager(EntityManager em) throws ComponentException {
    if (em == null)
      throw new ComponentException("Entity manager must not be null");
    logger.debug("Entity manager for site 'zfv' connected");
    this.entityManager = em;
  }
View Full Code Here

TOP

Related Classes of org.osgi.service.component.ComponentException

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.