@Override public void terminateTransaction(String threadId) throws AdminException { if (threadId == null) { return; } try { cancelTransactions(threadId, false); } catch (XATransactionException e) { throw new AdminProcessingException(QueryPlugin.Event.TEIID30542, e); } }
@Override public Collection<? extends PropertyDefinition> getTranslatorPropertyDefinitions(String translatorName) throws AdminException { //deprecated throw new AdminProcessingException(RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40130, "getTranslatorPropertyDefinitions")); //$NON-NLS-1$ }
@Override public void cancelRequest(String sessionId, long executionId) throws AdminException { try { this.dqp.cancelRequest(sessionId, executionId); } catch (TeiidComponentException e) { throw new AdminProcessingException(e); } }
@Override public void terminateTransaction(String threadId) throws AdminException { if (threadId == null) { return; } try { cancelTransactions(threadId, false); } catch (XATransactionException e) { throw new AdminProcessingException(QueryPlugin.Event.TEIID30542, e); } }
@Override public void terminateTransaction(String threadId) throws AdminException { if (threadId == null) { return; } try { cancelTransactions(threadId, false); } catch (XATransactionException e) { throw new AdminProcessingException(QueryPlugin.Event.TEIID30542, e); } }
@Override public Collection<? extends PropertyDefinition> getTemplatePropertyDefinitions(String templateName) throws AdminException { // Embedded dosn't load ra.xml throw new AdminProcessingException(RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40137, "getTemplatePropertyDefinitions")); //$NON-NLS-1$ }
private ModelNode addXADatasourceProperty(String deploymentName, String key, String value) throws AdminException, OperationFormatException { if (value == null || value.trim().isEmpty()) { throw new AdminProcessingException(AdminPlugin.Event.TEIID70054, AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70054, key)); } return buildRequest("add", new String[] { "subsystem", "datasources", "xa-data-source", deploymentName, "xa-datasource-properties", key }, new String[] {"value", value }); }
private ModelNode addConnectionProperty(String deploymentName, String key, String value) throws AdminException, OperationFormatException { if (value == null || value.trim().isEmpty()) { throw new AdminProcessingException(AdminPlugin.Event.TEIID70054, AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70054, key)); } return buildRequest("add", new String[] { "subsystem", "datasources", "data-source", deploymentName, "connection-properties", key }, new String[] {"value", value }); }
@Override public void cancelRequest(String sessionId, long executionId)throws AdminException { try { this.embeddedServer.dqp.cancelRequest(sessionId, executionId); } catch (TeiidComponentException e) { throw new AdminProcessingException(RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40141, sessionId, executionId, e)); } }
private void addConfigProperty(String rarName, String deploymentName, String key, String value) throws AdminException { if (value == null || value.trim().isEmpty()) { throw new AdminProcessingException(AdminPlugin.Event.TEIID70054, AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70054, key)); } cliCall("add", new String[] { "subsystem", "resource-adapters", "resource-adapter", rarName, "connection-definitions", deploymentName, "config-properties", key}, new String[] {"value", value}, new ResultCallback()); }
@Override public void undeploy(String deployedName) throws AdminException { VDBMetaData vdb = checkVDB(deployedName); if(null == vdb) { throw new AdminProcessingException(RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40134, deployedName)); } this.embeddedServer.undeployVDB(deployedName); }
@Override public Collection<? extends CacheStatistics> getCacheStats(String cacheType) throws AdminException { if(cacheType.equals(Admin.Cache.QUERY_SERVICE_RESULT_SET_CACHE.name())){ return Arrays.asList(this.embeddedServer.getRsCache().buildCacheStats(cacheType)); } else if(cacheType.equals(Admin.Cache.PREPARED_PLAN_CACHE.name())) { return Arrays.asList(this.embeddedServer.getPpcCache().buildCacheStats(cacheType)); } else { throw new AdminProcessingException(RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40139, cacheType, Admin.Cache.QUERY_SERVICE_RESULT_SET_CACHE, Admin.Cache.PREPARED_PLAN_CACHE)); } }
private DataPolicyMetadata getPolicy(String policyName) throws AdminProcessingException { DataPolicyMetadata policy = vdb.getDataPolicyMap().get(policyName); if (policy == null) { throw new AdminProcessingException(RuntimePlugin.Event.TEIID40092, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40092, policyName, vdb.getName(), vdb.getVersion())); } return policy; }
private DataPolicyMetadata getPolicy(VDBMetaData vdb, String policyName)throws AdminProcessingException { DataPolicyMetadata policy = vdb.getDataPolicyMap().get(policyName); if (policy == null) { throw new AdminProcessingException(RuntimePlugin.Event.TEIID40092, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40092, policyName, vdb.getName(), vdb.getVersion())); } return policy; }
@Override public void cancelRequest(String sessionId, long executionId) throws AdminException { final ModelNode request = buildRequest("teiid", "cancel-request", "session", sessionId, "execution-id", String.valueOf(executionId));//$NON-NLS-1$ try { ModelNode outcome = this.connection.execute(request); if (!Util.isSuccess(outcome)) { throw new AdminProcessingException(AdminPlugin.Event.TEIID70021, Util.getFailureDescription(outcome)); } } catch (IOException e) { throw new AdminComponentException(AdminPlugin.Event.TEIID70022, e); } }
@Override public void clearCache(String cacheType) throws AdminException { if(cacheType.equals(Admin.Cache.QUERY_SERVICE_RESULT_SET_CACHE.name())){ this.embeddedServer.getRsCache().clearAll(); } else if(cacheType.equals(Admin.Cache.PREPARED_PLAN_CACHE.name())) { this.embeddedServer.getPpcCache().clearAll(); } else { throw new AdminProcessingException(RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40139, cacheType, Admin.Cache.QUERY_SERVICE_RESULT_SET_CACHE, Admin.Cache.PREPARED_PLAN_CACHE)); } }
@Override public void markDataSourceAvailable(String jndiName) throws AdminException { final ModelNode request = buildRequest("teiid", "mark-datasource-available","ds-name", jndiName);//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ try { ModelNode outcome = this.connection.execute(request); if (!Util.isSuccess(outcome)) { throw new AdminProcessingException(AdminPlugin.Event.TEIID70049, Util.getFailureDescription(outcome)); } } catch (IOException e) { throw new AdminComponentException(AdminPlugin.Event.TEIID70050, e); } }
@Override public void terminateSession(String sessionId) throws AdminException { final ModelNode request = buildRequest("teiid", "terminate-session", "session", sessionId);//$NON-NLS-1$ try { ModelNode outcome = this.connection.execute(request); if (!Util.isSuccess(outcome)) { throw new AdminProcessingException(AdminPlugin.Event.TEIID70029, Util.getFailureDescription(outcome)); } } catch (IOException e) { throw new AdminComponentException(AdminPlugin.Event.TEIID70030, e); } }
@Override public void clearCache(String cacheType, String vdbName, String vdbVersion) throws AdminException { checkVDB(vdbName, vdbVersion); if(cacheType.equals(Admin.Cache.QUERY_SERVICE_RESULT_SET_CACHE.name())){ this.embeddedServer.getRsCache().clearForVDB(new VDBKey(vdbName, vdbVersion)); } else if(cacheType.equals(Admin.Cache.PREPARED_PLAN_CACHE.name())) { this.embeddedServer.getPpcCache().clearForVDB(new VDBKey(vdbName, vdbVersion)); } else { throw new AdminProcessingException(RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40139, cacheType, Admin.Cache.QUERY_SERVICE_RESULT_SET_CACHE, Admin.Cache.PREPARED_PLAN_CACHE)); } }
private List<String> getChildNodeNames(String subsystem, String childNode) throws AdminException { final ModelNode request = buildRequest(subsystem, "read-children-names", "child-type", childNode);//$NON-NLS-1$ try { ModelNode outcome = this.connection.execute(request); if (!Util.isSuccess(outcome)) { throw new AdminProcessingException(AdminPlugin.Event.TEIID70039, Util.getFailureDescription(outcome)); } return Util.getList(outcome); } catch (IOException e) { throw new AdminComponentException(AdminPlugin.Event.TEIID70015, e); } }