Permalink
Browse files

[ignore] merge trunk

svn path=/branches/rangeindex/; revision=18661
  • Loading branch information...
shabanovd committed Jul 7, 2013
2 parents 7dc9667 + 52e5f7d commit 3a2e3e929c35b45fd488205382c4e39b62a85eb0
Showing with 410 additions and 98 deletions.
  1. +7 −5 extensions/replication/src/org/exist/replication/jms/subscribe/JMSMessageListener.java
  2. +4 −2 extensions/webdav/src/org/exist/webdav/ExistCollection.java
  3. +5 −4 extensions/webdav/src/org/exist/webdav/ExistDocument.java
  4. +2 −2 nbproject/project.properties
  5. +2 −1 schema/collection.xconf.xsd
  6. +15 −4 src/org/exist/atom/modules/AtomProtocol.java
  7. +16 −5 src/org/exist/backup/restore/SystemImportHandler.java
  8. +6 −2 src/org/exist/collections/CollectionConfigurationManager.java
  9. +1 −0 src/org/exist/config/Configurator.java
  10. +2 −0 src/org/exist/dom/ElementImpl.java
  11. +5 −0 src/org/exist/http/RESTServer.java
  12. +3 −1 src/org/exist/plugin/PluginsManagerImpl.java
  13. +1 −0 src/org/exist/protocolhandler/embedded/EmbeddedUpload.java
  14. +8 −0 src/org/exist/repo/Deployment.java
  15. +2 −0 src/org/exist/security/AbstractRealm.java
  16. +1 −0 src/org/exist/security/PermissionFactory.java
  17. +5 −1 src/org/exist/security/internal/RealmImpl.java
  18. +4 −0 src/org/exist/security/internal/SecurityManagerImpl.java
  19. +8 −4 src/org/exist/security/xacml/XACMLUtil.java
  20. +16 −2 src/org/exist/soap/AdminSoapBindingImpl.java
  21. +6 −2 src/org/exist/storage/BrokerPool.java
  22. +5 −1 src/org/exist/storage/NativeBroker.java
  23. +5 −1 src/org/exist/storage/btree/BTree.java
  24. +4 −4 src/org/exist/storage/index/BFile.java
  25. +29 −6 src/org/exist/storage/txn/TransactionManager.java
  26. +17 −2 src/org/exist/storage/txn/Txn.java
  27. +2 −3 src/org/exist/util/Configuration.java
  28. +15 −4 src/org/exist/util/io/Resource.java
  29. +4 −0 src/org/exist/xmldb/LocalCollection.java
  30. +6 −0 src/org/exist/xmldb/LocalCollectionManagementService.java
  31. +2 −0 src/org/exist/xmldb/LocalIndexQueryService.java
  32. +2 −0 src/org/exist/xmldb/LocalUserManagementService.java
  33. +1 −0 src/org/exist/xmldb/LocalXMLResource.java
  34. +1 −0 src/org/exist/xmldb/LocalXUpdateQueryService.java
  35. +19 −3 src/org/exist/xmlrpc/RpcConnection.java
  36. +5 −0 src/org/exist/xquery/BasicExpressionVisitor.java
  37. +9 −0 src/org/exist/xquery/DefaultExpressionVisitor.java
  38. +2 −0 src/org/exist/xquery/ExpressionVisitor.java
  39. +7 −8 src/org/exist/xquery/FunctionCall.java
  40. +26 −0 src/org/exist/xquery/functions/inspect/FunctionCallVisitor.java
  41. +45 −3 src/org/exist/xquery/functions/inspect/InspectFunction.java
  42. +5 −1 src/org/exist/xquery/functions/inspect/InspectModule.java
  43. +1 −0 src/org/exist/xquery/functions/xmldb/XMLDBSetMimeType.java
  44. +5 −4 src/org/exist/xquery/update/Delete.java
  45. +8 −3 src/org/exist/xquery/update/Insert.java
  46. +13 −1 src/org/exist/xquery/update/Modification.java
  47. +8 −3 src/org/exist/xquery/update/Rename.java
  48. +5 −0 src/org/exist/xquery/update/Replace.java
  49. +8 −3 src/org/exist/xquery/update/Update.java
  50. +2 −1 src/org/exist/xquery/value/HexBinaryValueType.java
  51. +11 −8 test/src/org/exist/xquery/xqts/QT3TS_To_junit.java
  52. +2 −0 test/src/org/exist/xquery/xqts/XQTS_To_junit.java
  53. +17 −4 tools/jetty/etc/jetty.xml
  54. BIN tools/jetty/lib/javax.annotation-1.1.0.v201108011116.jar
  55. BIN tools/jetty/lib/jetty-annotations-8.1.11.v20130520.jar
