Parser parser = new Parser( broker, new User( "admin", null, "dba" ), true );
Parser parser = new Parser( broker, session.getUser(), true );
    public void store( byte[] data, java.lang.String encoding,                       java.lang.String path, boolean replace )         throws RemoteException {        DBBroker broker = null;        try {            broker = pool.get();            if ( broker.getDocument( path ) != null ) {                if ( replace ) {                    LOG.debug( "removing document " + path );                    broker.removeDocument( path );                }                else                    throw new RemoteException( "document " +                        path + " already exists in the database." );            }            broker.flush();            String xml;            try {                xml = new String( data, encoding );            } catch ( UnsupportedEncodingException e ) {                throw new RemoteException( e.getMessage() );            }            long startTime = System.currentTimeMillis();            Parser parser = new Parser( broker, new User( "admin", null, "dba" ), true );            Document doc = parser.parse( xml, path );            LOG.debug( "flushing data files" );            broker.flush();            LOG.debug( "sync" );            broker.sync();            LOG.debug( "parsing " + path + " took " +                ( System.currentTimeMillis() - startTime ) + "ms." );        } catch ( Exception e ) {            LOG.debug( e );            throw new RemoteException( e.getMessage() );        } finally {            pool.release( broker );        }    }