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 }); }
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 Collection<? extends Transaction> getTransactions() throws AdminException { final ModelNode request = buildRequest("teiid", "list-transactions");//$NON-NLS-1$ try { ModelNode outcome = this.connection.execute(request); if (!Util.isSuccess(outcome)) { throw new AdminProcessingException(AdminPlugin.Event.TEIID70039, Util.getFailureDescription(outcome)); } return getDomainAwareList(outcome, TransactionMetadataMapper.INSTANCE, false, true); } catch (IOException e) { throw new AdminComponentException(AdminPlugin.Event.TEIID70028, e); } }
@Override public List<? extends VDB> getVDBs() throws AdminException { final ModelNode request = buildRequest("teiid", "list-vdbs");//$NON-NLS-1$ //$NON-NLS-2$ try { ModelNode outcome = this.connection.execute(request); if (!Util.isSuccess(outcome)) { throw new AdminProcessingException(AdminPlugin.Event.TEIID70039, Util.getFailureDescription(outcome)); } return getDomainAwareList(outcome, VDBMetadataMapper.INSTANCE, true, true); } catch (IOException e) { throw new AdminComponentException(AdminPlugin.Event.TEIID70036, e); } }
@Override public List<? extends VDB> getVDBs() throws AdminException { final ModelNode request = buildRequest("teiid", "list-vdbs");//$NON-NLS-1$ //$NON-NLS-2$ try { ModelNode outcome = this.connection.execute(request); if (!Util.isSuccess(outcome)) { throw new AdminProcessingException(AdminPlugin.Event.TEIID70039, Util.getFailureDescription(outcome)); } return getDomainAwareList(outcome, VDBMetadataMapper.INSTANCE, true, true); } catch (IOException e) { throw new AdminComponentException(AdminPlugin.Event.TEIID70036, e); } }
@Override public Collection<? extends Session> getSessions() throws AdminException { final ModelNode request = buildRequest("teiid", "list-sessions");//$NON-NLS-1$ try { ModelNode outcome = this.connection.execute(request); if (!Util.isSuccess(outcome)) { throw new AdminProcessingException(AdminPlugin.Event.TEIID70039, Util.getFailureDescription(outcome)); } return getDomainAwareList(outcome, SessionMetadataMapper.INSTANCE, false, true); } catch (IOException e) { throw new AdminComponentException(AdminPlugin.Event.TEIID70025, e); } }
@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 Collection<String> getCacheTypes() throws AdminException { final ModelNode request = buildRequest("teiid", "cache-types");//$NON-NLS-1$ //$NON-NLS-2$ return new LinkedHashSet<String>(executeList(request)); }
@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); } }
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); } }
@Override public Collection<? extends Request> getRequests() throws AdminException { final ModelNode request = buildRequest("teiid", "list-requests");//$NON-NLS-1$ try { ModelNode outcome = this.connection.execute(request); if (!Util.isSuccess(outcome)) { throw new AdminProcessingException(AdminPlugin.Event.TEIID70039, Util.getFailureDescription(outcome)); } return getDomainAwareList(outcome, RequestMetadataMapper.INSTANCE, false, true); } catch (IOException e) { throw new AdminComponentException(AdminPlugin.Event.TEIID70023, e); } }
@Override public Collection<? extends EngineStatistics> getEngineStats() throws AdminException { final ModelNode request = buildRequest("teiid", "engine-statistics");//$NON-NLS-1$ //$NON-NLS-2$ try { ModelNode outcome = this.connection.execute(request); if (!Util.isSuccess(outcome)) { throw new AdminProcessingException(AdminPlugin.Event.TEIID70039, Util.getFailureDescription(outcome)); } return getDomainAwareList(outcome, VDBMetadataMapper.EngineStatisticsMetadataMapper.INSTANCE, false, false); } catch (IOException e) { throw new AdminComponentException(AdminPlugin.Event.TEIID70013, e); } }
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 }); }
@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 Collection<String> getCacheTypes() throws AdminException { final ModelNode request = buildRequest("teiid", "cache-types");//$NON-NLS-1$ //$NON-NLS-2$ return new LinkedHashSet<String>(executeList(request)); }
@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 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 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); } }
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); } }