public XALdifDstService(TaskType task) throws LscServiceException { xaSessions = new HashMap<String, XASession>(); this.id = LscConfiguration.getDestinationService(task).getName(); this.outputDirectory = task.getXaFileDestinationService().getOutputDirectory(); if(LOGGER.isDebugEnabled()) LOGGER.debug("Botting an XADisk instance..."); StandaloneFileSystemConfiguration configuration = new StandaloneFileSystemConfiguration(outputDirectory, id); xafs = XAFileSystemProxy.bootNativeXAFileSystem(configuration); try { xafs.waitForBootup(-1); } catch (InterruptedException e) { throw new LscServiceException(e); } if(LOGGER.isDebugEnabled()) LOGGER.debug("Successfully booted the XADisk instance.\n"); tm = new bitronix.tm.BitronixTransactionManager(); }
private XAFileSystem getFileSystem() { if (fileSystem == null) { File xaDiskHome = OperatingSystemUtils.createTempDir(); StandaloneFileSystemConfiguration config = new StandaloneFileSystemConfiguration( xaDiskHome.getAbsolutePath(), "furnace-instance"); config.setTransactionTimeout(3600); // XADISK-95 if (OperatingSystemUtils.isWindows()) { config.setSynchronizeDirectoryChanges(Boolean.FALSE); } this.fileSystem = XAFileSystemProxy.bootNativeXAFileSystem(config); try { this.fileSystem.waitForBootup(10000); } catch (InterruptedException e) { } } return fileSystem; }