public static NativeXAFileSystem bootXAFileSystemStandAlone(StandaloneFileSystemConfiguration configuration) { doBasicValidationForConfiguration(configuration); String instanceId = configuration.getInstanceId(); if(allXAFileSystems.get(instanceId) != null) { throw new XASystemBootFailureException("An instance of XADisk with instance-id [" + instanceId + "] is already" + " running in this JVM."); } WorkManager workManager = new StandaloneWorkManager( configuration.getWorkManagerCorePoolSize(), configuration.getWorkManagerMaxPoolSize(), configuration.getWorkManagerKeepAliveTime()); NativeXAFileSystem newXAFileSystem = new NativeXAFileSystem(configuration, workManager); allXAFileSystems.put(configuration.getInstanceId(), newXAFileSystem); newXAFileSystem.logger.logInfo("Successfully booted the XADisk instance."); return newXAFileSystem; }
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; }
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(); }