/** * {@inheritDoc} */ @Override public synchronized void close( PartitionTxn transaction ) throws LdapException { try { sync(); } catch ( IOException ioe ) { throw new LdapOtherException( ioe.getMessage() ); } }
private Object executeProcedure( OperationContext opContext, String procedure, Object[] values ) throws LdapException { try { Entry spUnit = manager.findStoredProcUnit( opContext.getSession(), procedure ); StoredProcEngine engine = manager.getStoredProcEngineInstance( spUnit ); return engine.invokeProcedure( opContext.getSession(), procedure, values ); } catch ( Exception e ) { LdapOtherException lne = new LdapOtherException( e.getMessage(), e ); lne.initCause( e ); throw lne; } } }
LdapOtherException ldapOtherException = new LdapOtherException( ldapResult.getDiagnosticMessage() ); ldapOtherException.setResolvedDn( ldapResult.getMatchedDn() );
LdapOtherException ldapOtherException = new LdapOtherException( ldapResult.getDiagnosticMessage() ); ldapOtherException.setResolvedDn( ldapResult.getMatchedDn() );
/** * {@inheritDoc} */ @Override protected void doDestroy( PartitionTxn partitionTxn ) throws LdapException { super.doDestroy( partitionTxn ); try { ldifFile.close(); } catch ( IOException ioe ) { throw new LdapOtherException( ioe.getMessage(), ioe ); } }
LdapOtherException ldapOtherException = new LdapOtherException( ldapResult.getDiagnosticMessage() ); ldapOtherException.setResolvedDn( ldapResult.getMatchedDn() );
throw new LdapOtherException( e.getMessage(), e ); throw new LdapOtherException( e.getMessage(), e );
/** * {@inheritDoc} */ @Override @SuppressWarnings("unchecked") public boolean hasGreaterOrEqual( PartitionTxn transaction, K key ) throws LdapException { try { // See if we can find the border between keys greater than and less // than in the set of keys. This will be the spot we search from. jdbm.helper.Tuple tuple = bt.findGreaterOrEqual( key ); // Test for equality first since it satisfies both greater/less than if ( null != tuple && keyComparator.compare( ( K ) tuple.getKey(), key ) == 0 ) { return true; } // Greater searches are easy and quick thanks to findGreaterOrEqual // A null return above means there were no equal or greater keys return ( null != tuple ); } catch ( IOException ioe ) { throw new LdapOtherException( ioe.getMessage() ); } }
/** * {@inheritDoc} */ @Override public void put( PartitionTxn partitionTxn, K key, V value ) throws LdapException { try { if ( ( value == null ) || ( key == null ) ) { throw new IllegalArgumentException( I18n.err( I18n.ERR_594 ) ); } V existingVal = bt.insert( key, value ); if ( existingVal == null ) { count++; } } catch ( IOException ioe ) { LOG.error( I18n.err( I18n.ERR_131, key, name ), ioe ); throw new LdapOtherException( ioe.getMessage(), ioe ); } }
throw new LdapOtherException( knfe.getMessage(), knfe ); throw new LdapOtherException( ioe.getMessage(), ioe );
/** * Clone the registries before doing any modification on it. Relax it * too so that we can update it. * * @return The cloned Registries * @throws LdapException If the Registries cannot be cloned */ private Registries cloneRegistries() throws LdapException { try { // Relax the controls at first // Clone the Registries Registries clonedRegistries = registries.clone(); // And update references. We may have errors, that may be fixed // by the new loaded schemas. clonedRegistries.checkRefInteg(); // Now, relax the cloned Registries if there is no error clonedRegistries.setRelaxed(); return clonedRegistries; } catch ( CloneNotSupportedException cnse ) { throw new LdapOtherException( cnse.getMessage(), cnse ); } }
/** * Clone the registries before doing any modification on it. Relax it * too so that we can update it. * * @return The cloned Registries * @throws LdapException If the Registries cannot be cloned */ private Registries cloneRegistries() throws LdapException { try { // Relax the controls at first // Clone the Registries Registries clonedRegistries = registries.clone(); // And update references. We may have errors, that may be fixed // by the new loaded schemas. clonedRegistries.checkRefInteg(); // Now, relax the cloned Registries if there is no error clonedRegistries.setRelaxed(); return clonedRegistries; } catch ( CloneNotSupportedException cnse ) { throw new LdapOtherException( cnse.getMessage(), cnse ); } }
/** * {@inheritDoc} */ @Override public boolean hasGreaterOrEqual( PartitionTxn transaction, K key ) throws LdapException { TupleCursor<K, V> cursor = null; try { cursor = bt.browseFrom( key ); return cursor.hasNext(); } catch ( IOException ioe ) { throw new LdapOtherException( ioe.getMessage() ); } finally { if ( cursor != null ) { cursor.close(); } } }
/** * Clone the registries before doing any modification on it. Relax it * too so that we can update it. * * @return The cloned Registries * @throws LdapException If the Registries cannot be cloned */ private Registries cloneRegistries() throws LdapException { try { // Relax the controls at first // Clone the Registries Registries clonedRegistries = registries.clone(); // And update references. We may have errors, that may be fixed // by the new loaded schemas. clonedRegistries.checkRefInteg(); // Now, relax the cloned Registries if there is no error clonedRegistries.setRelaxed(); return clonedRegistries; } catch ( CloneNotSupportedException cnse ) { throw new LdapOtherException( cnse.getMessage(), cnse ); } }
protected void checkOidIsUnique( Entry entry ) throws LdapException { String oid = getOid( entry ); if ( schemaManager.getGlobalOidRegistry().contains( oid ) ) { throw new LdapOtherException( I18n.err( I18n.ERR_335, oid ) ); } }
throw new LdapOtherException( ioe.getMessage(), ioe ); throw new LdapOtherException( ioe.getMessage(), ioe ); throw new LdapOtherException( ioe2.getMessage(), ioe2 );
DupsContainer<V> getDupsContainer( byte[] serialized ) throws LdapException { if ( serialized == null ) { return new DupsContainer<V>( new ArrayTree<V>( valueComparator ) ); } if ( BTreeRedirectMarshaller.isRedirect( serialized ) ) { try { return new DupsContainer<V>( BTreeRedirectMarshaller.INSTANCE.deserialize( serialized ) ); } catch ( IOException ioe ) { throw new LdapOtherException( ioe.getMessage() ); } } try { return new DupsContainer<V>( marshaller.deserialize( serialized ) ); } catch ( IOException ioe ) { throw new LdapOtherException( ioe.getMessage() ); } }
throw new LdapOtherException( fnfe.getMessage(), fnfe );
throw new LdapOtherException( ioe.getMessage(), ioe ); throw new LdapOtherException( ioe.getMessage(), ioe ); throw new LdapOtherException( ioe2.getMessage(), ioe2 );
throw new LdapOtherException( ioe.getMessage(), ioe ); throw new LdapOtherException( ioe.getMessage(), ioe );