String path = (collName.startsWith("/db") ? collName : parent.getPath() + '/' + collName);
String path = NativeBroker.checkPath(collName, parent.getPath());
    public void removeCollection( String collName ) throws XMLDBException {    	String path = (collName.startsWith("/db") ? collName :     		parent.getPath() + '/' + collName);        TransactionManager transact = brokerPool.getTransactionManager();        Txn transaction = transact.beginTransaction();        DBBroker broker = null;        org.exist.collections.Collection collection = null;        try {            broker = brokerPool.get(user);            collection = broker.openCollection(path, Lock.WRITE_LOCK);            if(collection == null) {                transact.abort(transaction);            	throw new XMLDBException(ErrorCodes.INVALID_COLLECTION,            			"Collection " + path + " not found");            }            LOG.debug( "removing collection " + path );            broker.removeCollection(transaction, collection);            transact.commit(transaction);        } catch ( EXistException e ) {            transact.abort(transaction);        	e.printStackTrace();            throw new XMLDBException( ErrorCodes.VENDOR_ERROR,                "failed to remove collection " + collName, e );        } catch ( PermissionDeniedException e ) {            transact.abort(transaction);            throw new XMLDBException( ErrorCodes.PERMISSION_DENIED,                e.getMessage(), e );        } finally {        	if(collection != null)        		collection.release();            brokerPool.release( broker );        }    }