@Override public void restart() { try { cliCall("reload", new String[] {}, new String[] {}, new ResultCallback()); } catch (AdminException e) { //ignore } }
@Override public void deploy(String deployName, InputStream vdb, boolean persist) throws AdminException { ModelNode request = buildDeployVDBRequest(deployName, vdb, persist); execute(request); }
/** * /subsystem=datasources:read-children-names(child-type=data-source) * /subsystem=resource-adapters/resource-adapter={rar-file}:read-resource * @see org.teiid.adminapi.Admin#getDataSourceNames() */ @Override public Collection<String> getDataSourceNames() throws AdminException { flush(); Map<String, String> connectionFactoryNames = getConnectionFactoryNames(); return getDataSourceNames(connectionFactoryNames); }
public AttributeDefinition[] getAttributeDefinitions() { return new AttributeDefinition[] { createAttribute(ASSOCIATED_SESSION, ModelType.STRING, false), createAttribute(CREATED_TIME, ModelType.LONG, false), createAttribute(SCOPE, ModelType.LONG, false), createAttribute(ID, ModelType.STRING, false) }; }; }
/** * /subsystem=resource-adapters/resource-adapter=teiid-connector-ws.rar/connection-definitions=foo:read-resource-description */ private void buildResourceAdpaterProperties(String rarName, BuildPropertyDefinitions builder) throws AdminException { cliCall("read-resource-description", new String[] { "subsystem","resource-adapters", "resource-adapter", rarName, "connection-definitions", "any" }, null, builder); }
private void addDriverproperties(ArrayList<PropertyDefinition> props) { // add driver specific properties addProperty("connection-properties", "Addtional Driver Properties", "The connection-properties element allows you to pass in arbitrary connection " + "properties to the Driver.connect(url, props) method. " + "Supply comma separated name-value pairs. ex:p1=v1,p2=v2", false, true, props); }
private void activateConnectionFactory(String rarName) throws AdminException { cliCall("activate", new String[] { "subsystem", "resource-adapters", "resource-adapter", rarName }, null, new ResultCallback()); }
@Override public void deploy(String deployName, InputStream vdb) throws AdminException { ModelNode request = buildDeployVDBRequest(deployName, vdb, true); execute(request); }
private void addArchiveResourceAdapter(String rarName) throws AdminException { cliCall("add", new String[] { "subsystem", "resource-adapters", "resource-adapter", rarName }, new String[] { "archive", rarName, "transaction-support","NoTransaction" }, new ResultCallback()); }
private void addModuleResourceAdapter(String rarName, String moduleName) throws AdminException { cliCall("add", new String[] { "subsystem", "resource-adapters", "resource-adapter", rarName }, new String[] { "module", moduleName, "transaction-support","NoTransaction" }, new ResultCallback()); }
@Override public void clearCache(String cacheType) throws AdminException { cliCall("clear-cache", new String[] { "subsystem", "teiid" }, new String[] { "cache-type", cacheType}, new ResultCallback()); }
@Override public void clearCache(String cacheType, String vdbName, String vdbVersion) throws AdminException { cliCall("clear-cache", new String[] { "subsystem", "teiid" }, new String[] { "cache-type", cacheType, "vdb-name",vdbName, "vdb-version", vdbVersion }, new ResultCallback()); }
private void activateConnectionFactory(String rarName) throws AdminException { cliCall("activate", new String[] { "subsystem", "resource-adapters", "resource-adapter", rarName }, null, new ResultCallback()); }
private void addArchiveResourceAdapter(String rarName) throws AdminException { cliCall("add", new String[] { "subsystem", "resource-adapters", "resource-adapter", rarName }, new String[] { "archive", rarName, "transaction-support","NoTransaction" }, new ResultCallback()); }
private void addModuleResourceAdapter(String rarName, String moduleName) throws AdminException { cliCall("add", new String[] { "subsystem", "resource-adapters", "resource-adapter", rarName }, new String[] { "module", moduleName, "transaction-support","NoTransaction" }, new ResultCallback()); }
@Override public void restart() { try { cliCall("reload", new String[] {}, new String[] {}, new ResultCallback()); } catch (AdminException e) { //ignore } }
@Override public void clearCache(String cacheType) throws AdminException { cliCall("clear-cache", new String[] { "subsystem", "teiid" }, new String[] { "cache-type", cacheType}, new ResultCallback()); }
@Override public void clearCache(String cacheType, String vdbName, String vdbVersion) throws AdminException { cliCall("clear-cache", new String[] { "subsystem", "teiid" }, new String[] { "cache-type", cacheType, "vdb-name",vdbName, "vdb-version", vdbVersion }, new ResultCallback()); }