Examples of ManagerException


Examples of javango.db.ManagerException

      }
    } else if ("notin".equals(searchType)) {
      return Restrictions.not(Restrictions.in(searchField, (Object[])searchValue));
    } else if ("date".equals(searchType)) {
      if (!(searchValue instanceof Date) || searchValue == null) {
        throw new ManagerException ("__date search requires a non-null instance of java.util.Date");
      }
      Date date = (Date)searchValue;
     
      Calendar from = new GregorianCalendar();
      from.setTime(date);
View Full Code Here

Examples of javango.db.ManagerException

  public String getPkProperty() throws ManagerException {
    Configuration cfg = hibernateUtil.getConfiguration();
    PersistentClass pclass = cfg.getClassMapping(modelClass.getName());

    if (pclass == null) {
      throw new ManagerException("Unable to find class : "
          + modelClass.toString());
    }

    Property componentProperty = pclass.getIdentifierProperty();
    if (componentProperty == null) {
View Full Code Here

Examples of javango.db.ManagerException

    Manager<T> manager = Managers().forClass(model);
   
    try {
      return manager.get(key);
    } catch (ManagerException e) {
      throw new ManagerException(String.format("A database eror occurred while getting an instance of '%s' with key '%s'", model.getName(), key));
    }
  }
View Full Code Here

Examples of javango.db.ManagerException

    Manager<T> manager = Managers().forClass(model);
   
    try {
      return manager.filter(field, value).get();
    } catch (ManagerException e) {
      throw new ManagerException(String.format("A database eror occurred while getting an instance of '%s' with %s='%s'", model.getName(), field, value));
    }
  }
View Full Code Here

Examples of org.apache.avalon.phoenix.interfaces.ManagerException

        }
        catch( final Exception e )
        {
            final String message = REZ.getString( "jmxmanager.error.export.fail", name );
            getLogger().error( message, e );
            throw new ManagerException( message, e );
        }
    }
View Full Code Here

Examples of org.apache.avalon.phoenix.interfaces.ManagerException

        catch( final Exception e )
        {
            final String message =
                REZ.getString( "jmxmanager.error.unexport.fail", name );
            getLogger().error( message, e );
            throw new ManagerException( message, e );
        }
    }
View Full Code Here

Examples of org.apache.avalon.phoenix.interfaces.ManagerException

        {
            final String message =
                REZ.getString( "jmxmanager.error.mbean.load.class",
                               className );
            getLogger().error( message, e );
            throw new ManagerException( message, e );
        }

        // Create a new ModelMBean instance
        ModelMBean mbean = null;
        try
        {
            mbean = (ModelMBean)clazz.newInstance();
            mbean.setModelMBeanInfo( topic );
        }
        catch( final Exception e )
        {
            final String message =
                REZ.getString( "jmxmanager.error.mbean.instantiate",
                               className );
            getLogger().error( message, e );
            throw new ManagerException( message, e );
        }

        // Set the managed resource (if any)
        try
        {
            if( null != target )
            {
                mbean.setManagedResource( target, "ObjectReference" );
            }
        }
        catch( Exception e )
        {
            final String message =
                REZ.getString( "jmxmanager.error.mbean.set.resource",
                               className );
            getLogger().error( message, e );
            throw new ManagerException( message, e );
        }

        return mbean;
    }
View Full Code Here

Examples of org.apache.avalon.phoenix.interfaces.ManagerException

    {
        if( null == type || EMPTY_STRING.equals( type ) )
        {
            final String message =
                REZ.getString( "subcontext.error.no.subcontext" );
            throw new ManagerException( message );
        }
        else if( null != name && this.m_type == null )
        {
            final String message =
                REZ.getString( "subcontext.error.no.subcontext" );
            throw new ManagerException( message );
        }

        // get from list if possible
        final String key = contextKey( name, type );
        SystemManager subcontext =
View Full Code Here

Examples of org.apache.avalon.phoenix.interfaces.ManagerException

        final ManagedEntry entry = (ManagedEntry)m_entries.remove( name );
        if( null == entry )
        {
            final String message =
                REZ.getString( "manager.error.unregister.noentry", name );
            throw new ManagerException( message );
        }

        unexport( name, entry.getExportedObject() );
    }
View Full Code Here

Examples of org.apache.avalon.phoenix.interfaces.ManagerException

            if( !clazz.isInterface() )
            {
                final String message =
                    REZ.getString( "manager.error.verify.notinterface", clazz.getName() );
                throw new ManagerException( message );
            }

            if( !clazz.isInstance( object ) )
            {
                final String message =
                    REZ.getString( "manager.error.verify.notinstance", clazz.getName() );
                throw new ManagerException( message );
            }

            verifyInterface( clazz );
        }
    }
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.