@@ -418,7 +418,7 @@ private void createDocument(eXistMessage em) {
collection.release(Lock.WRITE_LOCK);
//collection.setTriggersEnabled(true);
}
-
+ txnManager.close(txn);
brokerPool.release(broker);
}
@@ -484,7 +484,7 @@ private void updateMetadataDocument(eXistMessage em) {
if (collection != null) {
collection.release(Lock.WRITE_LOCK);
}
-
+ txnManager.close(txn);
brokerPool.release(broker);
}
@@ -558,6 +558,7 @@ private void deleteDocument(eXistMessage em) {
collection.release(Lock.WRITE_LOCK);
}
+ txnManager.close(txn);
brokerPool.release(broker);
}
@@ -617,6 +618,7 @@ private void deleteCollection(eXistMessage em) {
collection.release(Lock.WRITE_LOCK);
}
+ txnManager.close(txn);
brokerPool.release(broker);
}
@@ -721,7 +723,7 @@ private void createCollection(eXistMessage em) {
if (collection != null) {
collection.release(Lock.WRITE_LOCK);
}
-
+ txnManager.close(txn);
brokerPool.release(broker);
}
}
@@ -809,7 +811,7 @@ private void relocateDocument(eXistMessage em, boolean keepDocument) {
srcCollection.release(Lock.WRITE_LOCK);
}
-
+ txnManager.close(txn);
brokerPool.release(broker);
@@ -886,7 +888,7 @@ private void relocateCollection(eXistMessage em, boolean keepCollection) {
srcCollection.release(Lock.WRITE_LOCK);
}
-
+ txnManager.close(txn);
brokerPool.release(broker);
@@ -276,6 +276,7 @@ void delete() {
collection.release(Lock.WRITE_LOCK);
}
+ txnManager.close(txn);
brokerPool.release(broker);
if(LOG.isDebugEnabled())
@@ -349,6 +350,7 @@ public XmldbURI createCollection(String name) throws PermissionDeniedException,
if (collection != null) {
collection.release(Lock.WRITE_LOCK);
}
+ txnManager.close(txn);
brokerPool.release(broker);
@@ -490,7 +492,7 @@ public XmldbURI createFile(String newName, InputStream is, Long length, String c
if (collection != null) {
collection.release(Lock.WRITE_LOCK);
}
-
+ txnManager.close(txn);
brokerPool.release(broker);
if(LOG.isDebugEnabled())
@@ -597,7 +599,7 @@ void resourceCopyMove(XmldbURI destCollectionUri, String newName, Mode mode) thr
srcCollection.release(Lock.WRITE_LOCK);
}
-
+ txnManager.close(txn);
brokerPool.release(broker);
if(LOG.isDebugEnabled())
@@ -309,7 +309,7 @@ void delete() {
if (collection != null) {
collection.release(Lock.WRITE_LOCK);
}
-
+ txnManager.close(txn);
brokerPool.release(broker);
if (LOG.isDebugEnabled()) {
@@ -503,6 +503,7 @@ public LockToken lock(LockToken inputToken) throws PermissionDeniedException,
document.getUpdateLock().release(Lock.WRITE_LOCK);
}
+ txnManager.close(txn);
brokerPool.release(broker);
if (LOG.isDebugEnabled()) {
@@ -581,7 +582,7 @@ void unlock() throws PermissionDeniedException, DocumentNotLockedException, EXis
if (document != null) {
document.getUpdateLock().release(Lock.WRITE_LOCK);
}
-
+ txnManager.close(txn);
brokerPool.release(broker);
if (LOG.isDebugEnabled()) {
@@ -700,7 +701,7 @@ void resourceCopyMove(XmldbURI destCollectionUri, String newName, Mode mode) thr
srcCollection.release(Lock.WRITE_LOCK);
}
-
+ txnManager.close(txn);
brokerPool.release(broker);
if (LOG.isDebugEnabled()) {
@@ -809,7 +810,7 @@ public LockToken refreshLock(String token) throws PermissionDeniedException,
if (document != null) {
document.getUpdateLock().release(Lock.WRITE_LOCK);
}
-
+ txnManager.close(txn);
if(broker != null) {
brokerPool.release(broker);
}
@@ -51,6 +51,7 @@ file.reference.quartz-2.1.6.jar=lib/core/quartz-2.1.6.jar
file.reference.saxonhe-9.4.0.7.jar=lib/endorsed/saxonhe-9.4.0.7.jar
file.reference.servlet-api-3.0.jar=lib/optional/servlet-api-3.0.jar
file.reference.tagsoup-1.2.jar=extensions/expath/lib/tagsoup-1.2.jar
+file.reference.xml-resolver-1.2.jar=lib/endorsed/xml-resolver-1.2.jar
jar.archive.disabled=${jnlp.enabled}
jar.index=${jnlp.enabled}
jnlp.mixed.code=default
@@ -133,7 +134,6 @@ test.src2.dir=extensions/xslt/test/src
javadoc.nonavbar=false
src.src13.dir=extensions/debuggee/src
build.generated.dir=${build.dir}/generated
-file.reference.resolver-1.2.jar=lib/endorsed/resolver-1.2.jar
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}:\
@@ -221,7 +221,7 @@ file.reference.jmock-2.4.0.jar=extensions/fluent/lib/jmock-2.4.0.jar
javadoc.additionalparam=-J-Xmx320m
javac.classpath=\
${file.reference.xml-apis-1.4.01.jar}:\
- ${file.reference.resolver-1.2.jar}:\
+ ${file.reference.xml-resolver-1.2.jar}:\
${file.reference.serializer-2.7.1.jar}:\
${file.reference.xercesImpl-2.11.0.jar}:\
${file.reference.saxonhe-9.4.0.7.jar}:\
@@ -197,6 +197,7 @@
<xs:attribute name="match" use="optional" type="xs:string"/>
<xs:attribute name="analyzer" use="optional" type="xs:IDREF"/>
<xs:attribute name="boost" use="optional" type="xs:double"/>
+ <xs:attribute name="field" use="optional" type="xs:string"/>
</xs:complexType>
<xs:complexType name="singleQnameAttrType">
@@ -300,4 +301,4 @@
<xs:attribute name="path" type="xs:string" use="optional" form="unqualified"/>
</xs:attributeGroup>
-</xs:schema>
+</xs:schema>
@@ -249,7 +249,9 @@ public void doPost(DBBroker broker, IncomingMessage request,
} catch (final LockException ex) {
transact.abort(transaction);
throw new EXistException("Cannot acquire write lock.", ex);
- }
+ } finally {
+ transact.close(transaction);
+ }
} else if ("entry".equals(root.getLocalName())) {
if (collection == null) {
@@ -361,6 +363,7 @@ public void doPost(DBBroker broker, IncomingMessage request,
* EXistException("Serialization error.",ex);
*/
} finally {
+ transact.close(transaction);
if (feedDoc != null)
{feedDoc.getUpdateLock().release(Lock.WRITE_LOCK);}
}
@@ -483,6 +486,7 @@ public void doPost(DBBroker broker, IncomingMessage request,
transact.abort(transaction);
throw new EXistException("Cannot acquire write lock.", ex);
} finally {
+ transact.close(transaction);
if (feedDoc != null)
{feedDoc.getUpdateLock().release(Lock.WRITE_LOCK);}
}
@@ -509,7 +513,9 @@ public void doPost(DBBroker broker, IncomingMessage request,
} catch (final LockException e) {
transact.abort(transaction);
throw new PermissionDeniedException(e.getMessage());
- }
+ } finally {
+ transact.close(transaction);
+ }
}
}
@@ -620,6 +626,7 @@ public void doPut(DBBroker broker, IncomingMessage request,
transact.abort(transaction);
throw ex;
} finally {
+ transact.close(transaction);
if (feedDoc != null)
{feedDoc.getUpdateLock().release(Lock.WRITE_LOCK);}
}
@@ -701,6 +708,7 @@ public void doPut(DBBroker broker, IncomingMessage request,
* EXistException("Serialization error.",ex);
*/
} finally {
+ transact.close(transaction);
if (feedDoc != null)
{feedDoc.getUpdateLock().release(Lock.WRITE_LOCK);}
@@ -794,7 +802,9 @@ public void doPut(DBBroker broker, IncomingMessage request,
} catch (final LockException e) {
transact.abort(transaction);
throw new PermissionDeniedException(e.getMessage());
- }
+ } finally {
+ transact.close(transaction);
+ }
}
}
@@ -820,7 +830,7 @@ public void doDelete(DBBroker broker, IncomingMessage request,
transact.commit(transaction);
response.setStatusCode(204);
} finally {
- transact.abort(transaction);
+ transact.close(transaction);
}
return;
}
@@ -892,6 +902,7 @@ public void doDelete(DBBroker broker, IncomingMessage request,
transact.abort(transaction);
throw new EXistException("Cannot acquire write lock.", ex);
} finally {
+ transact.close(transaction);
if (feedDoc != null) {
feedDoc.getUpdateLock().release(Lock.WRITE_LOCK);
}
@@ -212,7 +212,9 @@ private DeferredPermission restoreCollectionEntry(Attributes atts) throws SAXExc
} catch (final Exception e) {
txnManager.abort(txn);
throw new SAXException(e);
- }
+ } finally {
+ txnManager.close(txn);
+ }
currentCollection = mkcol(collUri, getDateFromXSDateTimeStringForItem(created, name));
@@ -423,6 +425,7 @@ private DeferredPermission restoreResourceEntry(Attributes atts) throws SAXExcep
txnManager.abort(txn);
throw new IOException(e);
} finally {
+ txnManager.close(txn);
// if (resource != null)
// resource.getUpdateLock().release(Lock.READ_LOCK);
}
@@ -455,7 +458,9 @@ private void restoreDeletedEntry(Attributes atts) {
txnManager.abort(txn);
listener.warn("Failed to remove deleted collection: " + name + ": " + e.getMessage());
- }
+ } finally {
+ txnManager.close(txn);
+ }
}
} catch (final Exception e) {
listener.warn("Failed to remove deleted collection: " + name + ": " + e.getMessage());
@@ -483,8 +488,10 @@ private void restoreDeletedEntry(Attributes atts) {
txnManager.abort(txn);
listener.warn("Failed to remove deleted resource: " + name + ": " + e.getMessage());
- }
- }
+ } finally {
+ txnManager.close(txn);
+ }
+ }
} catch (final Exception e) {
listener.warn("Failed to remove deleted resource: " + name + ": " + e.getMessage());
}
@@ -541,7 +548,9 @@ private Collection mkcol(XmldbURI collPath, Date created) throws SAXException {
} catch (final Exception e) {
txnManager.abort(txn);
throw new SAXException(e);
- }
+ } finally {
+ txnManager.close(txn);
+ }
}
class CollectionDeferredPermission extends AbstractDeferredPermission<Collection> {
@@ -579,6 +588,7 @@ public void apply() {
throw xe;
} finally {
+ txnManager.close(txn);
getTarget().release(Lock.WRITE_LOCK);
}
@@ -626,6 +636,7 @@ public void apply() {
throw xe;
} finally {
+ txnManager.close(txn);
getTarget().getUpdateLock().release(Lock.WRITE_LOCK);
}
@@ -342,7 +342,9 @@ private void checkCreateCollection(DBBroker broker, XmldbURI uri) throws EXistEx
} catch (final Exception e) {
transact.abort(txn);
throw new EXistException("Failed to initialize '" + uri + "' : " + e.getMessage());
- }
+ } finally {
+ transact.close(txn);
+ }
}
/** Create a stored default configuration document for the root collection
@@ -392,7 +394,9 @@ public void checkRootCollectionConfig(DBBroker broker) throws EXistException, Pe
} catch (final CollectionConfigurationException e) {
transact.abort(transaction);
throw new EXistException(e.getMessage());
- }
+ } finally {
+ transact.close(transaction);
+ }
}
/*
@@ -1220,6 +1220,7 @@ public static DocumentAtExist save(Configurable instance, DBBroker broker, Colle
throw new IOException(e);
} finally {
+ transact.close(txn);
broker.setSubject(currentUser);
}
}
@@ -425,6 +425,7 @@ public Node appendChild(Node child) throws DOMException {
transact.abort(transaction);
throw new DOMException(DOMException.INVALID_STATE_ERR, e.getMessage());
} finally {
+ transact.close(transaction);
ownerDocument.getBrokerPool().release(broker);
}
}
@@ -1179,6 +1180,7 @@ public Node insertBefore(Node newChild, Node refChild) throws DOMException {
transact.abort(transaction);
LOG.warn("Exception while inserting node: " + e.getMessage(), e);
} finally {
+ transact.close(transaction);
ownerDocument.getBrokerPool().release(broker);
}
return null;
Oops, something went wrong.

0 comments on commit 3a2e3e9

Please sign in to comment.