Author: rareddy
Date: 2012-03-23 16:09:17 -0400 (Fri, 23 Mar 2012)
New Revision: 3951
Added:
trunk/admin/src/main/java/org/teiid/adminapi/DomainAware.java
Removed:
trunk/build/kits/jboss-as7/domain/configuration/host-teiid.xml
Modified:
trunk/admin/src/main/java/org/teiid/adminapi/Admin.java
trunk/admin/src/main/java/org/teiid/adminapi/AdminFactory.java
trunk/admin/src/main/java/org/teiid/adminapi/CacheStatistics.java
trunk/admin/src/main/java/org/teiid/adminapi/Request.java
trunk/admin/src/main/java/org/teiid/adminapi/Session.java
trunk/admin/src/main/java/org/teiid/adminapi/Transaction.java
trunk/admin/src/main/java/org/teiid/adminapi/Translator.java
trunk/admin/src/main/java/org/teiid/adminapi/VDB.java
trunk/admin/src/main/java/org/teiid/adminapi/WorkerPoolStatistics.java
trunk/admin/src/main/java/org/teiid/adminapi/impl/AdminObjectImpl.java
trunk/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java
trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
trunk/test-integration/common/src/test/java/org/teiid/arquillian/IntegrationTestDeployment.java
Log:
TEIID-1981: Admin API changes to handle the domain mode results.
Modified: trunk/admin/src/main/java/org/teiid/adminapi/Admin.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/Admin.java 2012-03-22 20:56:53 UTC (rev
3950)
+++ trunk/admin/src/main/java/org/teiid/adminapi/Admin.java 2012-03-23 20:09:17 UTC (rev
3951)
@@ -80,7 +80,7 @@
* same name in the Collection but they will differ by VDB version.
* @throws AdminException
*/
- Set<? extends VDB> getVDBs() throws AdminException;
+ Collection<? extends VDB> getVDBs() throws AdminException;
/**
* Get the VDB
@@ -110,10 +110,10 @@
/**
* Get the Worker Pool statistics in runtime engine.
*
- * @return {@link WorkerPoolStatistics}
+ * @return Collection of {@link WorkerPoolStatistics}
* @throws AdminException
*/
- WorkerPoolStatistics getWorkerPoolStats() throws AdminException;
+ Collection<? extends WorkerPoolStatistics> getWorkerPoolStats() throws
AdminException;
/**
* Get the Caches that correspond to the specified identifier pattern
@@ -182,10 +182,10 @@
/**
* Get the Cache Statistics for the given type
* @param cacheType Cache Type
- * @return {@link CacheStatistics}
+ * @return Collection of {@link CacheStatistics}
* @throws AdminException
*/
- CacheStatistics getCacheStats(String cacheType) throws AdminException;
+ Collection<? extends CacheStatistics> getCacheStats(String cacheType) throws
AdminException;
/**
* Terminate the Session
Modified: trunk/admin/src/main/java/org/teiid/adminapi/AdminFactory.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/AdminFactory.java 2012-03-22 20:56:53 UTC
(rev 3950)
+++ trunk/admin/src/main/java/org/teiid/adminapi/AdminFactory.java 2012-03-23 20:09:17 UTC
(rev 3951)
@@ -59,6 +59,7 @@
import org.jboss.dmr.ModelType;
import org.teiid.adminapi.PropertyDefinition.RestartType;
import org.teiid.adminapi.VDB.ConnectionType;
+import org.teiid.adminapi.impl.AdminObjectImpl;
import org.teiid.adminapi.impl.MetadataMapper;
import org.teiid.adminapi.impl.PropertyDefinitionMetadata;
import org.teiid.adminapi.impl.VDBMetadataMapper;
@@ -296,41 +297,42 @@
public ModelNode describe(ModelNode node) {
return null;
}
- }
+ }
- public List<String> getInstalledJDBCDrivers() throws AdminException {
- DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
- final ModelNode request;
+ public Set<String> getInstalledJDBCDrivers() throws AdminException {
+ HashSet<String> driverList = new HashSet<String>();
+ driverList.addAll(getChildNodeNames("datasources",
"jdbc-driver"));
+ final ModelNode request = buildRequest("datasources",
"installed-drivers-list");
try {
- builder.addNode("subsystem", "datasources");
//$NON-NLS-1$ //$NON-NLS-2$
- builder.setOperationName("installed-drivers-list");
- request = builder.buildRequest();
-
- } catch (OperationFormatException e) {
- throw new IllegalStateException("Failed to build operation", e);
//$NON-NLS-1$
- }
-
- try {
ModelNode outcome = this.connection.execute(request);
- if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(AdminPlugin.Event.TEIID70001,
Util.getFailureDescription(outcome));
+ if (Util.isSuccess(outcome)) {
+ List<String> drivers = getList(outcome, new AbstractMetadatMapper()
{
+ @Override
+ public String unwrap(ModelNode node) {
+ if (node.hasDefined("driver-name")) {
+ return node.get("driver-name").asString();
+ }
+ return null;
+ }
+ });
+ driverList.addAll(drivers);
}
- List<String> drivers = getList(outcome, new AbstractMetadatMapper() {
- @Override
- public String unwrap(ModelNode node) {
- if (node.hasDefined("driver-name")) {
- return node.get("driver-name").asString();
- }
- return null;
- }
- });
- return drivers;
- } catch (IOException e) {
- throw new AdminProcessingException(AdminPlugin.Event.TEIID70002, e);
+ } catch (Exception e) {
+ // in domain mode this method does not exist; this is expected in some domain
mode.
}
- }
+ return driverList;
+ }
+
+
+ public String getProfileName() throws AdminProcessingException {
+ if (!this.domainMode) {
+ return null;
+ }
+ return getChildNodeNames(null, "profile").get(0);
+ }
+
@Override
public void createDataSource(String deploymentName, String templateName, Properties
properties) throws AdminException {
deploymentName = removeJavaContext(deploymentName);
@@ -346,7 +348,7 @@
return;
}
- List<String> drivers = getInstalledJDBCDrivers();
+ Set<String> drivers = getInstalledJDBCDrivers();
if (!drivers.contains(templateName)) {
throw new AdminProcessingException(AdminPlugin.Event.TEIID70004,
AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70004, templateName));
}
@@ -354,6 +356,14 @@
DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
ModelNode request;
try {
+
+ if (this.domainMode) {
+ String profile = getProfileName();
+ if (profile != null) {
+ builder.addNode("profile",profile);
+ }
+ }
+
builder.addNode("subsystem", "datasources");
//$NON-NLS-1$ //$NON-NLS-2$
builder.addNode("data-source", deploymentName); //$NON-NLS-1$
@@ -461,6 +471,13 @@
final ModelNode request;
try {
+ if (this.domainMode) {
+ String profile = getProfileName();
+ if (profile != null) {
+ builder.addNode("profile",profile);
+ }
+ }
+
builder.addNode("subsystem", subsystem[0]); //$NON-NLS-1$
//$NON-NLS-2$
builder.addNode(subsystem[1], deployedName);
if (connFactory) {
@@ -587,16 +604,12 @@
}
@Override
- public CacheStatistics getCacheStats(String cacheType) throws AdminException {
+ public Collection<? extends CacheStatistics> getCacheStats(String cacheType)
throws AdminException {
final ModelNode request = buildRequest("teiid",
"cache-statistics", "cache-type", cacheType);//$NON-NLS-1$
//$NON-NLS-2$
try {
ModelNode outcome = this.connection.execute(request);
if (Util.isSuccess(outcome)) {
- if (outcome.hasDefined("result")) {
- ModelNode result = outcome.get("result");
- return
VDBMetadataMapper.CacheStatisticsMetadataMapper.INSTANCE.unwrap(result);
- }
-
+ return getDomainAwareList(outcome,
VDBMetadataMapper.CacheStatisticsMetadataMapper.INSTANCE);
}
} catch (Exception e) {
throw new AdminProcessingException(AdminPlugin.Event.TEIID70013, e);
@@ -622,7 +635,7 @@
return Collections.emptyList();
}
- private List<String> getChildNodeNames(String subsystem, String childNode) throws
AdminException {
+ private List<String> getChildNodeNames(String subsystem, String childNode) throws
AdminProcessingException {
final ModelNode request = buildRequest(subsystem,
"read-children-names", "child-type", childNode);//$NON-NLS-1$
try {
ModelNode outcome = this.connection.execute(request);
@@ -703,43 +716,19 @@
*/
private Set<String> getDeployedResourceAdapterNames() throws AdminException {
Set<String> templates = new HashSet<String>();
- final ModelNode request = buildRequest("resource-adapters",
"read-children-names", "child-type",
"resource-adapter");//$NON-NLS-1$
- try {
- ModelNode outcome = this.connection.execute(request);
- if (Util.isSuccess(outcome)) {
- templates.addAll(Util.getList(outcome));
- return templates;
- }
- } catch (Exception e) {
- throw new AdminProcessingException(AdminPlugin.Event.TEIID70018, e);
- }
- return Collections.emptySet();
+ templates.addAll(getChildNodeNames("resource-adapters",
"resource-adapter"));
+ return templates;
}
// :read-children-names(child-type=deployment)
private Set<String> getAvailableResourceAdapterNames() throws AdminException {
+ List<String> deployments = getChildNodeNames(null, "deployment");
Set<String> templates = new HashSet<String>();
- DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
- final ModelNode request;
- try {
- builder.setOperationName("read-children-names");
- builder.addProperty("child-type", "deployment");
- request = builder.buildRequest();
- } catch (OperationFormatException e) {
- throw new IllegalStateException("Failed to build operation", e);
//$NON-NLS-1$
- }
-
- try {
- ModelNode outcome = this.connection.execute(request);
- List<String> deployments = Util.getList(outcome);
- for (String deployment:deployments) {
- if (deployment.endsWith(".rar")) {
- templates.add(deployment);
- }
- }
- } catch (IOException e) {
- throw new AdminProcessingException(AdminPlugin.Event.TEIID70019, e);
- }
+ for (String deployment:deployments) {
+ if (deployment.endsWith(".rar")) {
+ templates.add(deployment);
+ }
+ }
return templates;
}
@@ -752,16 +741,13 @@
}
@Override
- public WorkerPoolStatistics getWorkerPoolStats() throws AdminException {
+ public Collection<? extends WorkerPoolStatistics> getWorkerPoolStats() throws
AdminException {
final ModelNode request = buildRequest("teiid",
"workerpool-statistics");//$NON-NLS-1$
if (request != null) {
try {
ModelNode outcome = this.connection.execute(request);
if (Util.isSuccess(outcome)) {
- if (outcome.hasDefined("result")) {
- ModelNode result = outcome.get("result");
- return
VDBMetadataMapper.WorkerPoolStatisticsMetadataMapper.INSTANCE.unwrap(result);
- }
+ return getDomainAwareList(outcome,
VDBMetadataMapper.WorkerPoolStatisticsMetadataMapper.INSTANCE);
}
} catch (Exception e) {
throw new AdminProcessingException(AdminPlugin.Event.TEIID70020, e);
@@ -794,7 +780,7 @@
try {
ModelNode outcome = this.connection.execute(request);
if (Util.isSuccess(outcome)) {
- return getList(outcome, RequestMetadataMapper.INSTANCE);
+ return getDomainAwareList(outcome, RequestMetadataMapper.INSTANCE);
}
} catch (Exception e) {
throw new AdminProcessingException(AdminPlugin.Event.TEIID70023, e);
@@ -810,7 +796,7 @@
try {
ModelNode outcome = this.connection.execute(request);
if (Util.isSuccess(outcome)) {
- return getList(outcome, RequestMetadataMapper.INSTANCE);
+ return getDomainAwareList(outcome, RequestMetadataMapper.INSTANCE);
}
} catch (Exception e) {
throw new AdminProcessingException(AdminPlugin.Event.TEIID70024, e);
@@ -826,7 +812,7 @@
try {
ModelNode outcome = this.connection.execute(request);
if (Util.isSuccess(outcome)) {
- return getList(outcome, SessionMetadataMapper.INSTANCE);
+ return getDomainAwareList(outcome, SessionMetadataMapper.INSTANCE);
}
} catch (Exception e) {
throw new AdminProcessingException(AdminPlugin.Event.TEIID70025, e);
@@ -848,6 +834,12 @@
Set<String> resourceAdapters = getAvailableResourceAdapterNames();
if (resourceAdapters.contains(templateName)) {
DefaultOperationRequestBuilder builder = new
DefaultOperationRequestBuilder();
+ if (this.domainMode) {
+ String profile = getProfileName();
+ if (profile != null) {
+ builder.addNode("profile",profile);
+ }
+ }
builder.addNode("subsystem", "teiid"); //$NON-NLS-1$
//$NON-NLS-2$
builder.setOperationName("read-rar-description"); //$NON-NLS-1$
builder.addProperty("rar-name", templateName);
@@ -987,7 +979,7 @@
try {
ModelNode outcome = this.connection.execute(request);
if (Util.isSuccess(outcome)) {
- return getList(outcome, TransactionMetadataMapper.INSTANCE);
+ return getDomainAwareList(outcome,
TransactionMetadataMapper.INSTANCE);
}
} catch (Exception e) {
throw new AdminProcessingException(AdminPlugin.Event.TEIID70028, e);
@@ -1055,7 +1047,7 @@
try {
ModelNode outcome = this.connection.execute(request);
if (Util.isSuccess(outcome)) {
- return getList(outcome,
VDBMetadataMapper.VDBTranslatorMetaDataMapper.INSTANCE);
+ return getDomainAwareList(outcome,
VDBMetadataMapper.VDBTranslatorMetaDataMapper.INSTANCE);
}
} catch (Exception e) {
throw new AdminProcessingException(AdminPlugin.Event.TEIID70034, e);
@@ -1064,11 +1056,19 @@
return Collections.emptyList();
}
- private ModelNode buildRequest(String subsystem, String operationName, String...
params) {
+ private ModelNode buildRequest(String subsystem, String operationName, String...
params) throws AdminProcessingException {
DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
final ModelNode request;
try {
- builder.addNode("subsystem", subsystem); //$NON-NLS-1$
//$NON-NLS-2$
+ if (subsystem != null) {
+ if (this.domainMode) {
+ String profile = getProfileName();
+ if (profile != null) {
+ builder.addNode("profile",profile);
+ }
+ }
+ builder.addNode("subsystem", subsystem); //$NON-NLS-1$
//$NON-NLS-2$
+ }
builder.setOperationName(operationName);
request = builder.buildRequest();
if (params != null && params.length % 2 == 0) {
@@ -1082,6 +1082,41 @@
return request;
}
+ private <T> List<T> getDomainAwareList(ModelNode operationResult,
MetadataMapper<T> mapper) {
+ if (this.domainMode) {
+ List<T> returnList = new ArrayList<T>();
+
+ ModelNode serverGroups = operationResult.get("server-groups");
+ Set<String> serverGroupNames = serverGroups.keys();
+ for (String serverGroupName:serverGroupNames) {
+ ModelNode serverGroup = serverGroups.get(serverGroupName);
+ Set<String> serverNames = serverGroup.keys();
+ for (String serverName:serverNames) {
+ ModelNode server = serverGroup.get(serverName);
+ String hostName = server.get("host").asString();
+ if (server.get("response",
"outcome").asString().equals(Util.SUCCESS)) {
+ ModelNode result = server.get("response", "result");
+ if (result.isDefined()) {
+ List<ModelNode> nodeList = result.asList(); //$NON-NLS-1$
+ for(ModelNode node : nodeList) {
+ T anObj = mapper.unwrap(node);
+ if (anObj instanceof DomainAware) {
+ ((AdminObjectImpl)anObj).setServerGroup(serverGroupName);
+ ((AdminObjectImpl)anObj).setServerName(serverName);
+ ((AdminObjectImpl)anObj).setHostName(hostName);
+ }
+ returnList.add(anObj);
+ }
+
+ }
+ }
+ }
+ }
+ return returnList;
+ }
+ return getList(operationResult, mapper);
+ }
+
private <T> List<T> getList(ModelNode operationResult,
MetadataMapper<T> mapper) {
if(!operationResult.hasDefined("result")) //$NON-NLS-1$
return Collections.emptyList();
@@ -1097,21 +1132,8 @@
return list;
}
- private <T> Set<T> getSet(ModelNode operationResult,
MetadataMapper<T> mapper) {
- if(!operationResult.hasDefined("result")) //$NON-NLS-1$
- return Collections.emptySet();
+
- List<ModelNode> nodeList =
operationResult.get("result").asList(); //$NON-NLS-1$
- if(nodeList.isEmpty())
- return Collections.emptySet();
-
- Set<T> list = new HashSet<T>(nodeList.size());
- for(ModelNode node : nodeList) {
- list.add(mapper.unwrap(node));
- }
- return list;
- }
-
@Override
public VDB getVDB(String vdbName, int vdbVersion) throws AdminException {
final ModelNode request = buildRequest("teiid", "get-vdb",
"vdb-name", vdbName, "vdb-version",
String.valueOf(vdbVersion));//$NON-NLS-1$
@@ -1133,18 +1155,18 @@
}
@Override
- public Set<? extends VDB> getVDBs() throws AdminException {
+ 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)) {
- return getSet(outcome, VDBMetadataMapper.INSTANCE);
+ return getDomainAwareList(outcome, VDBMetadataMapper.INSTANCE);
}
} catch (Exception e) {
throw new AdminProcessingException(AdminPlugin.Event.TEIID70036, e);
}
- return Collections.emptySet();
+ return Collections.emptyList();
}
@Override
Modified: trunk/admin/src/main/java/org/teiid/adminapi/CacheStatistics.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/CacheStatistics.java 2012-03-22 20:56:53
UTC (rev 3950)
+++ trunk/admin/src/main/java/org/teiid/adminapi/CacheStatistics.java 2012-03-23 20:09:17
UTC (rev 3951)
@@ -21,7 +21,7 @@
*/
package org.teiid.adminapi;
-public interface CacheStatistics extends AdminObject {
+public interface CacheStatistics extends AdminObject, DomainAware {
double getHitRatio();
Added: trunk/admin/src/main/java/org/teiid/adminapi/DomainAware.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/DomainAware.java
(rev 0)
+++ trunk/admin/src/main/java/org/teiid/adminapi/DomainAware.java 2012-03-23 20:09:17 UTC
(rev 3951)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.adminapi;
+
+/**
+ * The admin objects that implement this interface have domain information on them when
+ * Teiid is running in the domain mode.
+ */
+public interface DomainAware {
+
+ /**
+ * Server group that admin object belongs to
+ * @return
+ */
+ String getServerGroup();
+
+ /**
+ * Name of the Server that this admin object belongs to
+ * @return
+ */
+ String getServerName();
+
+
+ /**
+ * getHostName of the Server this admin object belongs to
+ * @return
+ */
+ String getHostName();
+}
Property changes on: trunk/admin/src/main/java/org/teiid/adminapi/DomainAware.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/admin/src/main/java/org/teiid/adminapi/Request.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/Request.java 2012-03-22 20:56:53 UTC (rev
3950)
+++ trunk/admin/src/main/java/org/teiid/adminapi/Request.java 2012-03-23 20:09:17 UTC (rev
3951)
@@ -34,7 +34,7 @@
* <p>A request is identified by a numbers separated by '|'. usually in
they are arranged
* in the pattern [session]|[request] or [session]|[request]|[source request]
</p>
*/
-public interface Request extends AdminObject {
+public interface Request extends AdminObject, DomainAware {
public enum ProcessingState {
PROCESSING,
Modified: trunk/admin/src/main/java/org/teiid/adminapi/Session.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/Session.java 2012-03-22 20:56:53 UTC (rev
3950)
+++ trunk/admin/src/main/java/org/teiid/adminapi/Session.java 2012-03-23 20:09:17 UTC (rev
3951)
@@ -28,7 +28,7 @@
*
* A user is allowed to have multiple sessions active simultaneously.
*/
-public interface Session extends AdminObject {
+public interface Session extends AdminObject, DomainAware {
/**
* Get the Last time Client has check to see if the server is still available
Modified: trunk/admin/src/main/java/org/teiid/adminapi/Transaction.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/Transaction.java 2012-03-22 20:56:53 UTC
(rev 3950)
+++ trunk/admin/src/main/java/org/teiid/adminapi/Transaction.java 2012-03-23 20:09:17 UTC
(rev 3951)
@@ -23,7 +23,7 @@
package org.teiid.adminapi;
-public interface Transaction extends AdminObject {
+public interface Transaction extends AdminObject, DomainAware {
/**
* Get the session associated with the this transaction.
Modified: trunk/admin/src/main/java/org/teiid/adminapi/Translator.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/Translator.java 2012-03-22 20:56:53 UTC
(rev 3950)
+++ trunk/admin/src/main/java/org/teiid/adminapi/Translator.java 2012-03-23 20:09:17 UTC
(rev 3951)
@@ -22,7 +22,7 @@
package org.teiid.adminapi;
-public interface Translator extends AdminObject{
+public interface Translator extends AdminObject, DomainAware {
public static final String EXECUTION_FACTORY_CLASS =
"execution-factory-class"; //$NON-NLS-1$
public static final String TRANSLATOR_PROPERTY = "property"; //$NON-NLS-1$
Modified: trunk/admin/src/main/java/org/teiid/adminapi/VDB.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/VDB.java 2012-03-22 20:56:53 UTC (rev
3950)
+++ trunk/admin/src/main/java/org/teiid/adminapi/VDB.java 2012-03-23 20:09:17 UTC (rev
3951)
@@ -38,7 +38,7 @@
*
* @since 4.3
*/
-public interface VDB extends AdminObject {
+public interface VDB extends AdminObject, DomainAware {
public static enum Status{INACTIVE, ACTIVE};
Modified: trunk/admin/src/main/java/org/teiid/adminapi/WorkerPoolStatistics.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/WorkerPoolStatistics.java 2012-03-22
20:56:53 UTC (rev 3950)
+++ trunk/admin/src/main/java/org/teiid/adminapi/WorkerPoolStatistics.java 2012-03-23
20:09:17 UTC (rev 3951)
@@ -21,7 +21,7 @@
*/
package org.teiid.adminapi;
-public interface WorkerPoolStatistics extends AdminObject {
+public interface WorkerPoolStatistics extends AdminObject, DomainAware{
/**
* Current active thread count
Modified: trunk/admin/src/main/java/org/teiid/adminapi/impl/AdminObjectImpl.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/impl/AdminObjectImpl.java 2012-03-22
20:56:53 UTC (rev 3950)
+++ trunk/admin/src/main/java/org/teiid/adminapi/impl/AdminObjectImpl.java 2012-03-23
20:09:17 UTC (rev 3951)
@@ -39,6 +39,9 @@
private static final long serialVersionUID = -6381303538713462682L;
private String name;
+ private String serverGroup;
+ private String serverName;
+ private String hostName;
private ListOverMap<PropertyMetadata> properties = new
ListOverMap<PropertyMetadata>(new KeyBuilder<PropertyMetadata>() {
private static final long serialVersionUID = 3687928367250819142L;
@@ -59,6 +62,30 @@
public void setName(String name) {
this.name = name;
}
+
+ public String getServerGroup() {
+ return this.serverGroup;
+ }
+
+ public String getServerName() {
+ return this.serverName;
+ }
+
+ public String getHostName() {
+ return this.hostName;
+ }
+
+ public void setServerGroup(String group) {
+ this.serverGroup = group;
+ }
+
+ public void setServerName(String name) {
+ this.serverName = name;
+ }
+
+ public void setHostName(String name) {
+ this.hostName = name;
+ }
@Override
public Properties getProperties() {
Modified: trunk/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java
===================================================================
--- trunk/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java 2012-03-22
20:56:53 UTC (rev 3950)
+++ trunk/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java 2012-03-23
20:09:17 UTC (rev 3951)
@@ -218,18 +218,18 @@
}
@Doc(text = "Get all VDB instances")
- public static Set<? extends VDB> getVDBs() throws AdminException {
+ public static Collection<? extends VDB> getVDBs() throws AdminException {
return getAdmin().getVDBs();
}
@Doc(text = "Get thread pool statistics for Teiid")
- public static WorkerPoolStatistics getWorkerPoolStats()
+ public static Collection<? extends WorkerPoolStatistics> getWorkerPoolStats()
throws AdminException {
return getAdmin().getWorkerPoolStats();
}
@Doc(text = "Get cache statistics for given cache type")
- public static CacheStatistics getCacheStats(@Doc(text = "cacheType") String
identifier)
+ public static Collection<? extends CacheStatistics> getCacheStats(@Doc(text =
"cacheType") String identifier)
throws AdminException {
return getAdmin().getCacheStats(identifier);
}
Modified: trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml
===================================================================
--- trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml 2012-03-22 20:56:53
UTC (rev 3950)
+++ trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml 2012-03-23 20:09:17
UTC (rev 3951)
@@ -194,647 +194,20 @@
<eviction strategy="NONE"/>
</replicated-cache>
</cache-container>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
- <subsystem xmlns="urn:jboss:domain:jca:1.1">
- <archive-validation enabled="true"
fail-on-error="true" fail-on-warn="false"/>
- <bean-validation enabled="false"/>
- <default-workmanager>
- <short-running-threads>
- <core-threads count="50"/>
- <queue-length count="50"/>
- <max-threads count="50"/>
- <keepalive-time time="10"
unit="seconds"/>
- </short-running-threads>
- <long-running-threads>
- <core-threads count="50"/>
- <queue-length count="50"/>
- <max-threads count="50"/>
- <keepalive-time time="10"
unit="seconds"/>
- </long-running-threads>
- </default-workmanager>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
- <subsystem xmlns="urn:jboss:domain:jgroups:1.1"
default-stack="udp">
- <stack name="udp">
- <transport type="UDP"
socket-binding="jgroups-udp"
diagnostics-socket-binding="jgroups-diagnostics"/>
- <protocol type="PING"/>
- <protocol type="MERGE2"/>
- <protocol type="FD_SOCK"
socket-binding="jgroups-udp-fd"/>
- <protocol type="FD"/>
- <protocol type="VERIFY_SUSPECT"/>
- <protocol type="BARRIER"/>
- <protocol type="pbcast.NAKACK"/>
- <protocol type="UNICAST2"/>
- <protocol type="pbcast.STABLE"/>
- <protocol type="pbcast.GMS"/>
- <protocol type="UFC"/>
- <protocol type="MFC"/>
- <protocol type="FRAG2"/>
- </stack>
- <stack name="tcp">
- <transport type="TCP"
socket-binding="jgroups-tcp"
diagnostics-socket-binding="jgroups-diagnostics"/>
- <protocol type="MPING"
socket-binding="jgroups-mping"/>
- <protocol type="MERGE2"/>
- <protocol type="FD_SOCK"
socket-binding="jgroups-tcp-fd"/>
- <protocol type="FD"/>
- <protocol type="VERIFY_SUSPECT"/>
- <protocol type="BARRIER"/>
- <protocol type="pbcast.NAKACK"/>
- <protocol type="UNICAST2"/>
- <protocol type="pbcast.STABLE"/>
- <protocol type="pbcast.GMS"/>
- <protocol type="UFC"/>
- <protocol type="MFC"/>
- <protocol type="FRAG2"/>
- </stack>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:jmx:1.1">
- <show-model value="true"/>
- <remoting-connector/>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:jpa:1.0">
- <jpa default-datasource=""/>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:mail:1.0">
- <mail-session jndi-name="java:jboss/mail/Default">
- <smtp-server
outbound-socket-binding-ref="mail-smtp"/>
- </mail-session>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:modcluster:1.0">
- <mod-cluster-config advertise-socket="modcluster"/>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:naming:1.1"/>
- <subsystem xmlns="urn:jboss:domain:osgi:1.2"
activation="lazy">
- <properties>
- <!-- Specifies the beginning start level of the framework -->
- <property
name="org.osgi.framework.startlevel.beginning">1</property>
- </properties>
- <capabilities>
- <!-- modules registered with the OSGi layer on startup -->
- <capability name="javax.servlet.api:v25"/>
- <capability name="javax.transaction.api"/>
- <!-- bundles started in startlevel 1 -->
- <capability name="org.apache.felix.log"
startlevel="1"/>
- <capability name="org.jboss.osgi.logging"
startlevel="1"/>
- <capability name="org.apache.felix.configadmin"
startlevel="1"/>
- <capability name="org.jboss.as.osgi.configadmin"
startlevel="1"/>
- </capabilities>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>
- <subsystem xmlns="urn:jboss:domain:remoting:1.1">
- <connector name="remoting-connector"
socket-binding="remoting" security-realm="ApplicationRealm"/>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>
- <subsystem xmlns="urn:jboss:domain:sar:1.0"/>
- <subsystem xmlns="urn:jboss:domain:security:1.1">
- <security-domains>
- <security-domain name="other"
cache-type="default">
- <authentication>
- <login-module code="Remoting"
flag="optional">
- <module-option name="password-stacking"
value="useFirstPass"/>
- </login-module>
- <login-module code="RealmUsersRoles"
flag="required">
- <module-option name="usersProperties"
value="${jboss.domain.config.dir}/application-users.properties"/>
- <module-option name="rolesProperties"
value="${jboss.domain.config.dir}/application-roles.properties"/>
- <module-option name="realm"
value="ApplicationRealm"/>
- <module-option name="password-stacking"
value="useFirstPass"/>
- </login-module>
- </authentication>
- </security-domain>
- <security-domain name="jboss-web-policy"
cache-type="default">
- <authorization>
- <policy-module code="Delegating"
flag="required"/>
- </authorization>
- </security-domain>
- <security-domain name="jboss-ejb-policy"
cache-type="default">
- <authorization>
- <policy-module code="Delegating"
flag="required"/>
- </authorization>
- </security-domain>
- </security-domains>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:threads:1.1"/>
- <subsystem xmlns="urn:jboss:domain:transactions:1.1">
- <core-environment>
- <process-id>
- <uuid/>
- </process-id>
- </core-environment>
- <recovery-environment
socket-binding="txn-recovery-environment"
status-socket-binding="txn-status-manager"/>
- <coordinator-environment default-timeout="300"/>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:web:1.1"
default-virtual-server="default-host" native="false">
- <connector name="http" protocol="HTTP/1.1"
scheme="http" socket-binding="http"/>
- <virtual-server name="default-host"
enable-welcome-root="true">
- <alias name="localhost"/>
- <alias name="example.com"/>
- </virtual-server>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:webservices:1.1">
- <modify-wsdl-address>true</modify-wsdl-address>
- <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
- <endpoint-config name="Standard-Endpoint-Config"/>
- <endpoint-config name="Recording-Endpoint-Config">
- <pre-handler-chain name="recording-handlers"
protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP
##SOAP12_HTTP_MTOM">
- <handler name="RecordingHandler"
class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
- </pre-handler-chain>
- </endpoint-config>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:weld:1.0"/>
- </profile>
-
- <profile name="full">
- <subsystem xmlns="urn:jboss:domain:logging:1.1">
- <console-handler name="CONSOLE">
- <level name="INFO"/>
- <formatter>
- <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c]
(%t) %s%E%n"/>
- </formatter>
- </console-handler>
- <periodic-rotating-file-handler name="FILE">
- <formatter>
- <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c]
(%t) %s%E%n"/>
- </formatter>
- <file relative-to="jboss.server.log.dir"
path="server.log"/>
- <suffix value=".yyyy-MM-dd"/>
- <append value="true"/>
- </periodic-rotating-file-handler>
- <logger category="com.arjuna">
- <level name="WARN"/>
- </logger>
- <logger category="org.apache.tomcat.util.modeler">
- <level name="WARN"/>
- </logger>
- <logger category="sun.rmi">
- <level name="WARN"/>
- </logger>
- <logger category="jacorb">
- <level name="WARN"/>
- </logger>
- <logger category="jacorb.config">
- <level name="ERROR"/>
- </logger>
- <root-logger>
- <level name="INFO"/>
- <handlers>
- <handler name="CONSOLE"/>
- <handler name="FILE"/>
- </handlers>
- </root-logger>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:cmp:1.0"/>
- <subsystem xmlns="urn:jboss:domain:configadmin:1.0"/>
- <subsystem xmlns="urn:jboss:domain:datasources:1.0">
- <datasources>
- <datasource jndi-name="java:jboss/datasources/ExampleDS"
pool-name="ExampleDS" enabled="true"
use-java-context="true">
-
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
- <driver>h2</driver>
- <security>
- <user-name>sa</user-name>
- <password>sa</password>
- </security>
- </datasource>
- <drivers>
- <driver name="h2"
module="com.h2database.h2">
-
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
- </driver>
- </drivers>
- </datasources>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:ee:1.0"/>
- <subsystem xmlns="urn:jboss:domain:ejb3:1.2">
- <session-bean>
- <stateless>
- <bean-instance-pool-ref
pool-name="slsb-strict-max-pool"/>
- </stateless>
- <stateful default-access-timeout="5000"
cache-ref="simple"/>
- <singleton default-access-timeout="5000"/>
- </session-bean>
- <mdb>
- <resource-adapter-ref
resource-adapter-name="hornetq-ra"/>
- <bean-instance-pool-ref
pool-name="mdb-strict-max-pool"/>
- </mdb>
- <pools>
- <bean-instance-pools>
- <strict-max-pool name="slsb-strict-max-pool"
max-pool-size="20" instance-acquisition-timeout="5"
instance-acquisition-timeout-unit="MINUTES"/>
- <strict-max-pool name="mdb-strict-max-pool"
max-pool-size="20" instance-acquisition-timeout="5"
instance-acquisition-timeout-unit="MINUTES"/>
- </bean-instance-pools>
- </pools>
- <caches>
- <cache name="simple"
aliases="NoPassivationCache"/>
- <cache name="passivating"
passivation-store-ref="file" aliases="SimpleStatefulCache"/>
- </caches>
- <passivation-stores>
- <file-passivation-store name="file"/>
- </passivation-stores>
- <async thread-pool-name="default"/>
- <timer-service thread-pool-name="default">
- <data-store path="timer-service-data"
relative-to="jboss.server.data.dir"/>
- </timer-service>
- <remote connector-ref="remoting-connector"
thread-pool-name="default"/>
- <thread-pools>
- <thread-pool name="default">
- <max-threads count="10"/>
- <keepalive-time time="100"
unit="milliseconds"/>
- </thread-pool>
- </thread-pools>
- <iiop enable-by-default="false"
use-qualified-name="false"/>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:infinispan:1.1"
default-cache-container="hibernate">
- <cache-container name="hibernate"
default-cache="local-query">
- <local-cache name="entity">
- <transaction mode="NON_XA"/>
- <eviction strategy="LRU"
max-entries="10000"/>
- <expiration max-idle="100000"/>
- </local-cache>
- <local-cache name="local-query">
- <transaction mode="NONE"/>
- <eviction strategy="LRU"
max-entries="10000"/>
- <expiration max-idle="100000"/>
- </local-cache>
- <local-cache name="timestamps">
- <transaction mode="NONE"/>
- <eviction strategy="NONE"/>
- </local-cache>
- </cache-container>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:jacorb:1.1">
- <orb>
- <initializers transactions="spec"
security="on"/>
- </orb>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:jaxr:1.0">
- <connection-factory
jndi-name="java:jboss/jaxr/ConnectionFactory"/>
- <juddi-server
publish-url="http://localhost:8080/juddi/publish"
query-url="http://localhost:8080/juddi/query"/>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
- <subsystem xmlns="urn:jboss:domain:jca:1.1">
- <archive-validation enabled="true"
fail-on-error="true" fail-on-warn="false"/>
- <bean-validation enabled="true"/>
- <default-workmanager>
- <short-running-threads>
- <core-threads count="50"/>
- <queue-length count="50"/>
- <max-threads count="50"/>
- <keepalive-time time="10"
unit="seconds"/>
- </short-running-threads>
- <long-running-threads>
- <core-threads count="50"/>
- <queue-length count="50"/>
- <max-threads count="50"/>
- <keepalive-time time="10"
unit="seconds"/>
- </long-running-threads>
- </default-workmanager>
- <cached-connection-manager/>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
- <subsystem xmlns="urn:jboss:domain:jmx:1.1">
- <show-model value="true"/>
- <remoting-connector/>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:jpa:1.0">
- <jpa default-datasource=""/>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:jsr77:1.0"/>
- <subsystem xmlns="urn:jboss:domain:mail:1.0">
- <mail-session jndi-name="java:jboss/mail/Default">
- <smtp-server
outbound-socket-binding-ref="mail-smtp"/>
- </mail-session>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:messaging:1.1">
- <hornetq-server>
- <persistence-enabled>true</persistence-enabled>
- <journal-file-size>102400</journal-file-size>
- <journal-min-files>2</journal-min-files>
-
- <connectors>
- <netty-connector name="netty"
socket-binding="messaging"/>
- <netty-connector name="netty-throughput"
socket-binding="messaging-throughput">
- <param key="batch-delay"
value="50"/>
- </netty-connector>
- <in-vm-connector name="in-vm"
server-id="0"/>
- </connectors>
-
- <acceptors>
- <netty-acceptor name="netty"
socket-binding="messaging"/>
- <netty-acceptor name="netty-throughput"
socket-binding="messaging-throughput">
- <param key="batch-delay"
value="50"/>
- <param key="direct-deliver"
value="false"/>
- </netty-acceptor>
- <in-vm-acceptor name="in-vm"
server-id="0"/>
- </acceptors>
-
- <security-settings>
- <security-setting match="#">
- <permission type="send"
roles="guest"/>
- <permission type="consume"
roles="guest"/>
- <permission type="createNonDurableQueue"
roles="guest"/>
- <permission type="deleteNonDurableQueue"
roles="guest"/>
- </security-setting>
- </security-settings>
-
- <address-settings>
- <!--default for catch all-->
- <address-setting match="#">
-
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
-
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
- <redelivery-delay>0</redelivery-delay>
- <max-size-bytes>10485760</max-size-bytes>
- <address-full-policy>BLOCK</address-full-policy>
-
<message-counter-history-day-limit>10</message-counter-history-day-limit>
- </address-setting>
- </address-settings>
-
- <jms-connection-factories>
- <connection-factory
name="InVmConnectionFactory">
- <connectors>
- <connector-ref connector-name="in-vm"/>
- </connectors>
- <entries>
- <entry name="java:/ConnectionFactory"/>
- </entries>
- </connection-factory>
- <connection-factory
name="RemoteConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="RemoteConnectionFactory"/>
- <entry
name="java:jboss/exported/jms/RemoteConnectionFactory"/>
- </entries>
- </connection-factory>
- <pooled-connection-factory name="hornetq-ra">
- <transaction mode="xa"/>
- <connectors>
- <connector-ref connector-name="in-vm"/>
- </connectors>
- <entries>
- <entry name="java:/JmsXA"/>
- </entries>
- </pooled-connection-factory>
- </jms-connection-factories>
-
- <jms-destinations>
- <jms-queue name="testQueue">
- <entry name="queue/test"/>
- <entry
name="java:jboss/exported/jms/queue/test"/>
- </jms-queue>
- <jms-topic name="testTopic">
- <entry name="topic/test"/>
- <entry
name="java:jboss/exported/jms/topic/test"/>
- </jms-topic>
- </jms-destinations>
- </hornetq-server>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:naming:1.1"/>
- <subsystem xmlns="urn:jboss:domain:osgi:1.2"
activation="lazy">
- <properties>
- <!-- Specifies the beginning start level of the framework -->
- <property
name="org.osgi.framework.startlevel.beginning">1</property>
- </properties>
- <capabilities>
- <!-- modules registered with the OSGi layer on startup -->
- <capability name="javax.servlet.api:v25"/>
- <capability name="javax.transaction.api"/>
- <!-- bundles started in startlevel 1 -->
- <capability name="org.apache.felix.log"
startlevel="1"/>
- <capability name="org.jboss.osgi.logging"
startlevel="1"/>
- <capability name="org.apache.felix.configadmin"
startlevel="1"/>
- <capability name="org.jboss.as.osgi.configadmin"
startlevel="1"/>
- </capabilities>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>
- <subsystem xmlns="urn:jboss:domain:remoting:1.1">
- <connector name="remoting-connector"
socket-binding="remoting" security-realm="ApplicationRealm"/>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>
- <subsystem xmlns="urn:jboss:domain:sar:1.0"/>
- <subsystem xmlns="urn:jboss:domain:security:1.1">
- <security-domains>
- <security-domain name="other"
cache-type="default">
- <authentication>
- <login-module code="Remoting"
flag="optional">
- <module-option name="password-stacking"
value="useFirstPass"/>
- </login-module>
- <login-module code="RealmUsersRoles"
flag="required">
- <module-option name="usersProperties"
value="${jboss.domain.config.dir}/application-users.properties"/>
- <module-option name="rolesProperties"
value="${jboss.domain.config.dir}/application-roles.properties"/>
- <module-option name="realm"
value="ApplicationRealm"/>
- <module-option name="password-stacking"
value="useFirstPass"/>
- </login-module>
- </authentication>
- </security-domain>
- <security-domain name="jboss-web-policy"
cache-type="default">
- <authorization>
- <policy-module code="Delegating"
flag="required"/>
- </authorization>
- </security-domain>
- <security-domain name="jboss-ejb-policy"
cache-type="default">
- <authorization>
- <policy-module code="Delegating"
flag="required"/>
- </authorization>
- </security-domain>
- </security-domains>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:threads:1.1"/>
- <subsystem xmlns="urn:jboss:domain:transactions:1.1">
- <core-environment>
- <process-id>
- <uuid/>
- </process-id>
- </core-environment>
- <recovery-environment
socket-binding="txn-recovery-environment"
status-socket-binding="txn-status-manager"/>
- <coordinator-environment default-timeout="300"/>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:web:1.1"
default-virtual-server="default-host" native="false">
- <connector name="http" protocol="HTTP/1.1"
scheme="http" socket-binding="http"/>
- <virtual-server name="default-host"
enable-welcome-root="true">
- <alias name="localhost"/>
- <alias name="example.com"/>
- </virtual-server>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:webservices:1.1">
- <modify-wsdl-address>true</modify-wsdl-address>
- <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
- <endpoint-config name="Standard-Endpoint-Config"/>
- <endpoint-config name="Recording-Endpoint-Config">
- <pre-handler-chain name="recording-handlers"
protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP
##SOAP12_HTTP_MTOM">
- <handler name="RecordingHandler"
class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
- </pre-handler-chain>
- </endpoint-config>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:weld:1.0"/>
- </profile>
-
- <profile name="full-ha">
- <subsystem xmlns="urn:jboss:domain:logging:1.1">
- <console-handler name="CONSOLE">
- <level name="INFO"/>
- <formatter>
- <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c]
(%t) %s%E%n"/>
- </formatter>
- </console-handler>
- <periodic-rotating-file-handler name="FILE">
- <formatter>
- <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c]
(%t) %s%E%n"/>
- </formatter>
- <file relative-to="jboss.server.log.dir"
path="server.log"/>
- <suffix value=".yyyy-MM-dd"/>
- <append value="true"/>
- </periodic-rotating-file-handler>
- <logger category="com.arjuna">
- <level name="WARN"/>
- </logger>
- <logger category="org.apache.tomcat.util.modeler">
- <level name="WARN"/>
- </logger>
- <logger category="sun.rmi">
- <level name="WARN"/>
- </logger>
- <logger category="jacorb">
- <level name="WARN"/>
- </logger>
- <logger category="jacorb.config">
- <level name="ERROR"/>
- </logger>
- <root-logger>
- <level name="INFO"/>
- <handlers>
- <handler name="CONSOLE"/>
- <handler name="FILE"/>
- </handlers>
- </root-logger>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:configadmin:1.0"/>
- <subsystem xmlns="urn:jboss:domain:datasources:1.0">
- <datasources>
- <datasource jndi-name="java:jboss/datasources/ExampleDS"
pool-name="ExampleDS" enabled="true"
use-java-context="true">
-
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
- <driver>h2</driver>
- <security>
- <user-name>sa</user-name>
- <password>sa</password>
- </security>
- </datasource>
- <drivers>
- <driver name="h2"
module="com.h2database.h2">
-
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
- </driver>
- </drivers>
- </datasources>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:ee:1.0"/>
- <subsystem xmlns="urn:jboss:domain:ejb3:1.2">
- <session-bean>
- <stateless>
- <bean-instance-pool-ref
pool-name="slsb-strict-max-pool"/>
- </stateless>
- <stateful default-access-timeout="5000"
cache-ref="simple" clustered-cache-ref="clustered"/>
- <singleton default-access-timeout="5000"/>
- </session-bean>
- <mdb>
- <resource-adapter-ref
resource-adapter-name="hornetq-ra"/>
- <bean-instance-pool-ref
pool-name="mdb-strict-max-pool"/>
- </mdb>
- <pools>
- <bean-instance-pools>
- <strict-max-pool name="slsb-strict-max-pool"
max-pool-size="20" instance-acquisition-timeout="5"
instance-acquisition-timeout-unit="MINUTES"/>
- <strict-max-pool name="mdb-strict-max-pool"
max-pool-size="20" instance-acquisition-timeout="5"
instance-acquisition-timeout-unit="MINUTES"/>
- </bean-instance-pools>
- </pools>
- <caches>
- <cache name="simple"
aliases="NoPassivationCache"/>
- <cache name="passivating"
passivation-store-ref="file" aliases="SimpleStatefulCache"/>
- <cache name="clustered"
passivation-store-ref="infinispan" aliases="StatefulTreeCache"/>
- </caches>
- <passivation-stores>
- <file-passivation-store name="file"/>
- <cluster-passivation-store name="infinispan"
cache-container="ejb"/>
- </passivation-stores>
- <async thread-pool-name="default"/>
- <timer-service thread-pool-name="default">
- <data-store path="timer-service-data"
relative-to="jboss.server.data.dir"/>
- </timer-service>
- <remote connector-ref="remoting-connector"
thread-pool-name="default"/>
- <thread-pools>
- <thread-pool name="default">
- <max-threads count="10"/>
- <keepalive-time time="100"
unit="milliseconds"/>
- </thread-pool>
- </thread-pools>
- <iiop enable-by-default="false"
use-qualified-name="false"/>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:infinispan:1.1"
default-cache-container="cluster">
- <cache-container name="cluster"
aliases="ha-partition" default-cache="default">
- <transport lock-timeout="60000"/>
- <replicated-cache name="default" mode="SYNC"
batching="true">
- <locking isolation="REPEATABLE_READ"/>
- </replicated-cache>
- </cache-container>
- <cache-container name="web"
aliases="standard-session-cache" default-cache="repl">
- <transport lock-timeout="60000"/>
- <replicated-cache name="repl" mode="ASYNC"
batching="true">
- <file-store/>
- </replicated-cache>
- <replicated-cache name="sso" mode="SYNC"
batching="true"/>
- <distributed-cache name="dist" mode="ASYNC"
batching="true">
- <file-store/>
- </distributed-cache>
- </cache-container>
- <cache-container name="ejb" aliases="sfsb
sfsb-cache" default-cache="repl">
- <transport lock-timeout="60000"/>
- <replicated-cache name="repl" mode="ASYNC"
batching="true">
- <eviction strategy="LRU"/>
- <file-store/>
- </replicated-cache>
- <!-- Clustered cache used internally by EJB subsytem for managing
the client-mapping(s) of
- the socketbinding referenced by the EJB remoting connector -->
- <replicated-cache
name="remote-connector-client-mappings" mode="SYNC"
batching="true"/>
- <distributed-cache name="dist" mode="ASYNC"
batching="true">
- <eviction strategy="LRU"/>
- <file-store/>
- </distributed-cache>
- </cache-container>
- <cache-container name="hibernate"
default-cache="local-query">
- <transport lock-timeout="60000"/>
- <local-cache name="local-query">
- <transaction mode="NONE"/>
- <eviction strategy="LRU"
max-entries="10000"/>
- <expiration max-idle="100000"/>
- </local-cache>
- <invalidation-cache name="entity"
mode="SYNC">
- <transaction mode="NON_XA"/>
- <eviction strategy="LRU"
max-entries="10000"/>
- <expiration max-idle="100000"/>
- </invalidation-cache>
- <replicated-cache name="timestamps"
mode="ASYNC">
- <transaction mode="NONE"/>
- <eviction strategy="NONE"/>
- </replicated-cache>
- </cache-container>
<cache-container name="teiid"
default-cache="resultset">
+ <transport lock-timeout="60000"/>
<replicated-cache name="resultset" mode="SYNC"
batching="true">
<locking isolation="READ_COMMITTED"/>
<transaction mode="FULL_XA"/>
<expiration lifespan="7200" />
<eviction max-entries="1024"
strategy="LRU"/>
</replicated-cache>
- </cache-container>
+ </cache-container>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:jacorb:1.1">
- <orb>
- <initializers transactions="spec"
security="on"/>
- </orb>
- </subsystem>
- <subsystem xmlns="urn:jboss:domain:jaxr:1.0">
- <connection-factory
jndi-name="java:jboss/jaxr/ConnectionFactory"/>
- <juddi-server
publish-url="http://localhost:8080/juddi/publish"
query-url="http://localhost:8080/juddi/query"/>
- </subsystem>
<subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
<subsystem xmlns="urn:jboss:domain:jca:1.1">
<archive-validation enabled="true"
fail-on-error="true" fail-on-warn="false"/>
- <bean-validation enabled="true"/>
+ <bean-validation enabled="false"/>
<default-workmanager>
<short-running-threads>
<core-threads count="50"/>
@@ -892,97 +265,11 @@
<subsystem xmlns="urn:jboss:domain:jpa:1.0">
<jpa default-datasource=""/>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:jsr77:1.0"/>
<subsystem xmlns="urn:jboss:domain:mail:1.0">
<mail-session jndi-name="java:jboss/mail/Default">
<smtp-server
outbound-socket-binding-ref="mail-smtp"/>
</mail-session>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:messaging:1.1">
- <hornetq-server>
- <persistence-enabled>true</persistence-enabled>
- <journal-file-size>102400</journal-file-size>
- <journal-min-files>2</journal-min-files>
-
- <connectors>
- <netty-connector name="netty"
socket-binding="messaging"/>
- <netty-connector name="netty-throughput"
socket-binding="messaging-throughput">
- <param key="batch-delay"
value="50"/>
- </netty-connector>
- <in-vm-connector name="in-vm"
server-id="0"/>
- </connectors>
-
- <acceptors>
- <netty-acceptor name="netty"
socket-binding="messaging"/>
- <netty-acceptor name="netty-throughput"
socket-binding="messaging-throughput">
- <param key="batch-delay"
value="50"/>
- <param key="direct-deliver"
value="false"/>
- </netty-acceptor>
- <in-vm-acceptor name="in-vm"
server-id="0"/>
- </acceptors>
-
- <security-settings>
- <security-setting match="#">
- <permission type="send"
roles="guest"/>
- <permission type="consume"
roles="guest"/>
- <permission type="createNonDurableQueue"
roles="guest"/>
- <permission type="deleteNonDurableQueue"
roles="guest"/>
- </security-setting>
- </security-settings>
-
- <address-settings>
- <!--default for catch all-->
- <address-setting match="#">
-
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
-
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
- <redelivery-delay>0</redelivery-delay>
- <max-size-bytes>10485760</max-size-bytes>
- <address-full-policy>BLOCK</address-full-policy>
-
<message-counter-history-day-limit>10</message-counter-history-day-limit>
- </address-setting>
- </address-settings>
-
- <jms-connection-factories>
- <connection-factory
name="InVmConnectionFactory">
- <connectors>
- <connector-ref connector-name="in-vm"/>
- </connectors>
- <entries>
- <entry name="java:/ConnectionFactory"/>
- </entries>
- </connection-factory>
- <connection-factory
name="RemoteConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="RemoteConnectionFactory"/>
- <entry
name="java:jboss/exported/jms/RemoteConnectionFactory"/>
- </entries>
- </connection-factory>
- <pooled-connection-factory name="hornetq-ra">
- <transaction mode="xa"/>
- <connectors>
- <connector-ref connector-name="in-vm"/>
- </connectors>
- <entries>
- <entry name="java:/JmsXA"/>
- </entries>
- </pooled-connection-factory>
- </jms-connection-factories>
-
- <jms-destinations>
- <jms-queue name="testQueue">
- <entry name="queue/test"/>
- <entry
name="java:jboss/exported/jms/queue/test"/>
- </jms-queue>
- <jms-topic name="testTopic">
- <entry name="topic/test"/>
- <entry
name="java:jboss/exported/jms/topic/test"/>
- </jms-topic>
- </jms-destinations>
- </hornetq-server>
- </subsystem>
<subsystem xmlns="urn:jboss:domain:modcluster:1.0">
<mod-cluster-config advertise-socket="modcluster"/>
</subsystem>
@@ -1024,6 +311,14 @@
</login-module>
</authentication>
</security-domain>
+ <security-domain name="teiid-security"
cache-type="default">
+ <authentication>
+ <login-module code="UsersRoles"
flag="required">
+ <module-option name="usersProperties"
value="teiid-security-users.properties"/>
+ <module-option name="rolesProperties"
value="teiid-security-roles.properties"/>
+ </login-module>
+ </authentication>
+ </security-domain>
<security-domain name="jboss-web-policy"
cache-type="default">
<authorization>
<policy-module code="Delegating"
flag="required"/>
@@ -1034,19 +329,11 @@
<policy-module code="Delegating"
flag="required"/>
</authorization>
</security-domain>
- <security-domain name="teiid-security"
cache-type="default">
- <authentication>
- <login-module code="UsersRoles"
flag="required">
- <module-option name="usersProperties"
value="teiid-security-users.properties"/>
- <module-option name="rolesProperties"
value="teiid-security-roles.properties"/>
- </login-module>
- </authentication>
- </security-domain>
</security-domains>
</subsystem>
<subsystem xmlns="urn:jboss:domain:teiid:1.0">
<async-thread-pool>teiid-async</async-thread-pool>
- <distributed-cache jgroups-stack="udp"
channel="teiid-rep"/>
+ <distributed-cache jgroups-stack="udp"
channel="teiid-channel"/>
<resultset-cache infinispan-container="teiid"/>
<transport name="embedded"/>
@@ -1088,12 +375,12 @@
<translator name="salesforce"
module="org.jboss.teiid.translator.salesforce"/>
<translator name="hive"
module="org.jboss.teiid.translator.hive"/>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:threads:1.1">
- <bounded-queue-thread-pool name="teiid-async">
- <max-threads count="4"/>
- <queue-length count="100"/>
- </bounded-queue-thread-pool>
- </subsystem>
+ <subsystem xmlns="urn:jboss:domain:threads:1.1">
+ <bounded-queue-thread-pool name="teiid-async">
+ <max-threads count="4"/>
+ <queue-length count="100"/>
+ </bounded-queue-thread-pool>
+ </subsystem>
<subsystem xmlns="urn:jboss:domain:transactions:1.1">
<core-environment>
<process-id>
Deleted: trunk/build/kits/jboss-as7/domain/configuration/host-teiid.xml
===================================================================
--- trunk/build/kits/jboss-as7/domain/configuration/host-teiid.xml 2012-03-22 20:56:53 UTC
(rev 3950)
+++ trunk/build/kits/jboss-as7/domain/configuration/host-teiid.xml 2012-03-23 20:09:17 UTC
(rev 3951)
@@ -1,81 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<host name="master" xmlns="urn:jboss:domain:1.1">
-
- <management>
- <security-realms>
- <security-realm name="ManagementRealm">
- <authentication>
- <properties path="mgmt-users.properties"
relative-to="jboss.domain.config.dir"/>
- </authentication>
- </security-realm>
- <security-realm name="ApplicationRealm">
- <authentication>
- <properties path="application-users.properties"
relative-to="jboss.domain.config.dir" />
- </authentication>
- </security-realm>
- </security-realms>
- <management-interfaces>
- <native-interface security-realm="ManagementRealm">
- <socket interface="management"
port="${jboss.management.native.port:9999}"/>
- </native-interface>
- <http-interface security-realm="ManagementRealm">
- <socket interface="management"
port="${jboss.management.http.port:9990}"/>
- </http-interface>
- </management-interfaces>
- </management>
-
- <domain-controller>
- <local/>
- <!-- Alternative remote domain controller configuration with a host and port
-->
- <!-- <remote host="${jboss.domain.master.address}"
port="${jboss.domain.master.port:9999}"/> -->
- </domain-controller>
-
- <interfaces>
- <interface name="management">
- <inet-address
value="${jboss.bind.address.management:127.0.0.1}"/>
- </interface>
- <interface name="public">
- <inet-address value="${jboss.bind.address:127.0.0.1}"/>
- </interface>
- <interface name="unsecure">
- <!-- Used for IIOP sockets in the standarad configuration.
- To secure JacORB you need to setup SSL -->
- <inet-address value="127.0.0.1"/>
- </interface>
- </interfaces>
-
- <jvms>
- <jvm name="default">
- <heap size="64m" max-size="256m"/>
- <permgen size="256m" max-size="256m"/>
- <jvm-options>
- <option value="-server"/>
- </jvm-options>
- </jvm>
- </jvms>
-
- <servers>
- <server name="server-one" group="main-server-group">
- <!-- Remote JPDA debugging for a specific server
- <jvm name="default">
- <jvm-options>
- <option
value="-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"/>
- </jvm-options>
- </jvm>
- -->
- </server>
- <!--
- <server name="server-two" group="main-server-group"
auto-start="true">
- <!-- server-two avoids port conflicts by incrementing the ports in
- the default socket-group declared in the server-group -->
- <socket-bindings port-offset="150"/>
- </server>
- <server name="server-three" group="other-server-group"
auto-start="false">
- <!-- server-three avoids port conflicts by incrementing the ports in
- the default socket-group declared in the server-group -->
- <socket-bindings port-offset="250"/>
- </server>
- -->
- </servers>
-</host>
Modified:
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
===================================================================
---
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2012-03-22
20:56:53 UTC (rev 3950)
+++
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2012-03-23
20:09:17 UTC (rev 3951)
@@ -470,7 +470,7 @@
ModelNode result = context.getResult();
CacheStatisticsMetadata stats = buildCacheStats(cacheType, cache);
- VDBMetadataMapper.CacheStatisticsMetadataMapper.INSTANCE.wrap(stats, result);
+ VDBMetadataMapper.CacheStatisticsMetadataMapper.INSTANCE.wrap(stats, result.add());
}
private CacheStatisticsMetadata buildCacheStats(String name, SessionAwareCache cache) {
@@ -488,7 +488,7 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.CACHE_TYPE,
DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.CACHE_TYPE));
ModelNode reply = operationNode.get(REPLY_PROPERTIES);
- reply.get(TYPE).set(ModelType.OBJECT);
+ reply.get(TYPE).set(ModelType.LIST);
VDBMetadataMapper.CacheStatisticsMetadataMapper.INSTANCE.describe(reply.get(VALUE_TYPE));
}
}
@@ -526,11 +526,11 @@
protected void executeOperation(OperationContext context, DQPCore engine, ModelNode
operation) throws OperationFailedException {
ModelNode result = context.getResult();
WorkerPoolStatisticsMetadata stats = engine.getWorkerPoolStatistics();
- VDBMetadataMapper.WorkerPoolStatisticsMetadataMapper.INSTANCE.wrap(stats, result);
+ VDBMetadataMapper.WorkerPoolStatisticsMetadataMapper.INSTANCE.wrap(stats,
result.add());
}
protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
ModelNode reply = operationNode.get(REPLY_PROPERTIES);
- reply.get(TYPE).set(ModelType.OBJECT);
+ reply.get(TYPE).set(ModelType.LIST);
VDBMetadataMapper.WorkerPoolStatisticsMetadataMapper.INSTANCE.describe(reply.get(VALUE_TYPE));
}
}
Modified:
trunk/test-integration/common/src/test/java/org/teiid/arquillian/IntegrationTestDeployment.java
===================================================================
---
trunk/test-integration/common/src/test/java/org/teiid/arquillian/IntegrationTestDeployment.java 2012-03-22
20:56:53 UTC (rev 3950)
+++
trunk/test-integration/common/src/test/java/org/teiid/arquillian/IntegrationTestDeployment.java 2012-03-23
20:09:17 UTC (rev 3951)
@@ -63,7 +63,7 @@
@Test
public void testVDBDeployment() throws Exception {
try {
- Set<?> vdbs = admin.getVDBs();
+ Collection<?> vdbs = admin.getVDBs();
assertTrue(vdbs.isEmpty());
Collection<String> dsNames = admin.getDataSourceNames();