[Mulgara-svn] r138 - in branches/xafix-impl: conf src/jar/jrdf/java/org/mulgara/jrdf src/jar/query/java/org/mulgara/query/rdf src/jar/resolver/java/org/mulgara/resolver src/jar/server-rmi/java/org/mulgara/server/rmi
andrae at mulgara.org
andrae at mulgara.org
Thu Nov 23 06:03:35 UTC 2006
Author: andrae
Date: 2006-11-23 00:03:35 -0600 (Thu, 23 Nov 2006)
New Revision: 138
Modified:
branches/xafix-impl/conf/log4j-mulgara.xml
branches/xafix-impl/src/jar/jrdf/java/org/mulgara/jrdf/JRDFGraphElementFactory.java
branches/xafix-impl/src/jar/query/java/org/mulgara/query/rdf/VariableNodeImpl.java
branches/xafix-impl/src/jar/resolver/java/org/mulgara/resolver/ConstraintOperations.java
branches/xafix-impl/src/jar/resolver/java/org/mulgara/resolver/StringPoolSession.java
branches/xafix-impl/src/jar/resolver/java/org/mulgara/resolver/TransactionalAnswer.java
branches/xafix-impl/src/jar/server-rmi/java/org/mulgara/server/rmi/BlankNodeWrapperAnswer.java
Log:
After 3 days of pouring over the jrdf implementation we finally have a 100% pass
rate again.
With this commit the transaction fix enters beta. I will give it a couple of
weeks for people to test it and then I will migrate it over into trunk.
The only thing left is to do a quick IP sweep and make sure all the copyright
notices and licence statements are correct.
Modified: branches/xafix-impl/conf/log4j-mulgara.xml
===================================================================
--- branches/xafix-impl/conf/log4j-mulgara.xml 2006-11-21 20:20:50 UTC (rev 137)
+++ branches/xafix-impl/conf/log4j-mulgara.xml 2006-11-23 06:03:35 UTC (rev 138)
@@ -62,10 +62,10 @@
<category name="org.mulgara.content.rdfxml.Parser">
<priority value="INFO"/>
</category>
- -->
<category name="org.mulgara.resolver.DatabaseSession">
<priority value="info"/>
</category>
+ -->
<!-- WARN and above goes to console, all else to logfile appender -->
<root>
Modified: branches/xafix-impl/src/jar/jrdf/java/org/mulgara/jrdf/JRDFGraphElementFactory.java
===================================================================
--- branches/xafix-impl/src/jar/jrdf/java/org/mulgara/jrdf/JRDFGraphElementFactory.java 2006-11-21 20:20:50 UTC (rev 137)
+++ branches/xafix-impl/src/jar/jrdf/java/org/mulgara/jrdf/JRDFGraphElementFactory.java 2006-11-23 06:03:35 UTC (rev 138)
@@ -63,12 +63,10 @@
* @licence <a href="{@docRoot}/../../LICENCE">Mozilla Public License v1.1</a>
*/
public class JRDFGraphElementFactory implements GraphElementFactory {
- public static int bnsuffix = 0;
-
/**
* Logger. This is named after the class.
*/
- private final static Logger logger =
+ private static final Logger logger =
Logger.getLogger(JRDFGraphElementFactory.class.getName());
/**
@@ -99,8 +97,9 @@
*
* @return a newly minted blank node.
*/
- public synchronized BlankNode createBlankNode() {
- return new VariableNodeImpl("JRDF-BN" + (bnsuffix++));
+ public BlankNode createBlankNode() {
+ BlankNode node = new BlankNodeImpl();
+ return node;
}
/**
Modified: branches/xafix-impl/src/jar/query/java/org/mulgara/query/rdf/VariableNodeImpl.java
===================================================================
--- branches/xafix-impl/src/jar/query/java/org/mulgara/query/rdf/VariableNodeImpl.java 2006-11-21 20:20:50 UTC (rev 137)
+++ branches/xafix-impl/src/jar/query/java/org/mulgara/query/rdf/VariableNodeImpl.java 2006-11-23 06:03:35 UTC (rev 138)
@@ -75,11 +75,6 @@
private final String variableName;
/**
- * The unique blank node mapping.
- */
- private BlankNodeImpl blankNode = null;
-
- /**
* Create a new variableNode.
*
* @param newVariableName the variable name to set.
@@ -100,26 +95,6 @@
}
/**
- * Sets the blank node for variable.
- *
- * @param newBlankNode the blank node for the variable.
- */
- public void setBlankNode(final BlankNodeImpl newBlankNode) {
-
- blankNode = newBlankNode;
- }
-
- /**
- * Returns the current blank node.
- *
- * @return the current blank node.
- */
- public BlankNodeImpl getBlankNode() {
-
- return blankNode;
- }
-
- /**
* Return itself - variables are immutable.
*
* @return a copy.
@@ -180,6 +155,6 @@
*/
public String toString() {
- return "_variable " + variableName + " :_node" + blankNode;
+ return "_variable " + variableName;
}
}
Modified: branches/xafix-impl/src/jar/resolver/java/org/mulgara/resolver/ConstraintOperations.java
===================================================================
--- branches/xafix-impl/src/jar/resolver/java/org/mulgara/resolver/ConstraintOperations.java 2006-11-21 20:20:50 UTC (rev 137)
+++ branches/xafix-impl/src/jar/resolver/java/org/mulgara/resolver/ConstraintOperations.java 2006-11-23 06:03:35 UTC (rev 138)
@@ -41,7 +41,6 @@
// Local packages
import org.mulgara.query.*;
-import org.mulgara.query.rdf.BlankNodeImpl;
import org.mulgara.query.rdf.LiteralImpl;
import org.mulgara.query.rdf.URIReferenceImpl;
import org.mulgara.resolver.spi.ConstraintBindingHandler;
Modified: branches/xafix-impl/src/jar/resolver/java/org/mulgara/resolver/StringPoolSession.java
===================================================================
--- branches/xafix-impl/src/jar/resolver/java/org/mulgara/resolver/StringPoolSession.java 2006-11-21 20:20:50 UTC (rev 137)
+++ branches/xafix-impl/src/jar/resolver/java/org/mulgara/resolver/StringPoolSession.java 2006-11-23 06:03:35 UTC (rev 138)
@@ -491,6 +491,7 @@
} else {
nodeId = persistentNodePool.newNode();
}
+
return nodeId;
}
// If it's a read phase and not the local BlankNode then throw an
Modified: branches/xafix-impl/src/jar/resolver/java/org/mulgara/resolver/TransactionalAnswer.java
===================================================================
--- branches/xafix-impl/src/jar/resolver/java/org/mulgara/resolver/TransactionalAnswer.java 2006-11-21 20:20:50 UTC (rev 137)
+++ branches/xafix-impl/src/jar/resolver/java/org/mulgara/resolver/TransactionalAnswer.java 2006-11-23 06:03:35 UTC (rev 138)
@@ -51,7 +51,7 @@
public class TransactionalAnswer implements Answer {
/** Logger. */
private static final Logger logger =
- Logger.getLogger(MulgaraTransaction.class.getName());
+ Logger.getLogger(TransactionalAnswer.class.getName());
private Answer answer;
@@ -235,6 +235,10 @@
}
}
+ private void warnReport(String desc) {
+ logger.warn(desc + ": " + System.identityHashCode(this) + ", xa=" + System.identityHashCode(transaction));
+ }
+
public void finalize() {
report("GC-finalizing");
if (transaction != null) {
Modified: branches/xafix-impl/src/jar/server-rmi/java/org/mulgara/server/rmi/BlankNodeWrapperAnswer.java
===================================================================
--- branches/xafix-impl/src/jar/server-rmi/java/org/mulgara/server/rmi/BlankNodeWrapperAnswer.java 2006-11-21 20:20:50 UTC (rev 137)
+++ branches/xafix-impl/src/jar/server-rmi/java/org/mulgara/server/rmi/BlankNodeWrapperAnswer.java 2006-11-23 06:03:35 UTC (rev 138)
@@ -69,7 +69,7 @@
/**
* The wrapped instance.
*/
- protected final Answer answer;
+ protected Answer answer;
/**
* The blank node map.
@@ -93,6 +93,7 @@
public Object clone() {
try {
BlankNodeWrapperAnswer cloned = (BlankNodeWrapperAnswer) super.clone();
+ cloned.answer = (Answer)this.answer.clone();
return cloned;
}
catch (CloneNotSupportedException e) {
More information about the Mulgara-svn
mailing list