transact.abort(txn); if(e instanceof EXistException) throw (EXistException)e; throw new EXistException(e);
transact.abort(txn); if(e instanceof EXistException) throw (EXistException)e; throw new EXistException("Error storing policy '" + docPath + "'", e);
	public static void storePolicy(DBBroker broker, String docPath) throws EXistException, IOException	{		String docName = docPath;		int lastSlash = docName.lastIndexOf('/');		if(lastSlash >= 0)			docName = docName.substring(lastSlash+1);				URL url = XACMLUtil.class.getResource(docPath);		if(url == null)			return;		String content = toString(url.openStream());		if(content == null)			return;				Collection collection = getPolicyCollection(broker);		if(collection == null)			return;		        TransactionManager transact = broker.getBrokerPool().getTransactionManager();        Txn txn = transact.beginTransaction();        try		{        	IndexInfo info = collection.validateXMLResource(txn, broker, docName, content);        	collection.store(txn, broker, info, content, false);        	transact.commit(txn);		}        catch(Exception e)		{        	transact.abort(txn);        	if(e instanceof EXistException)        		throw (EXistException)e;        	throw new EXistException(e);		}	}