public void prepare() throws SimpleXAResourceException { if (logger.isDebugEnabled()) { logger.debug("Preparing phase on StringPoolSession " + System.identityHashCode(this) + " SP=" + System.identityHashCode(persistentStringPool)); } if (state == PREPARE) { return; } else if (state != OBTAIN) { throw new SimpleXAResourceException("Attempting to prepare phase without obtaining phase"); } state = PREPARE; persistentStringPool.prepare(); persistentNodePool.prepare(); for (int i = 0; i < resources.length; i++) { resources[i].prepare(); } }