[Mulgara-svn] r1175 - trunk/src/jar/store-stringpool-xa11/java/org/mulgara/store/stringpool/xa11
pag at mulgara.org
pag at mulgara.org
Sat Aug 23 06:03:17 UTC 2008
Author: pag
Date: 2008-08-22 23:03:16 -0700 (Fri, 22 Aug 2008)
New Revision: 1175
Modified:
trunk/src/jar/store-stringpool-xa11/java/org/mulgara/store/stringpool/xa11/XA11StringPoolImpl.java
Log:
Allowing the selectPhase method to be called twice, as it is now being called as a NodePool and then again as a StringPool
Modified: trunk/src/jar/store-stringpool-xa11/java/org/mulgara/store/stringpool/xa11/XA11StringPoolImpl.java
===================================================================
--- trunk/src/jar/store-stringpool-xa11/java/org/mulgara/store/stringpool/xa11/XA11StringPoolImpl.java 2008-08-23 06:02:11 UTC (rev 1174)
+++ trunk/src/jar/store-stringpool-xa11/java/org/mulgara/store/stringpool/xa11/XA11StringPoolImpl.java 2008-08-23 06:03:16 UTC (rev 1175)
@@ -583,7 +583,11 @@
* @see org.mulgara.store.xa.SimpleXARecoveryHandler#selectPhase(int)
*/
public void selectPhase(int phaseNumber) throws IOException, SimpleXAResourceException {
- if (currentPhase != null) throw new SimpleXAResourceException("selectPhase() called on initialized StringPoolImpl.");
+ // check if this was already called
+ if (currentPhase != null) {
+ if (phaseNumber != this.phaseNumber) throw new SimpleXAResourceException("selectPhase() called on initialized StringPoolImpl.");
+ return;
+ }
if (metarootFile == null) throw new SimpleXAResourceException("String pool metaroot file is not open.");
// Locate the metaroot corresponding to the given phase number.
More information about the Mulgara-svn
mailing list