Package org.exist.storage

Examples of org.exist.storage.BrokerPool.release()


                final Configuration _config_ = Configurator.parse(this, broker, collection, XmldbURI.create(name + ".xml"));
                configuration = Configurator.configure(this, _config_);
            } catch (final EXistException e) {
                throw new ConfigurationException(e);
            } finally {
                database.release(broker);
            }
        }
    }

    protected AbstractPrincipal(DBBroker broker, Realm realm, Collection collection, int id, String name)
View Full Code Here


    } catch (EXistException e) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR,
                    "Cannot get current user: {0}", e.getMessage());
            SVNErrorManager.error(err, e, Level.FINE, SVNLogType.DEFAULT);
    } finally {
      database.release(broker);
    }
   
    return null;
    }
View Full Code Here

        catch(final PermissionDeniedException pde) {
            System.err.println( "ERROR: Failed to retrieve database data: " + pde.getMessage() );
            retval = 4;
        }
        finally {
            pool.release( broker );
            BrokerPool.stopAll( false );
        }
        System.exit( retval );
    }
View Full Code Here

                return doEval(context, contextSequence, args);
            } catch(final EXistException ex) {
                throw new XPathException("Unable to get new broker: " + ex.getMessage(), ex);
            } finally {
              db.release(broker); //release the broker
            }
        }

    }
View Full Code Here

      throw new XPathException(this, "An error occurred while getFragmentBetween: " + e.getMessage(), e);
    } catch (final IOException e) {
      throw new XPathException(this, "An error occurred while getFragmentBetween: " + e.getMessage(), e);
    } finally {
      if (brokerPool != null)
        {brokerPool.release(dbBroker);
    }
    return resultFragment;
  }

  private String getStartElementTag(EmbeddedXMLStreamReader reader) {
View Full Code Here

                    try {
                        broker = db.get(null);
                        ((LifeCycle) obj).start(broker);
                       
                    } finally {
                        db.release(broker);
                    }
                }
               
            }
            return obj;
View Full Code Here

        } catch (final EXistException e) {
            throw new IOException(e);
           
        } finally {
            database.release(broker);
        }
    }

    public static DocumentAtExist save(final DBBroker broker, final Configurable instance, final XmldbURI uri) throws IOException {
        try {
View Full Code Here

            throw new XPathException(this, "IO exception while streaming node: " + e.getMessage(), e);
        } catch (final EXistException e) {
            throw new XPathException(this, "Exception while streaming node: " + e.getMessage(), e);
    } finally {
      if (db != null)
        {db.release(broker);}
    }
        return Sequence.EMPTY_SEQUENCE;
  }
}
View Full Code Here

            LOG.debug("Done.");
            if(collectionLocked && collection != null){
                collection.release(Lock.READ_LOCK);
            }
           
            pool.release(broker);
        }
       
    }
   
}
View Full Code Here

            } catch (final Exception e) {
                LOG.error("Exception while executing [" + xqueryResourcePath + "] script for " + subject.getName(), e);
            }
            finally {
                if (pool != null)
                    {pool.release(broker);}
            }
        }
    }
}
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.