use of com.sun.enterprise.admin.util.TokenValueSet in project Payara by payara.
the class RepositoryManager method createJBIInstance.
/**
* Create JBI instance.
*/
protected void createJBIInstance(String instanceName, RepositoryConfig config) throws RepositoryException {
final PEFileLayout layout = getFileLayout(config);
layout.createJBIDirectories();
final TokenValueSet tvSet = new TokenValueSet();
final String tvDelimiter = "@";
final String tJbiInstanceName = "JBI_INSTANCE_NAME";
final String tJbiInstanceRoot = "JBI_INSTANCE_ROOT";
try {
final TokenValue tvJbiInstanceName = new TokenValue(tJbiInstanceName, instanceName, tvDelimiter);
final TokenValue tvJbiInstanceRoot = new TokenValue(tJbiInstanceRoot, layout.getRepositoryDir().getCanonicalPath(), tvDelimiter);
tvSet.add(tvJbiInstanceName);
tvSet.add(tvJbiInstanceRoot);
final File src = layout.getJbiTemplateFile();
final File dest = layout.getJbiRegistryFile();
generateFromTemplate(tvSet, src, dest);
final File httpConfigSrc = layout.getHttpBcConfigTemplate();
final File httpConfigDest = layout.getHttpBcConfigFile();
// tokens will be added in a follow-up integration
final TokenValueSet httpTvSet = new TokenValueSet();
generateFromTemplate(httpTvSet, httpConfigSrc, httpConfigDest);
createHttpBCInstallRoot(layout);
createJavaEESEInstallRoot(layout);
createWSDLSLInstallRoot(layout);
} catch (Exception ioe) {
throw new RepositoryException(_strMgr.getString("jbiRegistryFileNotCreated"), ioe);
}
}
Aggregations