Permalink
Browse files

Restore previous createRepository behavior - bug19066

Previously Catalog.createRepository would create the repository if it did not
exist, or open it otherwise in the Sesame client. When the override parameter
was added to the request, the default behavior of put on a repository changed.
This change adds the override='false' to all put repository requests to restore
the previous behavior for the Java Sesame client APIs.

This allows the events test to run unmodified, so no release notes are needed
as the external API has not changed.

Also added a small change to build.xml to give the events test JVM more
space to run using jvmargs.

Tests added for:     none
make test-suite run? yes, and test-stress-events

Signed-off-by: Ahmon Dancy <dancy@franz.com>
  • Loading branch information...
1 parent 3c938f3 commit 9052a24a09deaa514fac94626e76d439f924ebd3 Ross Jekel committed with Ahmon Dancy Feb 27, 2010
Showing with 10 additions and 3 deletions.
  1. +3 −2 build.xml
  2. +2 −1 src/com/franz/agraph/http/AGHTTPClient.java
  3. +5 −0 src/com/franz/agraph/http/AGProtocol.java
View
@@ -88,10 +88,11 @@
<attribute name="tasknamex" default="java"/>
<attribute name="classname"/>
<attribute name="arg"/>
+ <attribute name="maxmemory" default="128m"/>
<sequential>
<property name="log" value="info"/>
<java classname="@{classname}" failonerror="true" taskname="@{tasknamex}"
- fork="true">
+ fork="true" maxmemory="@{maxmemory}">
<sysproperty key="org.apache.commons.logging.Log"
value="org.apache.commons.logging.impl.SimpleLog"/>
<sysproperty key="org.apache.commons.logging.simplelog.defaultlog"
@@ -175,7 +176,7 @@
<target name="test-stress-events"
depends="compile"
description="Run test.stress.Events">
- <run-java tasknamex="ev" classname="test.stress.Events" arg=""/>
+ <run-java tasknamex="ev" classname="test.stress.Events" arg="" maxmemory="512m"/>
</target>
<target name="tutorial"
@@ -13,6 +13,7 @@
import static com.franz.agraph.http.AGProtocol.AMOUNT_PARAM_NAME;
import static org.openrdf.http.protocol.Protocol.ACCEPT_PARAM_NAME;
+import static com.franz.agraph.http.AGProtocol.OVERRIDE_PARAM_NAME;
import info.aduna.net.http.HttpClientUtil;
import java.io.IOException;
@@ -287,7 +288,7 @@ protected final void releaseConnection(HttpMethod method) {
public void putRepository(String repositoryURL) throws IOException,
RepositoryException, UnauthorizedException, AGHttpException {
Header[] headers = new Header[0];
- NameValuePair[] params = new NameValuePair[0];
+ NameValuePair[] params = { new NameValuePair(OVERRIDE_PARAM_NAME, "false") };
put(repositoryURL,headers,params,null);
}
@@ -69,6 +69,11 @@
public static final String AUTOCOMMIT_PARAM_NAME = "autoCommit";
/**
+ * Parameter name for the 'override' parameter for put on a repository.
+ */
+ public static final String OVERRIDE_PARAM_NAME = "override";
+
+ /**
* Relative location of session close.
*/
public static final String CLOSE = "close";

0 comments on commit 9052a24

Please sign in to comment.