Package anvil.server

Examples of anvil.server.OperationFailedException


          synapse = new Synapse(load(id));
        }
        cache(ident, synapse);
        return synapse;
      } catch (SQLException e) {
        throw new OperationFailedException(e);
      }
    }
  }
View Full Code Here


      return (Synapse[])list.toArray(new Synapse[list.size()]);
     
    } catch (SQLException e) {
      cleanup(conn);
      e.fillInStackTrace();
      throw new OperationFailedException(e);
    } finally {
      release(impl);
    }   
  }
View Full Code Here

    try {
      Synapse syn = new Synapse(new SynapseImpl(this, getNextSequence(), type, name));
      cache(new Long(syn.getId()), syn);
      return syn;
    } catch (SQLException e) {
      throw new OperationFailedException(e);
    }
  }
View Full Code Here

   

    if (synapse != null) {
      return synapse;
    }
    throw new OperationFailedException("Synapse #"+id+" not found");
  }
View Full Code Here

  {
    try {
      _synapse.getBrain().save(this);
      _changed = false;
    } catch (Throwable t) {
      throw new OperationFailedException(t);
    }

  }
View Full Code Here

    if (_synapse == null) {
      try {
        _synapse = _brain.load(_id);
        _synapse.setFacade(this);
      } catch (java.sql.SQLException e) {
        throw new  OperationFailedException(e);
      }
    }
    return _synapse;
  }
View Full Code Here

  {
    try {
      _brain.save(this);
      _changed = false;
    } catch (Throwable t) {
      throw new OperationFailedException(t);
    }
  }
View Full Code Here

            try {
              Array others = (Array)Serialization.unserialize(null, a.get().toString());
              _cache.union(others);

            } catch(UnserializationException ioe) {
              throw new OperationFailedException("Data unserialization failed: "+ioe);
            }

          } else {
            //System.err.println("Load: Unknown attr: "+id+" = "+a.get());
          }
        }
       
        citizenFound = true;
        _cacheOrig = (Array)_cache.clone();
      }

    } catch (Exception e) {
      throw new OperationFailedException("Creating of citizen failed", e);
     
    } finally {
      LDAPRealm.cleanupContext(connImpl);
    }
    if (!citizenFound) {     
View Full Code Here

      ctx.unbind(dn);
      realm.removeCitizen(username);
      //this citizen no longer exists!
 
    } catch (NameNotFoundException e) {
      throw new OperationFailedException("User '"+username+"' not found!");

    } catch (Exception e) {
      throw new OperationFailedException(e.getMessage());
     
    } finally {
      LDAPRealm.cleanupContext(connImpl);
    }
  }
View Full Code Here

    return null;
  }
 
 
  public Tribe createTribe(String name) throws OperationFailedException {
    if (name == null) throw new OperationFailedException("Null tribe name!");
   
    PooledConnection connImpl = null;
    DirContext ctx = null;
 
    try {
      connImpl = _manager.acquire(_contextPool);
      ctx = (DirContext)connImpl.getConnection();
     
      Attributes at = new BasicAttributes();
      at.put(groupObjectClass);
     
      at.put("cn", name);
     
      ctx.bind("cn="+name+",ou=groups", null, at);
     
      //"refresh" root tribe
      if (_rootTribe != null) {
        _rootTribe.refreshCitizens();
      }

      return (Tribe)getTribe(name);
     
    } catch (NameAlreadyBoundException e) {
      throw new OperationFailedException("Group '"+name+"' already exists!");

    } catch (Exception e) {
      _zone.log().error("LDAPRealm.createTribe(): "+e);
     
    } finally {
View Full Code Here

TOP

Related Classes of anvil.server.OperationFailedException

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.