teiid SVN: r1954 - in trunk: engine/src/main/java/com/metamatrix/common/buffer and 19 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-03-09 18:29:14 -0500 (Tue, 09 Mar 2010)
New Revision: 1954
Added:
trunk/jboss-integration/src/main/java/org/teiid/jboss/IntegrationPlugin.java
trunk/jboss-integration/src/main/resources/org/
trunk/jboss-integration/src/main/resources/org/teiid/
trunk/jboss-integration/src/main/resources/org/teiid/jboss/
trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
trunk/runtime/src/main/java/org/teiid/runtime/
trunk/runtime/src/main/java/org/teiid/runtime/RuntimePlugin.java
trunk/runtime/src/main/resources/org/
trunk/runtime/src/main/resources/org/teiid/
trunk/runtime/src/main/resources/org/teiid/runtime/
trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties
Removed:
trunk/jboss-integration/src/main/java/com/
trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/
trunk/runtime/src/main/resources/com/
Modified:
trunk/common-core/src/main/java/com/metamatrix/core/vdb/VdbConstants.java
trunk/engine/src/main/java/com/metamatrix/common/buffer/TupleBuffer.java
trunk/engine/src/main/java/com/metamatrix/common/util/LogConstants.java
trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/Admin.java
trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/AdminProvider.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/JBossSecurityHelper.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/ConnectorBindingDeployer.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/VDBMetadataComponentMapper.java
trunk/runtime/src/main/java/org/teiid/deployers/BaseMultipleVFSParsingDeployer.java
trunk/runtime/src/main/java/org/teiid/deployers/SystemVDBDeployer.java
trunk/runtime/src/main/java/org/teiid/deployers/UDFMetaData.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java
trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java
trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
trunk/runtime/src/main/java/org/teiid/services/TeiidLoginContext.java
trunk/runtime/src/main/java/org/teiid/transport/ClientServiceRegistryImpl.java
trunk/runtime/src/main/java/org/teiid/transport/ServerWorkItem.java
trunk/runtime/src/main/java/org/teiid/transport/SocketTransport.java
Log:
TEIID-1013: Loading UDF files based on the information provided inside the vdb.xml file. Also, fixed lot iI8N issues with vdb deployer and admin code.
Modified: trunk/common-core/src/main/java/com/metamatrix/core/vdb/VdbConstants.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/core/vdb/VdbConstants.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/common-core/src/main/java/com/metamatrix/core/vdb/VdbConstants.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -34,5 +34,4 @@
public final static String INDEX_EXT = ".INDEX"; //$NON-NLS-1$
public final static String SEARCH_INDEX_EXT = ".SEARCH_INDEX"; //$NON-NLS-1$
public final static String MODEL_EXT = ".xmi"; //$NON-NLS-1$
- public final static String UDF_FILE_NAME = "FunctionDefinitions.xmi"; //$NON-NLS-1$
}
Modified: trunk/engine/src/main/java/com/metamatrix/common/buffer/TupleBuffer.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/common/buffer/TupleBuffer.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/engine/src/main/java/com/metamatrix/common/buffer/TupleBuffer.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -22,7 +22,6 @@
package com.metamatrix.common.buffer;
-import java.lang.ref.SoftReference;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -36,10 +35,10 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.types.DataTypeManager;
import com.metamatrix.common.types.Streamable;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.Assertion;
import com.metamatrix.dqp.DQPPlugin;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.sql.symbol.Expression;
public class TupleBuffer {
Modified: trunk/engine/src/main/java/com/metamatrix/common/util/LogConstants.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/common/util/LogConstants.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/engine/src/main/java/com/metamatrix/common/util/LogConstants.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -38,6 +38,7 @@
public static final String CTX_COMMANDLOGGING = "COMMAND_LOG"; //$NON-NLS-1$
public static final String CTX_AUDITLOGGING = "AUDIT_LOG"; //$NON-NLS-1$
public static final String CTX_ADMIN_API = "ADMIN_API"; //$NON-NLS-1$
+ public static final String CTX_RUNTIME = "RUNTIME"; //$NON-NLS-1$
// Query contexts
public static final String CTX_FUNCTION_TREE = CTX_QUERY_PLANNER + ".FUNCTION_TREE"; //$NON-NLS-1$
public static final String CTX_QUERY_RESOLVER = CTX_QUERY_PLANNER + ".RESOLVER"; //$NON-NLS-1$
Modified: trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/Admin.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/Admin.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/Admin.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -42,7 +42,6 @@
import org.jboss.deployers.spi.management.ManagementView;
import org.jboss.deployers.spi.management.deploy.DeploymentManager;
-import org.jboss.logging.Logger;
import org.jboss.managed.api.ComponentType;
import org.jboss.managed.api.DeploymentTemplateInfo;
import org.jboss.managed.api.ManagedComponent;
@@ -79,19 +78,20 @@
import org.teiid.adminapi.impl.SessionMetadata;
import org.teiid.adminapi.impl.TransactionMetadata;
import org.teiid.adminapi.impl.VDBMetaData;
+import org.teiid.connector.api.Connector;
+import org.teiid.jboss.IntegrationPlugin;
import org.teiid.jboss.deployers.RuntimeEngineDeployer;
public class Admin extends TeiidAdmin {
- protected Logger log = Logger.getLogger(getClass());
private static final ProfileKey DEFAULT_PROFILE_KEY = new ProfileKey(ProfileKey.DEFAULT);
- private static final String XA_DATA_SOURCE_TEMPLATE = "XADataSourceTemplate";
+ private static final String XA_DATA_SOURCE_TEMPLATE = "XADataSourceTemplate"; //$NON-NLS-1$
private static final long serialVersionUID = 7081309086056911304L;
- private static ComponentType VDBTYPE = new ComponentType("teiid", "vdb");
- private static ComponentType NOTXTYPE = new ComponentType("ConnectionFactory", "NoTx");
- private static ComponentType TXTYPE = new ComponentType("ConnectionFactory", "Tx");
- private static ComponentType DQPTYPE = new ComponentType("teiid", "dqp");
- private static ComponentType DSTYPE = new ComponentType("DataSource", "XA");
+ private static ComponentType VDBTYPE = new ComponentType("teiid", "vdb");//$NON-NLS-1$ //$NON-NLS-2$
+ private static ComponentType NOTXTYPE = new ComponentType("ConnectionFactory", "NoTx");//$NON-NLS-1$ //$NON-NLS-2$
+ private static ComponentType TXTYPE = new ComponentType("ConnectionFactory", "Tx");//$NON-NLS-1$ //$NON-NLS-2$
+ private static ComponentType DQPTYPE = new ComponentType("teiid", "dqp");//$NON-NLS-1$ //$NON-NLS-2$
+ private static ComponentType DSTYPE = new ComponentType("DataSource", "XA");//$NON-NLS-1$ //$NON-NLS-2$
private static String DQPNAME = RuntimeEngineDeployer.class.getName();
private ManagementView view;
@@ -115,7 +115,7 @@
private ManagementView getView() throws AdminProcessingException {
if (this.view == null) {
- throw new AdminProcessingException("The admin connection is already closed");
+ throw new AdminProcessingException(IntegrationPlugin.Util.getString("admin_connection_closed")); //$NON-NLS-1$
}
this.view.load();
return this.view;
@@ -123,7 +123,7 @@
private DeploymentManager getDeploymentManager() throws AdminProcessingException{
if (this.deploymentMgr == null) {
- throw new AdminProcessingException("The admin connection is already closed");
+ throw new AdminProcessingException(IntegrationPlugin.Util.getString("admin_connection_closed")); //$NON-NLS-1$
}
return this.deploymentMgr;
}
@@ -153,8 +153,8 @@
@Override
public Collection<ConnectorBinding> getConnectorBindings() throws AdminException {
ArrayList<ConnectorBinding> bindings = new ArrayList<ConnectorBinding>();
- findConnectorBindings(bindings, "NoTx");
- findConnectorBindings(bindings, "Tx");
+ findConnectorBindings(bindings, "NoTx"); //$NON-NLS-1$
+ findConnectorBindings(bindings, "Tx"); //$NON-NLS-1$
return bindings;
}
@@ -189,7 +189,7 @@
private ManagedComponent getConnectorBindingComponent(String deployedName) throws AdminProcessingException {
try {
- if (deployedName.startsWith("java:")) {
+ if (deployedName.startsWith("java:")) { //$NON-NLS-1$
deployedName = deployedName.substring(5);
}
ManagementView view = getView();
@@ -216,7 +216,7 @@
ConnectorBindingMetaData connector = new ConnectorBindingMetaData();
connector.setName(mc.getName());
connector.setComponentType(mc.getType());
- connector.addProperty("deployer-name", mc.getDeployment().getName());
+ connector.addProperty("deployer-name", mc.getDeployment().getName());//$NON-NLS-1$
for (String key:mc.getProperties().keySet()) {
ManagedProperty property = mc.getProperty(key);
@@ -227,17 +227,17 @@
if(value.getMetaType().isSimple()) {
connector.addProperty(key, ManagedUtil.stringValue(value));
}
- else if (key.equals("config-property")) {
+ else if (key.equals("config-property")) { //$NON-NLS-1$
MapCompositeValueSupport v1 = (MapCompositeValueSupport)value;
MapCompositeMetaType metaType = v1.getMetaType();
for (String configProperty:metaType.keySet()) {
- if (!configProperty.endsWith(".type")) {
+ if (!configProperty.endsWith(".type")) { //$NON-NLS-1$
connector.addProperty(configProperty, ManagedUtil.stringValue(v1.get(configProperty)));
}
}
}
else {
- log.info(key+" property is not added to connector properties");
+ //log.info(key+" property is not added to connector properties");
}
}
}
@@ -245,19 +245,19 @@
}
private boolean isConnectorBinding(ManagedComponent mc) {
- String connectionDefinition = ManagedUtil.getSimpleValue(mc, "connection-definition", String.class);
- return "org.teiid.connector.api.Connector".equals(connectionDefinition);
+ String connectionDefinition = ManagedUtil.getSimpleValue(mc, "connection-definition", String.class); //$NON-NLS-1$
+ return Connector.class.getName().equals(connectionDefinition);
}
private void findConnectorBindings(ArrayList<ConnectorBinding> bindings, String subType) throws AdminException {
try {
- ComponentType type = new ComponentType("ConnectionFactory", subType);
+ ComponentType type = new ComponentType("ConnectionFactory", subType); //$NON-NLS-1$
Set<ManagedComponent> jcaConnectors = getView().getComponentsForType(type);
for(ManagedComponent mc:jcaConnectors) {
- ManagedProperty mp = mc.getProperty("connection-definition");
+ ManagedProperty mp = mc.getProperty("connection-definition"); //$NON-NLS-1$
SimpleValueSupport v = (SimpleValueSupport)mp.getValue();
- if (v.getValue().equals("org.teiid.connector.api.Connector")){
+ if (v.getValue().equals(Connector.class.getName())){
bindings.add(buildConnectorBinding(mc));
}
}
@@ -269,9 +269,9 @@
@Override
public void addConnectorBinding(String deploymentName, String typeName, Properties properties) throws AdminException {
if (getConnectorBinding(deploymentName) != null) {
- throw new AdminProcessingException("Connector binding with name "+deploymentName+" already exists.");
+ throw new AdminProcessingException(IntegrationPlugin.Util.getString("connector_binding_exists",deploymentName)); //$NON-NLS-1$;
}
- properties.setProperty("connection-definition", "org.teiid.connector.api.Connector");
+ properties.setProperty("connection-definition", Connector.class.getName()); //$NON-NLS-1$
addConnectionfactory(deploymentName, typeName, properties);
}
@@ -279,7 +279,7 @@
public void setConnectorBindingProperty(String deployedName, String propertyName, String propertyValue) throws AdminException{
ManagedComponent mc = getConnectorBindingComponent(deployedName);
if (mc == null) {
- throw new AdminProcessingException("Connector binding with name "+deployedName+" does not exist.");
+ throw new AdminProcessingException(IntegrationPlugin.Util.getString("connector_binding_exists",deployedName)); //$NON-NLS-1$;
}
if (mc.getProperty(propertyName) != null) {
mc.getProperty(propertyName).setValue(SimpleValueSupport.wrap(propertyValue));
@@ -287,9 +287,9 @@
else {
Map<String, String> configProps = new HashMap<String, String>();
configProps.put(propertyName, propertyValue);
- configProps.put(propertyValue+".type", "java.lang.String");
+ configProps.put(propertyValue+".type", "java.lang.String"); //$NON-NLS-1$ //$NON-NLS-2$
MetaValue metaValue = ManagedUtil.compositeValueMap(configProps);
- mc.getProperty("config-property").setValue(metaValue);
+ mc.getProperty("config-property").setValue(metaValue); //$NON-NLS-1$
}
try {
getView().updateComponent(mc);
@@ -310,11 +310,11 @@
@Override
public void startConnectorBinding(ConnectorBinding binding) throws AdminException {
try {
- String deployerName = binding.getPropertyValue("deployer-name");
+ String deployerName = binding.getPropertyValue("deployer-name"); //$NON-NLS-1$
if (deployerName == null) {
- throw new AdminProcessingException("Failed to find deployer name of the connector. Can not start!");
+ throw new AdminProcessingException(IntegrationPlugin.Util.getString("failed_to_connector_deployer")); //$NON-NLS-1$
}
- ManagedUtil.execute(getDeploymentManager().start(deployerName), "Failed to start Connector Binding = " + binding.getName());
+ ManagedUtil.execute(getDeploymentManager().start(deployerName), IntegrationPlugin.Util.getString("failed_to_start_connector", binding.getName())); //$NON-NLS-1$
} catch (Exception e) {
ManagedUtil.handleException(e);
}
@@ -323,11 +323,11 @@
@Override
public void stopConnectorBinding(ConnectorBinding binding) throws AdminException {
try {
- String deployerName = binding.getPropertyValue("deployer-name");
+ String deployerName = binding.getPropertyValue("deployer-name");//$NON-NLS-1$
if (deployerName == null) {
- throw new AdminProcessingException("Failed to find deployer name of the connector. Can not stop!");
+ throw new AdminProcessingException(IntegrationPlugin.Util.getString("failed_to_connector_deployer")); //$NON-NLS-1$
}
- ManagedUtil.execute(getDeploymentManager().stop(deployerName), "Failed to Stop Connector Binding = " + binding.getName());
+ ManagedUtil.execute(getDeploymentManager().stop(deployerName), IntegrationPlugin.Util.getString("failed_to_stop_connector", binding.getName())); //$NON-NLS-1$
} catch (Exception e) {
ManagedUtil.handleException(e);
}
@@ -358,7 +358,7 @@
Set<String> names = getView().getTemplateNames();
HashSet<String> matched = new HashSet<String>();
for(String name:names) {
- if (name.startsWith("connector-")) {
+ if (name.startsWith("connector-")) {//$NON-NLS-1$
matched.add(name);
}
}
@@ -373,8 +373,8 @@
@Override
public void deployVDB(String fileName, URL vdbURL) throws AdminException {
- if (!fileName.endsWith(".vdb") && !fileName.endsWith("-vdb.xml")) {
- throw new AdminProcessingException("The extension of the file name must be either .vdb designer vdbs or -vdb.xml for dynamic VDBs");
+ if (!fileName.endsWith(".vdb") && !fileName.endsWith("-vdb.xml")) {//$NON-NLS-1$ //$NON-NLS-2$
+ throw new AdminProcessingException(IntegrationPlugin.Util.getString("bad_vdb_extension")); //$NON-NLS-1$
}
ManagedUtil.deployArchive(getDeploymentManager(), fileName, vdbURL, false);
}
@@ -410,8 +410,8 @@
try {
Set<ManagedComponent> vdbComponents = getView().getComponentsForType(VDBTYPE);
for (ManagedComponent mc: vdbComponents) {
- String name = ManagedUtil.getSimpleValue(mc, "name", String.class);
- int version = ManagedUtil.getSimpleValue(mc, "version", Integer.class);
+ String name = ManagedUtil.getSimpleValue(mc, "name", String.class);//$NON-NLS-1$
+ int version = ManagedUtil.getSimpleValue(mc, "version", Integer.class);//$NON-NLS-1$
if (name.equals(vdbName) && version == vdbVersion) {
return mc;
}
@@ -438,18 +438,18 @@
private VDBMetaData buildVDB(ManagedComponent mc) {
VDBMetaData vdb = new VDBMetaData();
- vdb.setName(ManagedUtil.getSimpleValue(mc, "name", String.class));
- vdb.setDescription(ManagedUtil.getSimpleValue(mc, "description", String.class));
- String status = ManagedUtil.getSimpleValue(mc, "status", String.class);
+ vdb.setName(ManagedUtil.getSimpleValue(mc, "name", String.class));//$NON-NLS-1$
+ vdb.setDescription(ManagedUtil.getSimpleValue(mc, "description", String.class));//$NON-NLS-1$
+ String status = ManagedUtil.getSimpleValue(mc, "status", String.class);//$NON-NLS-1$
if (status != null) {
vdb.setStatus(VDB.Status.valueOf(status));
}
- vdb.setVersion(ManagedUtil.getSimpleValue(mc, "version", Integer.class));
+ vdb.setVersion(ManagedUtil.getSimpleValue(mc, "version", Integer.class));//$NON-NLS-1$
vdb.setUrl(mc.getDeployment().getName());
- vdb.setProperties(ManagedUtil.getPropertiesValue(mc, "properties"));
+ vdb.setProperties(ManagedUtil.getPropertiesValue(mc, "properties"));//$NON-NLS-1$
// models
- ManagedProperty mp = mc.getProperty("models");
+ ManagedProperty mp = mc.getProperty("models");//$NON-NLS-1$
List<ManagedObject> models = (List<ManagedObject>)MetaValueFactory.getInstance().unwrap(mp.getValue());
for(ManagedObject mo:models) {
vdb.addModel(buildModel(mo));
@@ -463,28 +463,28 @@
private ModelMetaData buildModel(ManagedObject mc) {
ModelMetaData model = new ModelMetaData();
- model.setName(ManagedUtil.getSimpleValue(mc, "name", String.class));
- model.setVisible(ManagedUtil.getSimpleValue(mc, "visible", Boolean.class));
- model.setModelType(ManagedUtil.getSimpleValue(mc, "modelType", String.class));
- model.setProperties(ManagedUtil.getPropertiesValue(mc, "properties"));
+ model.setName(ManagedUtil.getSimpleValue(mc, "name", String.class));//$NON-NLS-1$
+ model.setVisible(ManagedUtil.getSimpleValue(mc, "visible", Boolean.class));//$NON-NLS-1$
+ model.setModelType(ManagedUtil.getSimpleValue(mc, "modelType", String.class));//$NON-NLS-1$
+ model.setProperties(ManagedUtil.getPropertiesValue(mc, "properties"));//$NON-NLS-1$
- ManagedProperty sourceMappings = mc.getProperty("sourceMappings");
+ ManagedProperty sourceMappings = mc.getProperty("sourceMappings");//$NON-NLS-1$
if (sourceMappings != null){
List<ManagedObject> mappings = (List<ManagedObject>)MetaValueFactory.getInstance().unwrap(sourceMappings.getValue());
for (ManagedObject mo:mappings) {
- String name = ManagedUtil.getSimpleValue(mo, "name", String.class);
- String jndiName = ManagedUtil.getSimpleValue(mo, "jndiName", String.class);
+ String name = ManagedUtil.getSimpleValue(mo, "name", String.class);//$NON-NLS-1$
+ String jndiName = ManagedUtil.getSimpleValue(mo, "jndiName", String.class);//$NON-NLS-1$
model.addSourceMapping(name, jndiName);
}
}
- ManagedProperty validationErrors = mc.getProperty("errors");
+ ManagedProperty validationErrors = mc.getProperty("errors");//$NON-NLS-1$
if (validationErrors != null) {
List<ManagedObject> errors = (List<ManagedObject>)MetaValueFactory.getInstance().unwrap(validationErrors.getValue());
if (errors != null) {
for (ManagedObject mo:errors) {
- model.addError(ManagedUtil.getSimpleValue(mo, "severity", String.class), ManagedUtil.getSimpleValue(mo, "value", String.class));
+ model.addError(ManagedUtil.getSimpleValue(mo, "severity", String.class), ManagedUtil.getSimpleValue(mo, "value", String.class));//$NON-NLS-1$ //$NON-NLS-2$
}
}
}
@@ -496,7 +496,7 @@
try {
Collection<Session> sessionList = new ArrayList<Session>();
ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);
- MetaValue value = ManagedUtil.executeOperation(mc, "getActiveSessions");
+ MetaValue value = ManagedUtil.executeOperation(mc, "getActiveSessions");//$NON-NLS-1$
MetaValue[] sessions = ((CollectionValueSupport)value).getElements();
for (MetaValue mv:sessions) {
sessionList.add((SessionMetadata)MetaValueFactory.getInstance().unwrap(mv, SessionMetadata.class));
@@ -511,7 +511,7 @@
public void terminateSession(long sessionId) throws AdminException {
try {
ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);
- ManagedUtil.executeOperation(mc, "terminateSession", SimpleValueSupport.wrap(sessionId));
+ ManagedUtil.executeOperation(mc, "terminateSession", SimpleValueSupport.wrap(sessionId));//$NON-NLS-1$
} catch (Exception e) {
throw new AdminComponentException(e.getMessage(), e);
}
@@ -522,7 +522,7 @@
try {
Collection<Request> requestList = new ArrayList<Request>();
ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);
- MetaValue value = ManagedUtil.executeOperation(mc, "getRequests");
+ MetaValue value = ManagedUtil.executeOperation(mc, "getRequests");//$NON-NLS-1$
MetaValue[] requests = ((CollectionValueSupport)value).getElements();
for (MetaValue mv:requests) {
requestList.add((RequestMetadata)MetaValueFactory.getInstance().unwrap(mv, RequestMetadata.class));
@@ -538,7 +538,7 @@
try {
Collection<Request> requestList = new ArrayList<Request>();
ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);
- MetaValue value = ManagedUtil.executeOperation(mc, "getRequestsForSession", SimpleValueSupport.wrap(sessionId));
+ MetaValue value = ManagedUtil.executeOperation(mc, "getRequestsForSession", SimpleValueSupport.wrap(sessionId));//$NON-NLS-1$
MetaValue[] requests = ((CollectionValueSupport)value).getElements();
for (MetaValue mv:requests) {
requestList.add((RequestMetadata)MetaValueFactory.getInstance().unwrap(mv, RequestMetadata.class));
@@ -553,7 +553,7 @@
public void cancelRequest(long sessionId, long requestId) throws AdminException{
try {
ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);
- ManagedUtil.executeOperation(mc, "cancelRequest", SimpleValueSupport.wrap(sessionId), SimpleValueSupport.wrap(requestId));
+ ManagedUtil.executeOperation(mc, "cancelRequest", SimpleValueSupport.wrap(sessionId), SimpleValueSupport.wrap(requestId));//$NON-NLS-1$
} catch (Exception e) {
throw new AdminComponentException(e.getMessage(), e);
}
@@ -561,9 +561,9 @@
private String getRarDeployerName(String rarName) throws AdminException{
try {
- Set<String> rarDeployments = getView().getDeploymentNamesForType("rar");
+ Set<String> rarDeployments = getView().getDeploymentNamesForType("rar");//$NON-NLS-1$
for (String name: rarDeployments) {
- if (name.endsWith(rarName+"/")) {
+ if (name.endsWith(rarName+"/")) { //$NON-NLS-1$
return name;
}
}
@@ -575,17 +575,17 @@
@Override
public void addConnectorType(String connectorName, URL rarURL) throws AdminException{
- if (!connectorName.startsWith("connector-")) {
- throw new AdminProcessingException("Teiid connector names must start with \"connector-\"");
+ if (!connectorName.startsWith("connector-")) {//$NON-NLS-1$
+ throw new AdminProcessingException(IntegrationPlugin.Util.getString("bad_connector_type_name")); //$NON-NLS-1$
}
- if (!connectorName.endsWith(".rar")) {
- connectorName = connectorName + ".rar";
+ if (!connectorName.endsWith(".rar")) {//$NON-NLS-1$
+ connectorName = connectorName + ".rar";//$NON-NLS-1$
}
String deployerName = getRarDeployerName(connectorName);
if (deployerName != null) {
- throw new AdminProcessingException("A Connectory with name:"+connectorName+" already exists!");
+ throw new AdminProcessingException(IntegrationPlugin.Util.getString("connector_type_exists", deployerName)); //$NON-NLS-1$
}
ManagedUtil.deployArchive(getDeploymentManager(), connectorName, rarURL, false);
@@ -594,7 +594,7 @@
try {
String connectorNameWithoutExt = connectorName.substring(0, connectorName.length()-4);
File jarFile = Admin.createConnectorTypeTemplate(connectorNameWithoutExt);
- ManagedUtil.deployArchive(getDeploymentManager(), connectorNameWithoutExt+"-template.jar", jarFile.toURI().toURL(), false);
+ ManagedUtil.deployArchive(getDeploymentManager(), connectorNameWithoutExt+"-template.jar", jarFile.toURI().toURL(), false);//$NON-NLS-1$
jarFile.delete();
} catch (IOException e) {
deleteConnectorType(connectorName);
@@ -603,8 +603,8 @@
@Override
public void deleteConnectorType(String connectorName) throws AdminException {
- if (!connectorName.endsWith(".rar")) {
- connectorName = connectorName + ".rar";
+ if (!connectorName.endsWith(".rar")) {//$NON-NLS-1$
+ connectorName = connectorName + ".rar";//$NON-NLS-1$
}
String deployerName = getRarDeployerName(connectorName);
if (deployerName != null) {
@@ -612,14 +612,14 @@
//also need to delete template for the properties
String connectorNameWithoutExt = connectorName.substring(0, connectorName.length()-4);
- ManagedUtil.removeArchive(getDeploymentManager(), connectorNameWithoutExt+"-template.jar");
+ ManagedUtil.removeArchive(getDeploymentManager(), connectorNameWithoutExt+"-template.jar");//$NON-NLS-1$
}
}
@Override
public InputStream exportConnectorType(String connectorName) throws AdminException {
- if (!connectorName.endsWith(".rar")) {
- connectorName = connectorName + ".rar";
+ if (!connectorName.endsWith(".rar")) {//$NON-NLS-1$
+ connectorName = connectorName + ".rar";//$NON-NLS-1$
}
String deployerName = getRarDeployerName(connectorName);
if (deployerName != null) {
@@ -635,7 +635,7 @@
try {
Collection<String> requestList = new ArrayList<String>();
ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);
- MetaValue value = ManagedUtil.executeOperation(mc, "getCacheTypes");
+ MetaValue value = ManagedUtil.executeOperation(mc, "getCacheTypes");//$NON-NLS-1$
MetaValue[] requests = ((CollectionValueSupport)value).getElements();
for (MetaValue mv:requests) {
requestList.add(ManagedUtil.stringValue(mv));
@@ -650,7 +650,7 @@
public void clearCache(String cacheType) throws AdminException{
try {
ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);
- ManagedUtil.executeOperation(mc, "clearCache", SimpleValueSupport.wrap(cacheType));
+ ManagedUtil.executeOperation(mc, "clearCache", SimpleValueSupport.wrap(cacheType));//$NON-NLS-1$
} catch (Exception e) {
throw new AdminComponentException(e.getMessage(), e);
}
@@ -661,7 +661,7 @@
try {
Collection<Transaction> txnList = new ArrayList<Transaction>();
ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);
- MetaValue value = ManagedUtil.executeOperation(mc, "getTransactions");
+ MetaValue value = ManagedUtil.executeOperation(mc, "getTransactions");//$NON-NLS-1$
MetaValue[] requests = ((CollectionValueSupport)value).getElements();
for (MetaValue mv:requests) {
txnList.add((TransactionMetadata)MetaValueFactory.getInstance().unwrap(mv, TransactionMetadata.class));
@@ -676,7 +676,7 @@
public void terminateTransaction(String xid) throws AdminException {
try {
ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);
- ManagedUtil.executeOperation(mc, "terminateTransaction", MetaValueFactory.getInstance().create(xid));
+ ManagedUtil.executeOperation(mc, "terminateTransaction", MetaValueFactory.getInstance().create(xid));//$NON-NLS-1$
} catch (Exception e) {
throw new AdminComponentException(e.getMessage(), e);
}
@@ -686,7 +686,7 @@
public WorkerPoolStatistics getWorkManagerStats(String identifier) throws AdminException {
try {
ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE);
- MetaValue value = ManagedUtil.executeOperation(mc, "getWorkManagerStatistics", SimpleValueSupport.wrap(identifier));
+ MetaValue value = ManagedUtil.executeOperation(mc, "getWorkManagerStatistics", SimpleValueSupport.wrap(identifier));//$NON-NLS-1$
return (WorkerPoolStatistics)MetaValueFactory.getInstance().unwrap(value, WorkerPoolStatistics.class);
} catch (Exception e) {
throw new AdminComponentException(e.getMessage(), e);
@@ -705,14 +705,14 @@
private ConnectionPoolStatistics buildConnectorConnectionPool(ManagedComponent mc) {
ConnectionPoolStatisticsMetadata stats = new ConnectionPoolStatisticsMetadata();
stats.setName(mc.getName());
- stats.setAvailableConnectionCount(ManagedUtil.getSimpleValue(mc, "availableConnectionCount", Long.class));
- stats.setConnectionCount(ManagedUtil.getSimpleValue(mc, "connectionCount", Integer.class));
- stats.setConnectionCreatedCount(ManagedUtil.getSimpleValue(mc, "connectionCreatedCount", Integer.class));
- stats.setConnectionDestroyedCount(ManagedUtil.getSimpleValue(mc, "connectionDestroyedCount", Integer.class));
- stats.setInUseConnectionCount(ManagedUtil.getSimpleValue(mc, "inUseConnectionCount", Long.class));
- stats.setMaxConnectionsInUseCount(ManagedUtil.getSimpleValue(mc, "maxConnectionsInUseCount", Long.class));
- stats.setMaxSize(ManagedUtil.getSimpleValue(mc, "maxSize", Integer.class));
- stats.setMinSize(ManagedUtil.getSimpleValue(mc, "minSize", Integer.class));
+ stats.setAvailableConnectionCount(ManagedUtil.getSimpleValue(mc, "availableConnectionCount", Long.class));//$NON-NLS-1$
+ stats.setConnectionCount(ManagedUtil.getSimpleValue(mc, "connectionCount", Integer.class));//$NON-NLS-1$
+ stats.setConnectionCreatedCount(ManagedUtil.getSimpleValue(mc, "connectionCreatedCount", Integer.class));//$NON-NLS-1$
+ stats.setConnectionDestroyedCount(ManagedUtil.getSimpleValue(mc, "connectionDestroyedCount", Integer.class));//$NON-NLS-1$
+ stats.setInUseConnectionCount(ManagedUtil.getSimpleValue(mc, "inUseConnectionCount", Long.class));//$NON-NLS-1$
+ stats.setMaxConnectionsInUseCount(ManagedUtil.getSimpleValue(mc, "maxConnectionsInUseCount", Long.class));//$NON-NLS-1$
+ stats.setMaxSize(ManagedUtil.getSimpleValue(mc, "maxSize", Integer.class));//$NON-NLS-1$
+ stats.setMinSize(ManagedUtil.getSimpleValue(mc, "minSize", Integer.class));//$NON-NLS-1$
return stats;
}
@@ -721,7 +721,7 @@
try {
DeploymentTemplateInfo info = getView().getTemplate(typeName);
if(info == null) {
- throw new AdminProcessingException("Connector Type template supplied not found in the configuration."+typeName);
+ throw new AdminProcessingException(IntegrationPlugin.Util.getString("connector_type_not_found", typeName)); //$NON-NLS-1$
}
ArrayList<PropertyDefinition> props = new ArrayList<PropertyDefinition>();
@@ -738,15 +738,15 @@
p.setPropertyTypeClassName(mp.getMetaType().getTypeName());
p.setModifiable(!mp.isReadOnly());
- if (mp.getField("masked", Boolean.class) != null) {
- p.setMasked(mp.getField("masked", Boolean.class));
+ if (mp.getField("masked", Boolean.class) != null) {//$NON-NLS-1$
+ p.setMasked(mp.getField("masked", Boolean.class));//$NON-NLS-1$
}
else {
p.setMasked(false);
}
- if (mp.getField("advanced", Boolean.class) != null) {
- p.setAdvanced(mp.getField("advanced", Boolean.class));
+ if (mp.getField("advanced", Boolean.class) != null) {//$NON-NLS-1$
+ p.setAdvanced(mp.getField("advanced", Boolean.class));//$NON-NLS-1$
}
else {
p.setAdvanced(true);
@@ -779,7 +779,7 @@
try {
DeploymentTemplateInfo info = getView().getTemplate(typeName);
if(info == null) {
- throw new AdminProcessingException("Connector Type template supplied not found in the configuration."+typeName);
+ throw new AdminProcessingException(IntegrationPlugin.Util.getString("connector_type_not_found", typeName)); //$NON-NLS-1$
}
//config-properties list
@@ -800,13 +800,13 @@
}
else {
configProps.put(key, properties.getProperty(key));
- configProps.put(key+".type", "java.lang.String");
+ configProps.put(key+".type", "java.lang.String");//$NON-NLS-1$ //$NON-NLS-2$
}
}
if (configProps.size() > 0) {
MetaValue metaValue = ManagedUtil.compositeValueMap(configProps);
- info.getProperties().get("config-property").setValue(metaValue);
+ info.getProperties().get("config-property").setValue(metaValue);//$NON-NLS-1$
}
getView().applyTemplate(deploymentName, info);
@@ -837,31 +837,31 @@
}
private static final String connectorTemplate =
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"+
- "<deployment xmlns=\"urn:jboss:bean-deployer:2.0\">\n" +
- "<!-- This is Teiid connector type template - DO NOT DELETE -->\n"+
- "<bean name=\"${name}\" class=\"org.teiid.templates.connector.ConnectorTypeTemplate\">\n" +
- " <property name=\"info\"><inject bean=\"${name}-templateinfo\"/></property>\n" +
- " <property name=\"targetTemplate\"><inject bean=\"NoTxConnectionFactoryTemplate\"/></property>\n" +
- "</bean>\n" +
- "<bean name=\"${name}-templateinfo\" class=\"org.teiid.templates.connector.ConnectorTypeTemplateInfo\">\n" +
- " <constructor factoryMethod=\"createTemplateInfo\">\n" +
- " <factory bean=\"DSDeploymentTemplateInfoFactory\"/>\n" +
- " <parameter class=\"java.lang.Class\">org.teiid.templates.connector.ConnectorTypeTemplateInfo</parameter>\n" +
- " <parameter class=\"java.lang.Class\">org.jboss.resource.metadata.mcf.NoTxConnectionFactoryDeploymentMetaData</parameter>\n" +
- " <parameter class=\"java.lang.String\">${name}</parameter>\n" +
- " <parameter class=\"java.lang.String\">${name}</parameter>\n"+
- " </constructor>\n" +
- "</bean>\n"+
- "</deployment>";
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"+ //$NON-NLS-1$
+ "<deployment xmlns=\"urn:jboss:bean-deployer:2.0\">\n" + //$NON-NLS-1$
+ "<!-- This is Teiid connector type template - DO NOT DELETE -->\n"+ //$NON-NLS-1$
+ "<bean name=\"${name}\" class=\"org.teiid.templates.connector.ConnectorTypeTemplate\">\n" + //$NON-NLS-1$
+ " <property name=\"info\"><inject bean=\"${name}-templateinfo\"/></property>\n" + //$NON-NLS-1$
+ " <property name=\"targetTemplate\"><inject bean=\"NoTxConnectionFactoryTemplate\"/></property>\n" + //$NON-NLS-1$
+ "</bean>\n" + //$NON-NLS-1$
+ "<bean name=\"${name}-templateinfo\" class=\"org.teiid.templates.connector.ConnectorTypeTemplateInfo\">\n" + //$NON-NLS-1$
+ " <constructor factoryMethod=\"createTemplateInfo\">\n" + //$NON-NLS-1$
+ " <factory bean=\"DSDeploymentTemplateInfoFactory\"/>\n" + //$NON-NLS-1$
+ " <parameter class=\"java.lang.Class\">org.teiid.templates.connector.ConnectorTypeTemplateInfo</parameter>\n" + //$NON-NLS-1$
+ " <parameter class=\"java.lang.Class\">org.jboss.resource.metadata.mcf.NoTxConnectionFactoryDeploymentMetaData</parameter>\n" + //$NON-NLS-1$
+ " <parameter class=\"java.lang.String\">${name}</parameter>\n" + //$NON-NLS-1$
+ " <parameter class=\"java.lang.String\">${name}</parameter>\n"+ //$NON-NLS-1$
+ " </constructor>\n" + //$NON-NLS-1$
+ "</bean>\n"+ //$NON-NLS-1$
+ "</deployment>"; //$NON-NLS-1$
private static File createConnectorTypeTemplate(String name) throws IOException {
- String content = connectorTemplate.replace("${name}", name);
+ String content = connectorTemplate.replace("${name}", name);//$NON-NLS-1$
- File jarFile = File.createTempFile(name, ".jar");
+ File jarFile = File.createTempFile(name, ".jar");//$NON-NLS-1$
JarOutputStream jo = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(jarFile)));
- JarEntry je = new JarEntry("META-INF/jboss-beans.xml");
+ JarEntry je = new JarEntry("META-INF/jboss-beans.xml");//$NON-NLS-1$
jo.putNextEntry(je);
jo.write(content.getBytes());
@@ -909,7 +909,7 @@
// } catch (Exception e) {
// throw new AdminComponentException(e.getMessage(), e);
// }
- throw new AdminProcessingException("feature coming soon..");
+ throw new AdminProcessingException("feature coming soon..");//$NON-NLS-1$
}
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/AdminProvider.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/AdminProvider.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/AdminProvider.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -60,12 +60,12 @@
* Connection to profile service from a remote VM or local connection
*/
static private class ProfileConnection {
- private static final String PROFILE_SERVICE_JNDI_NAME = "ProfileService";
- private static final String SECURE_PROFILE_SERVICE_JNDI_NAME = "SecureProfileService/remote";
- private static final String NAMING_CONTEXT_FACTORY = "org.jnp.interfaces.NamingContextFactory";
- private static final String JNP_TIMEOUT_JNP_INIT_PROP = "jnp.timeout";
- private static final String JNP_SOTIMEOUT_JNP_INIT_PROP = "jnp.sotimeout";
- private static final String JNP_DISABLE_DISCOVERY_JNP_INIT_PROP = "jnp.disableDiscovery";
+ private static final String PROFILE_SERVICE_JNDI_NAME = "ProfileService"; //$NON-NLS-1$
+ private static final String SECURE_PROFILE_SERVICE_JNDI_NAME = "SecureProfileService/remote"; //$NON-NLS-1$
+ private static final String NAMING_CONTEXT_FACTORY = "org.jnp.interfaces.NamingContextFactory"; //$NON-NLS-1$
+ private static final String JNP_TIMEOUT_JNP_INIT_PROP = "jnp.timeout"; //$NON-NLS-1$
+ private static final String JNP_SOTIMEOUT_JNP_INIT_PROP = "jnp.sotimeout"; //$NON-NLS-1$
+ private static final String JNP_DISABLE_DISCOVERY_JNP_INIT_PROP = "jnp.disableDiscovery"; //$NON-NLS-1$
/**
* This is the timeout (in milliseconds) for the initial attempt to establish the remote connection.
@@ -123,12 +123,12 @@
env.setProperty(Context.INITIAL_CONTEXT_FACTORY, NAMING_CONTEXT_FACTORY);
env.setProperty(Context.SECURITY_PRINCIPAL, user);
env.setProperty(Context.SECURITY_CREDENTIALS, password);
- env.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
- env.setProperty(JNP_DISABLE_DISCOVERY_JNP_INIT_PROP, "true");
+ env.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces"); //$NON-NLS-1$
+ env.setProperty(JNP_DISABLE_DISCOVERY_JNP_INIT_PROP, "true"); //$NON-NLS-1$
env.setProperty(JNP_TIMEOUT_JNP_INIT_PROP, String.valueOf(JNP_TIMEOUT));
env.setProperty(JNP_SOTIMEOUT_JNP_INIT_PROP, String.valueOf(JNP_SO_TIMEOUT));
env.setProperty(JNP_DISABLE_DISCOVERY_JNP_INIT_PROP, String.valueOf(JNP_DISABLE_DISCOVERY));
- env.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
+ env.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); //$NON-NLS-1$ //$NON-NLS-2$
InitialContext ic = new InitialContext(env);
try {
@@ -167,7 +167,7 @@
passwordCallback.setPassword(password.toCharArray());
}
else {
- throw new UnsupportedCallbackException(callback, "Unrecognized Callback: " + callback);
+ throw new UnsupportedCallbackException(callback, "Unrecognized Callback: " + callback); //$NON-NLS-1$
}
}
Added: trunk/jboss-integration/src/main/java/org/teiid/jboss/IntegrationPlugin.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/IntegrationPlugin.java (rev 0)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/IntegrationPlugin.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -0,0 +1,33 @@
+/*
+ * 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.jboss;
+
+import java.util.ResourceBundle;
+
+import com.metamatrix.core.BundleUtil;
+
+public class IntegrationPlugin {
+ private static final String PLUGIN_ID = "org.teiid.jboss" ; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = PLUGIN_ID + ".i18n"; //$NON-NLS-1$
+ public static final BundleUtil Util = new BundleUtil(PLUGIN_ID,BUNDLE_NAME,ResourceBundle.getBundle(BUNDLE_NAME));
+
+}
Property changes on: trunk/jboss-integration/src/main/java/org/teiid/jboss/IntegrationPlugin.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/JBossSecurityHelper.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/JBossSecurityHelper.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/JBossSecurityHelper.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -31,6 +31,7 @@
import org.teiid.security.SecurityHelper;
public class JBossSecurityHelper implements SecurityHelper, Serializable {
+ private static final long serialVersionUID = 3598997061994110254L;
@Override
public boolean assosiateSecurityContext(String securityDomain, Object newContext) {
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/ConnectorBindingDeployer.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/ConnectorBindingDeployer.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/ConnectorBindingDeployer.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -34,6 +34,7 @@
import org.jboss.managed.api.factory.ManagedObjectFactory;
import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
+import org.teiid.connector.api.Connector;
import org.teiid.connector.api.ConnectorException;
import org.teiid.dqp.internal.datamgr.impl.ConnectorManager;
import org.teiid.dqp.internal.datamgr.impl.ConnectorManagerRepository;
@@ -59,12 +60,12 @@
for (ManagedConnectionFactoryDeploymentMetaData data : deployments) {
String connectorDefinition = data.getConnectionDefinition();
- if (connectorDefinition.equals("org.teiid.connector.api.Connector")) {
+ if (connectorDefinition.equals(Connector.class.getName())) {
String connectorName = data.getJndiName();
ConnectorManager cm = null;
try {
- cm = createConnectorManger("java:"+connectorName, data.getMaxSize());
+ cm = createConnectorManger("java:"+connectorName, data.getMaxSize()); //$NON-NLS-1$
cm.start();
cmGroup.addConnectorManager(cm);
} catch (ConnectorException e) {
@@ -72,7 +73,7 @@
}
// Add the references to the mgr as loaded.
- this.connectorManagerRepository.addConnectorManager("java:"+connectorName, cm);
+ this.connectorManagerRepository.addConnectorManager("java:"+connectorName, cm); //$NON-NLS-1$
log.info("Teiid Connector Started = " + connectorName); //$NON-NLS-1$
}
@@ -100,10 +101,10 @@
for (ManagedConnectionFactoryDeploymentMetaData data : deployments) {
String connectorDefinition = data.getConnectionDefinition();
- if (connectorDefinition.equals("org.teiid.connector.api.Connector")) {
+ if (connectorDefinition.equals(Connector.class.getName())) {
String connectorName = data.getJndiName();
if (this.connectorManagerRepository != null) {
- ConnectorManager cm = this.connectorManagerRepository.removeConnectorManager("java:"+connectorName);
+ ConnectorManager cm = this.connectorManagerRepository.removeConnectorManager("java:"+connectorName); //$NON-NLS-1$
if (cm != null) {
cm.stop();
}
@@ -122,7 +123,7 @@
for (ConnectorManager mgr:cmGroup.getConnectorManagers()) {
ManagedObject mo = this.mof.initManagedObject(mgr, ConnectorManager.class, mgr.getName(), mgr.getName());
if (mo == null) {
- throw new DeploymentException("could not create managed object");
+ throw new DeploymentException("could not create managed object"); //$NON-NLS-1$
}
managedObjects.put(mo.getName(), mo);
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -33,7 +33,6 @@
import javax.resource.spi.XATerminator;
import javax.resource.spi.work.WorkManager;
-import org.jboss.logging.Logger;
import org.jboss.managed.api.ManagedOperation.Impact;
import org.jboss.managed.api.annotation.ManagementComponent;
import org.jboss.managed.api.annotation.ManagementObject;
@@ -57,6 +56,7 @@
import org.teiid.dqp.internal.transaction.ContainerTransactionProvider;
import org.teiid.dqp.internal.transaction.TransactionServerImpl;
import org.teiid.dqp.internal.transaction.XidFactory;
+import org.teiid.jboss.IntegrationPlugin;
import org.teiid.logging.LogConfigurationProvider;
import org.teiid.logging.LogListernerProvider;
import org.teiid.security.SecurityHelper;
@@ -71,11 +71,11 @@
import com.metamatrix.api.exception.security.SessionServiceException;
import com.metamatrix.client.ExceptionUtil;
import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.MetaMatrixRuntimeException;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.dqp.client.ClientSideDQP;
import com.metamatrix.dqp.client.DQPManagement;
-import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
import com.metamatrix.dqp.service.AuthorizationService;
import com.metamatrix.dqp.service.BufferService;
import com.metamatrix.dqp.service.SessionService;
@@ -87,8 +87,6 @@
public class RuntimeEngineDeployer extends DQPConfiguration implements DQPManagement, Serializable , ClientServiceRegistry {
private static final long serialVersionUID = -4676205340262775388L;
- protected Logger log = Logger.getLogger(getClass());
-
private transient SocketConfiguration jdbcSocketConfiguration;
private transient SocketConfiguration adminSocketConfiguration;
private transient SocketTransport jdbcSocket;
@@ -125,19 +123,19 @@
if (this.jdbcSocketConfiguration.isEnabled()) {
this.jdbcSocket = new SocketTransport(this.jdbcSocketConfiguration, csr);
this.jdbcSocket.start();
- log.info("Teiid JDBC = " + (this.jdbcSocketConfiguration.getSSLConfiguration().isSslEnabled()?"mms://":"mm://")+this.jdbcSocketConfiguration.getHostAddress().getHostName()+":"+this.jdbcSocketConfiguration.getPortNumber()); //$NON-NLS-1$
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("socket_enabled","Teiid JDBC = ",(this.jdbcSocketConfiguration.getSSLConfiguration().isSslEnabled()?"mms://":"mm://")+this.jdbcSocketConfiguration.getHostAddress().getHostName()+":"+this.jdbcSocketConfiguration.getPortNumber())); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
} else {
- log.debug(DQPEmbeddedPlugin.Util.getString("SocketTransport.3")); //$NON-NLS-1$
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("socket_not_enabled", "jdbc connections")); //$NON-NLS-1$ //$NON-NLS-2$
}
if (this.adminSocketConfiguration.isEnabled()) {
this.adminSocket = new SocketTransport(this.adminSocketConfiguration, csr);
this.adminSocket.start();
- log.info("Teiid Admin = " + (this.adminSocketConfiguration.getSSLConfiguration().isSslEnabled()?"mms://":"mm://")+this.adminSocketConfiguration.getHostAddress().getHostName()+":"+this.adminSocketConfiguration.getPortNumber()); //$NON-NLS-1$
+ LogManager.logInfo(com.metamatrix.common.util.LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("socket_enabled","Teiid Admin", (this.adminSocketConfiguration.getSSLConfiguration().isSslEnabled()?"mms://":"mm://")+this.adminSocketConfiguration.getHostAddress().getHostName()+":"+this.adminSocketConfiguration.getPortNumber())); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
} else {
- log.debug(DQPEmbeddedPlugin.Util.getString("SocketTransport.3")); //$NON-NLS-1$
+ LogManager.logInfo(com.metamatrix.common.util.LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("socket_not_enabled", "admin connections")); //$NON-NLS-1$ //$NON-NLS-2$
}
- log.info("Teiid Engine Started = " + new Date(System.currentTimeMillis()).toString()); //$NON-NLS-1$
+ LogManager.logInfo(com.metamatrix.common.util.LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("engine_started", new Date(System.currentTimeMillis()).toString())); //$NON-NLS-1$
}
public void stop() {
@@ -158,8 +156,7 @@
this.adminSocket.stop();
this.adminSocket = null;
}
-
- log.info("Teiid Engine Stopped = " + new Date(System.currentTimeMillis()).toString()); //$NON-NLS-1$
+ LogManager.logInfo(com.metamatrix.common.util.LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("engine_stopped", new Date(System.currentTimeMillis()).toString())); //$NON-NLS-1$
}
private void createClientServices() {
@@ -235,7 +232,7 @@
}
public void setXATerminator(XATerminator xaTerminator){
- this.dqpCore.setTransactionService(getTransactionService("localhost", xaTerminator));
+ this.dqpCore.setTransactionService(getTransactionService("localhost", xaTerminator)); //$NON-NLS-1$
}
public void setWorkManager(WorkManager mgr) {
@@ -278,7 +275,7 @@
@Override
@ManagementOperation(description="Get Runtime workmanager statistics", impact=Impact.ReadOnly,params={@ManagementParameter(name="identifier",description="Use \"runtime\" for engine, or connector name for connector")})
public WorkerPoolStatisticsMetadata getWorkManagerStatistics(String identifier) {
- if ("runtime".equalsIgnoreCase(identifier)) {
+ if ("runtime".equalsIgnoreCase(identifier)) { //$NON-NLS-1$
return this.dqpCore.getWorkManagerStatistics();
}
ConnectorManager cm = this.dqpCore.getConnectorManagerRepository().getConnectorManager(identifier);
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/VDBMetadataComponentMapper.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/VDBMetadataComponentMapper.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/VDBMetadataComponentMapper.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -27,6 +27,9 @@
import org.jboss.system.server.profileservice.persistence.xml.PersistedComponent;
import org.teiid.adminapi.impl.VDBMetaData;
+/**
+ * This class used in the Teiid deployer -jboss-beans.xml file.
+ */
public class VDBMetadataComponentMapper extends AbstractComponentMapper {
public VDBMetadataComponentMapper(PersistenceFactory persistenceFactory) {
@@ -36,11 +39,11 @@
@Override
protected ManagedObject getComponent(Object attachment, PersistedComponent component, boolean create) {
VDBMetaData metadata = (VDBMetaData)attachment;
- String vdbName = metadata.getName()+"_"+metadata.getVersion();
+ String vdbName = metadata.getName()+"_"+metadata.getVersion(); //$NON-NLS-1$
if (vdbName.equals(component.getOriginalName())) {
return getMOF().initManagedObject(metadata, VDBMetaData.class, vdbName, vdbName);
}
- throw new IllegalStateException("could not find deployment " + component.getOriginalName());
+ throw new IllegalStateException("could not find deployment " + component.getOriginalName());//$NON-NLS-1$
}
@Override
@@ -51,7 +54,7 @@
@Override
protected void setComponentName(PersistedComponent component, ManagedObject mo) {
VDBMetaData metadata = (VDBMetaData)mo.getAttachment();
- component.setName(metadata.getName()+"_"+metadata.getVersion());
+ component.setName(metadata.getName()+"_"+metadata.getVersion()); //$NON-NLS-1$
}
@Override
Added: trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
===================================================================
--- trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties (rev 0)
+++ trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2010-03-09 23:29:14 UTC (rev 1954)
@@ -0,0 +1,35 @@
+#
+# 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.
+#
+
+engine_started=Teiid Engine Started = {0}
+socket_not_enabled=Socket transport for {0} is not enabled in Teiid.
+socket_enabled={0} {1}
+engine_stopped=Teiid Engine stopped {0}
+admin_connection_closed=Teiid admin connection is already closed.
+connector_binding_exists=Connector binding with name "{0}" already exists.
+failed_to_connector_deployer=Failed to find deployer name of the connector. Can not start!
+failed_to_start_connector=Failed to start Connector Binding = {0}
+failed_to_stop_connector=Failed to start Connector Binding = {0}
+bad_vdb_extension=The extension of the file name must be either ".vdb" for designer vdb or "xxx-vdb.xml" for dynamic VDBs
+bad_connector_type_name="Teiid connector type names must start with \"connector-\""
+connector_type_exists=Connector type with name:"{0}" already exists!
+connector_type_not_found=Connector Type template "{0}" not found in the configuration.
\ No newline at end of file
Property changes on: trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/runtime/src/main/java/org/teiid/deployers/BaseMultipleVFSParsingDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/BaseMultipleVFSParsingDeployer.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/runtime/src/main/java/org/teiid/deployers/BaseMultipleVFSParsingDeployer.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -27,9 +27,11 @@
import java.util.Map;
import java.util.Set;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.deployers.vfs.spi.deployer.MultipleVFSParsingDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.VirtualFileFilter;
/**
* Overriding the base MultipleVFSParsingDeployer so that the parse method is supplied with VFSDeploymentUnit.
@@ -37,17 +39,27 @@
*/
public abstract class BaseMultipleVFSParsingDeployer<T> extends MultipleVFSParsingDeployer<T> {
- public BaseMultipleVFSParsingDeployer(Class<T> output,Map<String, Class<?>> mappings, String suffix, Class<?> suffixClass) {
+ private String suffix2;
+ private Class<?> suffixClass2;
+
+ public BaseMultipleVFSParsingDeployer(Class<T> output,Map<String, Class<?>> mappings, String suffix, Class<?> suffixClass, String suffix2, Class<?>suffixClass2) {
super(output, mappings, suffix, suffixClass);
+ this.suffix2 = suffix2;
+ this.suffixClass2 = suffixClass2;
}
- public BaseMultipleVFSParsingDeployer(Class<T> output,Map<String, Class<?>> mappings) {
- super(output, mappings);
- }
-
@SuppressWarnings("unchecked")
@Override
protected T mergeFiles(VFSDeploymentUnit unit, T root,List<VirtualFile> files, Set<String> missingFiles) throws Exception {
+
+ List<VirtualFile> matched = unit.getMetaDataFiles(new VirtualFileFilter() {
+ @Override
+ public boolean accepts(VirtualFile file) {
+ return file.getName().endsWith(suffix2);
+ }
+ });
+
+ files.addAll(matched);
Map<Class<?>, List<Object>> metadata = new HashMap<Class<?>, List<Object>>();
for (VirtualFile file : files) {
Class<?> clazz = matchFileToClass(unit, file);
@@ -63,8 +75,16 @@
}
@Override
+ protected Class<?> matchFileToClass(DeploymentUnit unit, VirtualFile file){
+ if (file.getName().endsWith(this.suffix2)) {
+ return this.suffixClass2;
+ }
+ return super.matchFileToClass(unit, file);
+ }
+
+ @Override
protected <U> U parse(Class<U> expectedType, VirtualFile file, Object root) throws Exception{
- throw new UnsupportedOperationException("This will be never invoked");
+ throw new UnsupportedOperationException("This will be never invoked"); //$NON-NLS-1$
}
protected abstract <U> U parse(VFSDeploymentUnit unit, Class<U> expectedType, VirtualFile file, Object root) throws Exception;
}
Modified: trunk/runtime/src/main/java/org/teiid/deployers/SystemVDBDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/SystemVDBDeployer.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/runtime/src/main/java/org/teiid/deployers/SystemVDBDeployer.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -33,6 +33,7 @@
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.metadata.index.IndexConstants;
import org.teiid.metadata.index.IndexMetadataFactory;
+import org.teiid.runtime.RuntimePlugin;
import com.metamatrix.core.CoreConstants;
import com.metamatrix.core.MetaMatrixRuntimeException;
@@ -54,7 +55,7 @@
try {
URL url = Thread.currentThread().getContextClassLoader().getResource(CoreConstants.SYSTEM_VDB);
if (url == null) {
- throw new MetaMatrixRuntimeException("System.vdb not found in classpath");
+ throw new MetaMatrixRuntimeException(RuntimePlugin.Util.getString("system_vdb_not_found")); //$NON-NLS-1$
}
SystemVDBContext systemVDB = new SystemVDBContext(url);
VirtualFile vdb = new VirtualFile(systemVDB.getRoot());
@@ -71,9 +72,9 @@
}
this.vdbRepository.addMetadataStore(deployment, imf.getMetadataStore());
} catch (URISyntaxException e) {
- throw new MetaMatrixRuntimeException(e, "Failed to deploy "+CoreConstants.SYSTEM_VDB);
+ throw new MetaMatrixRuntimeException(e, RuntimePlugin.Util.getString("failed_to_deployed", CoreConstants.SYSTEM_VDB)); //$NON-NLS-1$
} catch (IOException e) {
- throw new MetaMatrixRuntimeException(e, "Failed to deploy "+CoreConstants.SYSTEM_VDB);
+ throw new MetaMatrixRuntimeException(e, RuntimePlugin.Util.getString("failed_to_deployed", CoreConstants.SYSTEM_VDB)); //$NON-NLS-1$
}
}
Modified: trunk/runtime/src/main/java/org/teiid/deployers/UDFMetaData.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/UDFMetaData.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/runtime/src/main/java/org/teiid/deployers/UDFMetaData.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -21,21 +21,40 @@
*/
package org.teiid.deployers;
+import java.io.IOException;
+import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashMap;
import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.virtual.VirtualFile;
+import org.teiid.runtime.RuntimePlugin;
+import com.metamatrix.query.function.metadata.FunctionMetadataReader;
import com.metamatrix.query.function.metadata.FunctionMethod;
@ManagementObject
public class UDFMetaData {
- private Collection <FunctionMethod> methods = null;
+ private Collection <FunctionMethod> methods = new ArrayList<FunctionMethod>();
- public UDFMetaData(Collection <FunctionMethod> methods) {
- this.methods = methods;
+ private HashMap<String, VirtualFile> files = new HashMap<String, VirtualFile>();
+
+ public void addModelFile(VirtualFile file) {
+ this.files.put(file.getName(), file);
}
- public Collection <FunctionMethod> getMethods(){
+
+ void buildFunctionModelFile(String name) throws IOException {
+ VirtualFile file = this.files.get(name);
+ if (file != null) {
+ this.methods.addAll(FunctionMetadataReader.loadFunctionMethods(file.openStream()));
+ }
+ else {
+ throw new IOException(RuntimePlugin.Util.getString("udf_model_not_found", name)); //$NON-NLS-1$
+ }
+ }
+
+ public Collection <FunctionMethod> getFunctions(){
return this.methods;
}
}
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -49,6 +49,7 @@
import org.teiid.metadata.CompositeMetadataStore;
import org.teiid.metadata.TransformationMetadata;
import org.teiid.metadata.index.IndexMetadataFactory;
+import org.teiid.runtime.RuntimePlugin;
import com.metamatrix.core.CoreConstants;
import com.metamatrix.core.util.FileUtils;
@@ -72,12 +73,12 @@
public void deploy(DeploymentUnit unit, VDBMetaData deployment) throws DeploymentException {
if (this.vdbRepository.getVDB(deployment.getName(), deployment.getVersion()) != null) {
this.vdbRepository.removeVDB(deployment.getName(), deployment.getVersion());
- log.info("Re-deploying VDB = "+deployment);
+ log.info(RuntimePlugin.Util.getString("redeploying_vdb", deployment)); //$NON-NLS-1$
}
List<String> errors = deployment.getValidityErrors();
if (errors != null && !errors.isEmpty()) {
- throw new DeploymentException("VDB has validaity errors; failed to deploy");
+ throw new DeploymentException(RuntimePlugin.Util.getString("validity_errors_in_vdb", deployment)); //$NON-NLS-1$
}
// Add system model to the deployed VDB
@@ -85,7 +86,7 @@
system.setName(CoreConstants.SYSTEM_MODEL);
system.setVisible(true);
system.setModelType(Model.Type.PHYSICAL.name());
- system.addSourceMapping("system", "system");
+ system.addSourceMapping("system", "system"); //$NON-NLS-1$ //$NON-NLS-2$
system.setSupportsMultiSourceBindings(false);
deployment.addModel(system);
@@ -132,7 +133,7 @@
try {
saveMetadataStore((VFSDeploymentUnit)unit, deployment, metadata.getMetadataStore());
} catch (IOException e1) {
- log.warn("failed to save metadata for VDB "+deployment.getName()+"."+deployment.getVersion(), e1);
+ log.warn(RuntimePlugin.Util.getString("vdb_save_failed", deployment.getName()+"."+deployment.getVersion()), e1); //$NON-NLS-1$ //$NON-NLS-2$
}
boolean valid = validateSources(deployment);
@@ -141,7 +142,7 @@
if (valid) {
deployment.setStatus(VDB.Status.ACTIVE);
}
- log.info("VDB = "+deployment + " deployed");
+ log.info(RuntimePlugin.Util.getString("vdb_deployed",deployment)); //$NON-NLS-1$
}
private boolean validateSources(VDBMetaData deployment) {
@@ -149,13 +150,16 @@
for(Model m:deployment.getModels()) {
ModelMetaData model = (ModelMetaData)m;
for (String sourceName:model.getSourceNames()) {
+ if (sourceName.equals(CoreConstants.SYSTEM_MODEL)) {
+ continue;
+ }
String jndiName = model.getSourceJndiName(sourceName);
try {
InitialContext ic = new InitialContext();
ic.lookup(jndiName);
} catch (NamingException e) {
valid = false;
- String msg = "Jndi resource = "+ jndiName + " not found for Source Name = "+sourceName;
+ String msg = RuntimePlugin.Util.getString("jndi_not_found", jndiName,sourceName); //$NON-NLS-1$
model.addError(ModelMetaData.ValidationError.Severity.ERROR.name(), msg);
log.info(msg);
}
@@ -171,14 +175,14 @@
// get the system VDB metadata store
MetadataStore systemStore = this.vdbRepository.getMetadataStore(CoreConstants.SYSTEM_VDB, 1);
if (systemStore == null) {
- throw new DeploymentException("System.vdb needs to be loaded before any other VDBs.");
+ throw new DeploymentException(RuntimePlugin.Util.getString("system_vdb_load_error")); //$NON-NLS-1$
}
store.addMetadataStore(systemStore);
Collection <FunctionMethod> methods = null;
if (udf != null) {
- methods = udf.getMethods();
+ methods = udf.getFunctions();
}
TransformationMetadata metadata = new TransformationMetadata(vdb, store, visibilityMap, methods);
@@ -206,10 +210,10 @@
try {
deleteMetadataStore((VFSDeploymentUnit)unit, deployment);
} catch (IOException e) {
- log.warn("failed to delete the cached metadata files due to:" + e.getMessage());
+ log.warn(RuntimePlugin.Util.getString("vdb_delete_failed", e.getMessage())); //$NON-NLS-1$
}
- log.info("VDB = "+deployment + " undeployed");
+ log.info(RuntimePlugin.Util.getString("vdb_undeployed", deployment)); //$NON-NLS-1$
}
public void setContextCache(DQPContextCache cache) {
@@ -225,7 +229,7 @@
}
private void saveMetadataStore(VFSDeploymentUnit unit, VDBMetaData vdb, CompositeMetadataStore store) throws IOException {
- File cacheFileName = this.serializer.getAttachmentPath(unit, vdb.getName()+"_"+vdb.getVersion());
+ File cacheFileName = this.serializer.getAttachmentPath(unit, vdb.getName()+"_"+vdb.getVersion()); //$NON-NLS-1$
if (!cacheFileName.exists()) {
this.serializer.saveAttachment(cacheFileName,store);
}
@@ -233,7 +237,7 @@
private void deleteMetadataStore(VFSDeploymentUnit unit, VDBMetaData vdb) throws IOException {
if (!unit.getRoot().exists()) {
- File cacheFileName = this.serializer.getAttachmentPath(unit, vdb.getName()+"_"+vdb.getVersion());
+ File cacheFileName = this.serializer.getAttachmentPath(unit, vdb.getName()+"_"+vdb.getVersion()); //$NON-NLS-1$
if (cacheFileName.exists()) {
FileUtils.removeDirectoryAndChildren(cacheFileName.getParentFile());
}
@@ -242,10 +246,10 @@
private MetadataStore buildDynamicMetadataStore(VFSDeploymentUnit unit, VDBMetaData vdb, ModelMetaData model) throws DeploymentException{
if (model.getSourceNames().isEmpty()) {
- throw new DeploymentException(vdb.getName()+"-"+vdb.getVersion()+" Can not be deployed because model {"+model.getName()+"} is not fully configured.");
+ throw new DeploymentException(RuntimePlugin.Util.getString("fail_to_deploy", vdb.getName()+"-"+vdb.getVersion(), model.getName())); //$NON-NLS-1$ //$NON-NLS-2$
}
- boolean cache = "cached".equalsIgnoreCase(vdb.getPropertyValue("UseConnectorMetadata"));
+ boolean cache = "cached".equalsIgnoreCase(vdb.getPropertyValue("UseConnectorMetadata")); //$NON-NLS-1$ //$NON-NLS-2$
File cacheFile = null;
if (cache) {
try {
@@ -254,9 +258,9 @@
return this.serializer.loadAttachment(cacheFile, MetadataStore.class);
}
} catch (IOException e) {
- log.warn("invalid metadata in file = "+cacheFile.getAbsolutePath());
+ log.warn(RuntimePlugin.Util.getString("invalid_metadata_file", cacheFile.getAbsolutePath())); //$NON-NLS-1$
} catch (ClassNotFoundException e) {
- log.warn("invalid metadata in file = "+cacheFile.getAbsolutePath());
+ log.warn(RuntimePlugin.Util.getString("invalid_metadata_file", cacheFile.getAbsolutePath())); //$NON-NLS-1$
}
}
@@ -283,10 +287,10 @@
}
}
}
- throw new DeploymentException(vdb.getName()+"-"+vdb.getVersion()+" Can not be deployed because model {"+model.getName()+"} can not retrive metadata", exception);
+ throw new DeploymentException(RuntimePlugin.Util.getString("failed_to_retrive_metadata", vdb.getName()+"-"+vdb.getVersion(), model.getName()), exception); //$NON-NLS-1$ //$NON-NLS-2$
}
private File buildCachedFileName(VFSDeploymentUnit unit, VDBMetaData vdb, String modelName) {
- return this.serializer.getAttachmentPath(unit, vdb.getName()+"_"+vdb.getVersion()+"_"+modelName);
+ return this.serializer.getAttachmentPath(unit, vdb.getName()+"_"+vdb.getVersion()+"_"+modelName); //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -37,17 +37,18 @@
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.logging.Logger;
import org.jboss.virtual.VirtualFile;
+import org.teiid.adminapi.Model;
import org.teiid.adminapi.impl.ModelMetaData;
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.metadata.CompositeMetadataStore;
import org.teiid.metadata.index.IndexConstants;
import org.teiid.metadata.index.IndexMetadataFactory;
+import org.teiid.runtime.RuntimePlugin;
import org.xml.sax.SAXException;
import com.metamatrix.core.CoreConstants;
import com.metamatrix.core.util.StringUtil;
import com.metamatrix.core.vdb.VdbConstants;
-import com.metamatrix.query.function.metadata.FunctionMetadataReader;
/**
* This file loads the "vdb.xml" file inside a ".vdb" file, along with all the metadata in the .INDEX files
@@ -57,14 +58,16 @@
private ObjectSerializer serializer;
public VDBParserDeployer() {
- super(VDBMetaData.class, getCustomMappings(), IndexConstants.NAME_DELIM_CHAR+IndexConstants.INDEX_EXT, IndexMetadataFactory.class);
+ super(VDBMetaData.class, getCustomMappings(), IndexConstants.NAME_DELIM_CHAR+IndexConstants.INDEX_EXT, IndexMetadataFactory.class, VdbConstants.MODEL_EXT, UDFMetaData.class);
setAllowMultipleFiles(true);
}
private static Map<String, Class<?>> getCustomMappings() {
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
mappings.put(VdbConstants.DEPLOYMENT_FILE, VDBMetaData.class);
- mappings.put(VdbConstants.UDF_FILE_NAME, UDFMetaData.class);
+ // this not required but the to make the framework with extended classes
+ // this required otherwise different version of parse is invoked.
+ mappings.put("undefined", UDFMetaData.class); //$NON-NLS-1$
return mappings;
}
@@ -77,7 +80,14 @@
return expectedType.cast(def);
}
else if (expectedType.equals(UDFMetaData.class)) {
- UDFMetaData udf = new UDFMetaData(FunctionMetadataReader.loadFunctionMethods(file.openStream()));
+ if (root == null) {
+ root = unit.getAttachment(UDFMetaData.class);
+ if (root == null) {
+ root = new UDFMetaData();
+ }
+ }
+ UDFMetaData udf = UDFMetaData.class.cast(root);
+ udf.addModelFile(file);
return expectedType.cast(udf);
}
else if (expectedType.equals(IndexMetadataFactory.class)) {
@@ -93,14 +103,14 @@
return expectedType.cast(imf);
}
else {
- throw new IllegalArgumentException("Cannot match arguments: expectedClass=" + expectedType );
+ throw new IllegalArgumentException("Cannot match arguments: expectedClass=" + expectedType ); //$NON-NLS-1$
}
}
static Unmarshaller getUnMarsheller() throws JAXBException, SAXException {
JAXBContext jc = JAXBContext.newInstance(new Class<?>[] {VDBMetaData.class});
SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
- Schema schema = schemaFactory.newSchema(VDBMetaData.class.getResource("/vdb-deployer.xsd"));
+ Schema schema = schemaFactory.newSchema(VDBMetaData.class.getResource("/vdb-deployer.xsd")); //$NON-NLS-1$
Unmarshaller un = jc.createUnmarshaller();
un.setSchema(schema);
return un;
@@ -108,22 +118,22 @@
@Override
protected VDBMetaData mergeMetaData(VFSDeploymentUnit unit, Map<Class<?>, List<Object>> metadata) throws Exception {
- VDBMetaData def = getInstance(metadata, VDBMetaData.class);
+ VDBMetaData vdb = getInstance(metadata, VDBMetaData.class);
UDFMetaData udf = getInstance(metadata, UDFMetaData.class);
- if (def == null) {
- log.error("Invalid VDB file deployment failed ="+unit.getRoot().getName());
+ if (vdb == null) {
+ log.error(RuntimePlugin.Util.getString("invlaid_vdb_file",unit.getRoot().getName())); //$NON-NLS-1$
return null;
}
- def.setUrl(unit.getRoot().toURL().toExternalForm());
+ vdb.setUrl(unit.getRoot().toURL().toExternalForm());
// add the entries and determine their visibility
VirtualFile root = unit.getRoot();
List<VirtualFile> children = root.getChildrenRecursively();
Map<VirtualFile, Boolean> visibilityMap = new LinkedHashMap<VirtualFile, Boolean>();
for(VirtualFile f: children) {
- visibilityMap.put(f, isFileVisible(f.getPathName(), def));
+ visibilityMap.put(f, isFileVisible(f.getPathName(), vdb));
}
// build the metadata store
@@ -133,10 +143,10 @@
if (imf != null) {
imf.addEntriesPlusVisibilities(visibilityMap);
unit.addAttachment(IndexMetadataFactory.class, imf);
-
+
// add the cached store.
CompositeMetadataStore store = null;
- File cacheFileName = this.serializer.getAttachmentPath(unit, def.getName()+"_"+def.getVersion());
+ File cacheFileName = this.serializer.getAttachmentPath(unit, vdb.getName()+"_"+vdb.getVersion()); //$NON-NLS-1$
if (cacheFileName.exists()) {
store = this.serializer.loadAttachment(cacheFileName, CompositeMetadataStore.class);
}
@@ -147,13 +157,20 @@
}
}
- // If the UDF file is enclosed then attach it to the deployment artifact
if (udf != null) {
+ // load the UDF
+ for(Model model:vdb.getModels()) {
+ if (model.getModelType().equals(Model.Type.FUNCTION)) {
+ udf.buildFunctionModelFile(model.getName()+VdbConstants.MODEL_EXT);
+ }
+ }
+
+ // If the UDF file is enclosed then attach it to the deployment artifact
unit.addAttachment(UDFMetaData.class, udf);
}
- log.debug("VDB "+unit.getRoot().getName()+" has been parsed.");
- return def;
+ log.debug("VDB "+unit.getRoot().getName()+" has been parsed."); //$NON-NLS-1$ //$NON-NLS-2$
+ return vdb;
}
private final static boolean isSystemModelWithSystemTableType(String modelName) {
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -35,10 +35,12 @@
import org.teiid.connector.metadata.runtime.MetadataStore;
import org.teiid.metadata.CompositeMetadataStore;
import org.teiid.metadata.TransformationMetadata;
+import org.teiid.runtime.RuntimePlugin;
+import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.types.DataTypeManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.CoreConstants;
-import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
import com.metamatrix.vdb.runtime.VDBKey;
/**
@@ -54,7 +56,7 @@
public void addVDB(VDBMetaData vdb) throws DeploymentException {
if (getVDB(vdb.getName(), vdb.getVersion()) != null) {
- throw new DeploymentException("VDB with given name and version already exists!");
+ throw new DeploymentException(RuntimePlugin.Util.getString("duplicate_vdb", vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
}
this.vdbRepo.put(vdbId(vdb), vdb);
}
@@ -81,14 +83,14 @@
}
}
if(latestVersion == 0) {
- throw new VirtualDatabaseException(DQPEmbeddedPlugin.Util.getString("VDBService.VDB_does_not_exist._2", vdbName, "latest")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new VirtualDatabaseException(RuntimePlugin.Util.getString("VDBService.VDB_does_not_exist._2", vdbName, "latest")); //$NON-NLS-1$ //$NON-NLS-2$
}
VDBMetaData vdb = getVDB(vdbName, latestVersion);
if (vdb.getStatus() == VDB.Status.ACTIVE || vdb.getStatus() == VDB.Status.ACTIVE_DEFAULT) {
return vdb;
}
- throw new VirtualDatabaseException(DQPEmbeddedPlugin.Util.getString("VDBService.VDB_does_not_exist._2", vdbName, latestVersion)); //$NON-NLS-1$
+ throw new VirtualDatabaseException(RuntimePlugin.Util.getString("VDBService.VDB_does_not_exist._2", vdbName, latestVersion)); //$NON-NLS-1$
}
public void changeVDBStatus(String vdbName, int vdbVersion, VDB.Status status) throws VirtualDatabaseException {
@@ -101,7 +103,7 @@
// Change the VDB's status
if (status == VDB.Status.ACTIVE || status == VDB.Status.ACTIVE_DEFAULT) {
if (!vdb.isValid()) {
- throw new VirtualDatabaseException(DQPEmbeddedPlugin.Util.getString("EmbeddedConfigurationService.invalid_vdb", vdb.getName())); //$NON-NLS-1$
+ throw new VirtualDatabaseException(RuntimePlugin.Util.getString("EmbeddedConfigurationService.invalid_vdb", vdb.getName())); //$NON-NLS-1$
}
if (status == VDB.Status.ACTIVE_DEFAULT) {
// only 1 can be set as active default
@@ -116,12 +118,12 @@
// make sure we got what we asked for
if (status != vdb.getStatus()) {
- throw new VirtualDatabaseException(DQPEmbeddedPlugin.Util.getString("VDBService.vdb_change_status_failed", new Object[] { vdbName, vdbVersion, status })); //$NON-NLS-1$
+ throw new VirtualDatabaseException(RuntimePlugin.Util.getString("VDBService.vdb_change_status_failed", new Object[] { vdbName, vdbVersion, status })); //$NON-NLS-1$
}
// now save the change in the configuration.
saveVDB(vdb);
- DQPEmbeddedPlugin.logInfo("VDBService.vdb_change_status", new Object[] { vdbName, vdbVersion, status}); //$NON-NLS-1$
+ LogManager.logInfo(LogConstants.CTX_DQP, RuntimePlugin.Util.getString("VDBService.vdb_change_status", new Object[] { vdbName, vdbVersion, status})); //$NON-NLS-1$
}
}
Added: trunk/runtime/src/main/java/org/teiid/runtime/RuntimePlugin.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/runtime/RuntimePlugin.java (rev 0)
+++ trunk/runtime/src/main/java/org/teiid/runtime/RuntimePlugin.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -0,0 +1,33 @@
+/*
+ * 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.runtime;
+
+import java.util.ResourceBundle;
+
+import com.metamatrix.core.BundleUtil;
+
+public class RuntimePlugin {
+ private static final String PLUGIN_ID = "org.teiid.runtime" ; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = PLUGIN_ID + ".i18n"; //$NON-NLS-1$
+ public static final BundleUtil Util = new BundleUtil(PLUGIN_ID,BUNDLE_NAME,ResourceBundle.getBundle(BUNDLE_NAME));
+
+}
Property changes on: trunk/runtime/src/main/java/org/teiid/runtime/RuntimePlugin.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -43,6 +43,7 @@
import org.teiid.deployers.VDBRepository;
import org.teiid.dqp.internal.process.DQPWorkContext;
import org.teiid.logging.api.AuditMessage;
+import org.teiid.runtime.RuntimePlugin;
import org.teiid.security.roles.AuthorizationActions;
import org.teiid.security.roles.AuthorizationPermission;
import org.teiid.security.roles.AuthorizationPoliciesHolder;
@@ -60,7 +61,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.LRUCache;
-import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
import com.metamatrix.dqp.service.AuthorizationService;
import com.metamatrix.platform.security.api.MetaMatrixPrincipal;
import com.metamatrix.platform.security.api.MetaMatrixPrincipalName;
@@ -199,14 +199,14 @@
AuthorizationRealm aRealm = aPerm.getRealm();
if ( theRealm != null ) {
if ( ! theRealm.equals(aRealm) ) {
- throw new AuthorizationMgmtException(DQPEmbeddedPlugin.Util.getString("AuthorizationServiceImpl.wrong_realms ")); //$NON-NLS-1$
+ throw new AuthorizationMgmtException(RuntimePlugin.Util.getString("AuthorizationServiceImpl.wrong_realms ")); //$NON-NLS-1$
}
} else {
theRealm = aRealm;
}
}
if ( theRealm == null ) {
- throw new AuthorizationMgmtException(DQPEmbeddedPlugin.Util.getString("AuthorizationServiceImpl.Authorization_Realm_is_null")); //$NON-NLS-1$
+ throw new AuthorizationMgmtException(RuntimePlugin.Util.getString("AuthorizationServiceImpl.Authorization_Realm_is_null")); //$NON-NLS-1$
}
return theRealm;
}
Modified: trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -31,6 +31,7 @@
import org.jboss.managed.api.annotation.ManagementProperties;
import org.jboss.managed.api.annotation.ManagementProperty;
import org.teiid.dqp.internal.cache.DQPContextCache;
+import org.teiid.runtime.RuntimePlugin;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.cache.CacheFactory;
@@ -40,7 +41,6 @@
import com.metamatrix.common.buffer.impl.MemoryStorageManager;
import com.metamatrix.core.MetaMatrixRuntimeException;
import com.metamatrix.core.util.FileUtils;
-import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
import com.metamatrix.dqp.service.BufferService;
/**
@@ -105,9 +105,9 @@
}
} catch(MetaMatrixComponentException e) {
- throw new MetaMatrixRuntimeException(e, DQPEmbeddedPlugin.Util.getString("LocalBufferService.Failed_initializing_buffer_manager._8")); //$NON-NLS-1$
+ throw new MetaMatrixRuntimeException(e, RuntimePlugin.Util.getString("LocalBufferService.Failed_initializing_buffer_manager._8")); //$NON-NLS-1$
} catch(IOException e) {
- throw new MetaMatrixRuntimeException(e, DQPEmbeddedPlugin.Util.getString("LocalBufferService.Failed_initializing_buffer_manager._8")); //$NON-NLS-1$
+ throw new MetaMatrixRuntimeException(e, RuntimePlugin.Util.getString("LocalBufferService.Failed_initializing_buffer_manager._8")); //$NON-NLS-1$
}
}
Modified: trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -46,6 +46,7 @@
import org.teiid.deployers.VDBRepository;
import org.teiid.deployers.VirtualDatabaseException;
import org.teiid.dqp.internal.process.DQPCore;
+import org.teiid.runtime.RuntimePlugin;
import org.teiid.security.Credentials;
import org.teiid.security.SecurityHelper;
@@ -56,7 +57,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.util.ArgCheck;
-import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
import com.metamatrix.dqp.service.SessionService;
import com.metamatrix.platform.security.api.SessionToken;
@@ -97,10 +97,10 @@
for (SessionMetadata info : sessionCache.values()) {
try {
if (currentTime - info.getLastPingTime() > ServerConnection.PING_INTERVAL * 5) {
- LogManager.logInfo(LogConstants.CTX_SESSION, DQPEmbeddedPlugin.Util.getString( "SessionServiceImpl.keepaliveFailed", info.getSessionId())); //$NON-NLS-1$
+ LogManager.logInfo(LogConstants.CTX_SESSION, RuntimePlugin.Util.getString( "SessionServiceImpl.keepaliveFailed", info.getSessionId())); //$NON-NLS-1$
closeSession(info.getSessionId());
} else if (sessionExpirationTimeLimit > 0 && currentTime - info.getCreatedTime() > sessionExpirationTimeLimit) {
- LogManager.logInfo(LogConstants.CTX_SESSION, DQPEmbeddedPlugin.Util.getString( "SessionServiceImpl.expireSession", info.getSessionId())); //$NON-NLS-1$
+ LogManager.logInfo(LogConstants.CTX_SESSION, RuntimePlugin.Util.getString( "SessionServiceImpl.expireSession", info.getSessionId())); //$NON-NLS-1$
closeSession(info.getSessionId());
}
} catch (Exception e) {
@@ -114,7 +114,7 @@
LogManager.logDetail(LogConstants.CTX_SESSION, new Object[] {"closeSession", sessionID}); //$NON-NLS-1$
SessionMetadata info = this.sessionCache.remove(sessionID);
if (info == null) {
- throw new InvalidSessionException(DQPEmbeddedPlugin.Util.getString("SessionServiceImpl.invalid_session", sessionID)); //$NON-NLS-1$
+ throw new InvalidSessionException(RuntimePlugin.Util.getString("SessionServiceImpl.invalid_session", sessionID)); //$NON-NLS-1$
}
if (info.getVDBName() != null) {
try {
@@ -178,12 +178,12 @@
productInfo.put(MMURL.JDBC.VDB_NAME, vdb.getName());
productInfo.put(MMURL.JDBC.VDB_VERSION, vdb.getVersion());
} catch (VirtualDatabaseException e) {
- throw new SessionServiceException(DQPEmbeddedPlugin.Util.getString("VDBService.VDB_does_not_exist._2", vdbName, vdbVersion==null?"latest":vdbVersion)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new SessionServiceException(RuntimePlugin.Util.getString("VDBService.VDB_does_not_exist._2", vdbName, vdbVersion==null?"latest":vdbVersion)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
if (sessionMaxLimit > 0 && getActiveSessionsCount() >= sessionMaxLimit) {
- throw new SessionServiceException(DQPEmbeddedPlugin.Util.getString("SessionServiceImpl.reached_max_sessions", new Object[] {new Long(sessionMaxLimit)})); //$NON-NLS-1$
+ throw new SessionServiceException(RuntimePlugin.Util.getString("SessionServiceImpl.reached_max_sessions", new Object[] {new Long(sessionMaxLimit)})); //$NON-NLS-1$
}
long creationTime = System.currentTimeMillis();
@@ -260,12 +260,12 @@
@Override
public boolean terminateSession(long terminatedSessionID, long adminSessionID) {
Object[] params = {adminSessionID, terminatedSessionID};
- LogManager.logInfo(LogConstants.CTX_SESSION, DQPEmbeddedPlugin.Util.getString( "SessionServiceImpl.terminateSession", params)); //$NON-NLS-1$
+ LogManager.logInfo(LogConstants.CTX_SESSION, RuntimePlugin.Util.getString( "SessionServiceImpl.terminateSession", params)); //$NON-NLS-1$
try {
closeSession(terminatedSessionID);
return true;
} catch (InvalidSessionException e) {
- LogManager.logWarning(LogConstants.CTX_SESSION,e,DQPEmbeddedPlugin.Util.getString("SessionServiceImpl.invalid_session", new Object[] {e.getMessage()})); //$NON-NLS-1$
+ LogManager.logWarning(LogConstants.CTX_SESSION,e,RuntimePlugin.Util.getString("SessionServiceImpl.invalid_session", new Object[] {e.getMessage()})); //$NON-NLS-1$
return false;
}
}
@@ -280,7 +280,7 @@
throws InvalidSessionException {
SessionMetadata info = this.sessionCache.get(sessionID);
if (info == null) {
- throw new InvalidSessionException(DQPEmbeddedPlugin.Util.getString("SessionServiceImpl.invalid_session", sessionID)); //$NON-NLS-1$
+ throw new InvalidSessionException(RuntimePlugin.Util.getString("SessionServiceImpl.invalid_session", sessionID)); //$NON-NLS-1$
}
return info;
}
Modified: trunk/runtime/src/main/java/org/teiid/services/TeiidLoginContext.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/TeiidLoginContext.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/runtime/src/main/java/org/teiid/services/TeiidLoginContext.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -38,12 +38,12 @@
import javax.security.auth.login.LoginContext;
import javax.security.auth.login.LoginException;
+import org.teiid.runtime.RuntimePlugin;
import org.teiid.security.Credentials;
import org.teiid.security.SecurityHelper;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.util.LogConstants;
-import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
/**
* This class serves as the primary implementation of the
@@ -98,7 +98,7 @@
LogManager.logDetail(LogConstants.CTX_MEMBERSHIP,e, e.getMessage());
}
}
- throw new LoginException(DQPEmbeddedPlugin.Util.getString("SessionServiceImpl.The_username_0_and/or_password_are_incorrect", username )); //$NON-NLS-1$
+ throw new LoginException(RuntimePlugin.Util.getString("SessionServiceImpl.The_username_0_and/or_password_are_incorrect", username )); //$NON-NLS-1$
}
protected LoginContext createLoginContext(String domain, CallbackHandler handler) throws LoginException {
Modified: trunk/runtime/src/main/java/org/teiid/transport/ClientServiceRegistryImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/ClientServiceRegistryImpl.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/runtime/src/main/java/org/teiid/transport/ClientServiceRegistryImpl.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -24,9 +24,10 @@
import java.util.HashMap;
+import org.teiid.runtime.RuntimePlugin;
+
import com.metamatrix.api.exception.ComponentNotFoundException;
import com.metamatrix.core.util.ReflectionHelper;
-import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
public class ClientServiceRegistryImpl {
@@ -63,7 +64,7 @@
public ClientService getClientService(String iface) throws ComponentNotFoundException {
ClientService cs = clientServices.get(iface);
if (cs == null) {
- throw new ComponentNotFoundException(DQPEmbeddedPlugin.Util.getString("ServerWorkItem.Component_Not_Found", iface)); //$NON-NLS-1$
+ throw new ComponentNotFoundException(RuntimePlugin.Util.getString("ServerWorkItem.Component_Not_Found", iface)); //$NON-NLS-1$
}
return cs;
}
Modified: trunk/runtime/src/main/java/org/teiid/transport/ServerWorkItem.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/ServerWorkItem.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/runtime/src/main/java/org/teiid/transport/ServerWorkItem.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -34,6 +34,7 @@
import org.teiid.adminapi.AdminProcessingException;
import org.teiid.dqp.internal.process.DQPWorkContext;
+import org.teiid.runtime.RuntimePlugin;
import org.teiid.transport.ClientServiceRegistryImpl.ClientService;
import com.metamatrix.api.exception.ExceptionHolder;
@@ -45,7 +46,6 @@
import com.metamatrix.common.util.crypto.CryptoException;
import com.metamatrix.core.MetaMatrixRuntimeException;
import com.metamatrix.dqp.client.ResultsFuture;
-import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
import com.metamatrix.platform.security.api.SessionToken;
public class ServerWorkItem {
@@ -146,7 +146,7 @@
} else if (e instanceof AdminProcessingException) {
logProcessingException(e, context);
} else {
- LogManager.logError(context, e, DQPEmbeddedPlugin.Util.getString("ServerWorkItem.Received_exception_processing_request", this.socketClientInstance.getWorkContext().getConnectionID())); //$NON-NLS-1$
+ LogManager.logError(context, e, RuntimePlugin.Util.getString("ServerWorkItem.Received_exception_processing_request", this.socketClientInstance.getWorkContext().getConnectionID())); //$NON-NLS-1$
}
return new ExceptionHolder(e);
@@ -159,6 +159,6 @@
}
StackTraceElement elem = cause.getStackTrace()[0];
LogManager.logDetail(context, e, "Processing exception for session", this.socketClientInstance.getWorkContext().getConnectionID()); //$NON-NLS-1$
- LogManager.logWarning(context, DQPEmbeddedPlugin.Util.getString("ServerWorkItem.processing_error", e.getMessage(), this.socketClientInstance.getWorkContext().getConnectionID(), e.getClass().getName(), elem)); //$NON-NLS-1$
+ LogManager.logWarning(context, RuntimePlugin.Util.getString("ServerWorkItem.processing_error", e.getMessage(), this.socketClientInstance.getWorkContext().getConnectionID(), e.getClass().getName(), elem)); //$NON-NLS-1$
}
}
\ No newline at end of file
Modified: trunk/runtime/src/main/java/org/teiid/transport/SocketTransport.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/SocketTransport.java 2010-03-09 22:36:00 UTC (rev 1953)
+++ trunk/runtime/src/main/java/org/teiid/transport/SocketTransport.java 2010-03-09 23:29:14 UTC (rev 1954)
@@ -21,9 +21,10 @@
*/
package org.teiid.transport;
+import org.teiid.runtime.RuntimePlugin;
+
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.util.LogConstants;
-import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
/**
* This class starts a Socket for DQP connections and listens on the port and hands out the connections to the
@@ -43,7 +44,7 @@
public void start() {
String bindAddress = this.config.getHostAddress().getHostAddress();
- LogManager.logDetail(LogConstants.CTX_SERVER, DQPEmbeddedPlugin.Util.getString("SocketTransport.1", new Object[] {bindAddress, String.valueOf(this.config.getPortNumber())})); //$NON-NLS-1$
+ LogManager.logDetail(LogConstants.CTX_SERVER, RuntimePlugin.Util.getString("SocketTransport.1", new Object[] {bindAddress, String.valueOf(this.config.getPortNumber())})); //$NON-NLS-1$
this.listener = new SocketListener(this.config.getPortNumber(), bindAddress, this.config.getInputBufferSize(), this.config.getOutputBufferSize(), this.config.getMaxSocketThreads(), this.config.getSSLConfiguration(), csr);
}
Added: trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties
===================================================================
--- trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties (rev 0)
+++ trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties 2010-03-09 23:29:14 UTC (rev 1954)
@@ -0,0 +1,294 @@
+#
+# 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.
+#
+
+EmbeddedConfigSource.No_configuration_file_specified_1=No configuration file specified
+EmbeddedConfigSource.Can_not_load_config_file_2=Can not load config file: \"{0}\"
+EmbeddedConfigSource.Service_class__4=Service class \"{0}\" is not assignable to expected type \"{1}\"
+EmbeddedConfigSource.0=Error trying to initialize IndexMetadataService
+EmbeddedConfigSource.1=Unable to get the url for the system vdb from the current configuration.
+EmbeddedConfigSource.Unable_to_find_service_class_6=Unable to find service class: \"{0}\"
+EmbeddedConfigSource.Unable_to_instantiate_service_class_7=Unable to instantiate service class: \"{0}\"
+EmbeddedConfigSource.Unable_to_instantiate_service_class_due_to_security_error_8=Unable to instantiate service class due to security error: \"{0}\"
+EmbeddedConfigurationService.invalid_vdb=Failed to add/load the VDB \"{0}\", because it is invalid
+
+VDBConfigurationWriter.vdb_delete_failed=Failed to delete VDB \"{0}\" with version \"{1}\" from configuration
+VDBConfigurationWriter.vdb_delete=Successfully deleted VDB \"{0}\" with version \"{1}\" from configuration
+
+LocalBufferService.Error_initializing_buffer_manager__missing_required_property_7=Error initializing buffer manager: missing required property \"{0}\"
+LocalBufferService.Failed_initializing_buffer_manager._8=Failed initializing buffer manager.
+ServerConfiguration.Props_file_null=Properties file name must be non-null
+ServerConfiguration.Err_interpreting_property=Error interpreting property \"{0}\" with value \"{1}\" as a URL.
+ServerConfiguration.Req_prop_not_specified=Required property \"{0}\" not specified
+
+VDBConfigFileReader.Connector_type_names_do_not_match=Connector type names do not match: \"{0}\" and \"{1}\".
+VDBConfigFileReader.No_connector_type_for_connector=Configuration has no connector type definition for type \"{0}\" for connector binding \"{1}\".
+VDBConfigFileReader.Already_contains_connector_type=Configuration has two definitions for connector type \"{0}\".
+VDBConfigFileReader.No_connector_binding_in_config = A model \"{0}\" specifies a connector binding "{1}" for which there is no definition found in the configuration or VDB definition files.
+
+VDBService.VDB_does_not_exist._2=VDB \"{0}\" version \"{1}\" is not active.
+VDBService.VDB_does_not_exist._3=In VDB \"{0}\" version \"{1}\" the Model \"{2}\" does not exist.
+VDBService.Model_does_not_exist._4=Model "{0}" does not exist.
+VDBService.0=Error trying to read visibility information from the vdb \"{0}\".
+LOAD_VDB.FAILED.0=Invalid file location \"{0}\". The VDB file location must be a file or a directory path.
+VDBService.failed_load=Failed to load the VDB
+VDBService.lookup=VDB \"{0}\" with version \"{1}\" being loaded from configuration
+VDBService.vdb_deleted=VDB \"{0}\" with version \"{1}\" deleted from VDB Service and configuration
+VDBService.vdb_change_status=VDB \"{0}\" with version \"{1}\" has changed its status from \"{2}\" to \"{3}\" in VDBService
+VDBService.vdb_change_status_failed=VDB \"{0}\" with version \"{1}\" has failed to change its status from \"{2}\" to \"{3}\" in VDBService
+VDBService.connector_binding_changed=VDB \"{0}\" with version \"{1}\" has changed its connector binding for model name \"{2}\" with \"{3}\"
+VDBService.vdb_already_exists=VDB \"{0}\" with version \"{1}\" already exists in the configuration, saving as a new version of the VDB
+VDBService.vdb_deployed=VDB \"{0}\" with version \"{1}\" has been deployed to the Teiid system.
+VDBService.vdb_loded=VDB \"{0}\" with version \"{1}\" has been loaded from the configuration.
+VDBService.vdb_missing_bindings=VDB \"{0}\" with version \"{1}\" is incomplete, it does not have all the connector bindings mapped to their physical models.
+VDBService.lookup=VDB \"{0}\" with version \"{1}\" being loaded from configuration
+VDBService.vdb_deleted=VDB \"{0}\" with version \"{1}\" deleted from VDB Service and configuration
+VDBService.connector_binding_changed=VDB \"{0}\" with version \"{1}\" has changed its connector binding for model name {2} with {3}
+VDBService.vdb_already_exists=VDB \"{0}\" with version \"{1}\" already exists in the configuration, saving as a new version of the VDB
+VDBService.vdb_deployed=VDB \"{0}\" with version \"{1}\" has been deployed to the Teiid system.
+VDBService.vdb_loded=VDB \"{0}\" with version \"{1}\" has been loaded from the configuration.
+VDBService.vdb_missing_bindings=VDB \"{0}\" with version \"{1}\" is incomplete, it does not have all the connector bindings mapped to their physical models.
+VDBService.vdb_active=VDB \"{0}\" with version \"{1}\" is set to ACTIVE.
+VDBService.validityErrors=Failed to deploy VDB \"{0}\" because it has following validity errors; {1}
+VDBService.vdb_missing_models=VDB \"{0}\" with version \"{1}\" is Invalid; This archive has no models defined.
+
+DataService.Didnt_find_caps=Unable to find capabilities for {0}
+DataService.Unable_to_find_connector_manager_for_{0}_1=Unable to find connector manager for \"{0}\"
+DataService.Unable_to_find_connector=Invalid Connector name supplied or Connector not found: \"{0}\"
+DataService.System_model_initialze_error=Connector Binding for the System Model is not initialized
+DataService.System_model_failed_start=Failed to add the System Model connector to the system
+DataService.failed_to_load_connector=Failed to load the Connector Binding with name \"{0}\" in the configuration
+DataService.Connector_State_invalid=Connector Binding \"{0}\" failed to start, or did not start correctly. Please check the connector binding properties. Check the log file for more information.
+DataService.useClassloader=Connector is using the following Classpth to load a new ClassLoader=\"{0}\"
+DataService.Failed_To_Start=Embedded DataService Failed to start. Check the Connector Binding proeprties.
+DataService.Failed_Initialize_CM=Failed to Properly initialize the Connector manager for Connector Binding \"{0}\"
+DataService.Stopped= Data Service is stopped. All the Connector bindings have been stopped.
+DataService.Started=Data Service initialized and started and running..
+DataService.Connector_Stopped=Connector Service \"{0}\" has been stopped
+DataService.Connector_Started=Connector Service \"{0}\" has been started.
+DataService.Connector_Deleted=Connector Service \"{0}\" has been Deleted from the Data Service and Configuration
+DataService.Connector_Added=Connector Service \"{0}\" has been Added to the Data Service and also Configuration
+DataService.Connector_exists=Connector binding with name \"{0}\" already exists. Connector name must be unique.
+DataService.Connector_does_not_exists=Connector binding with name \"{0}\" does not exist in the configuration.
+DataService.Connector_modified=Connector Binding with name \"{0}\" has been modified.
+DataService.Connector_Stopped=Connector Service {0} has been stopped
+DataService.Connector_Started=Connector Service {0} has been started.
+DataService.Connector_Deleted=Connector Service {0} has been Deleted from the Data Service and Configuration
+DataService.Connector_Added=Connector Service {0} has been Added to the Data Service and also Configuration
+DataService.Connector_exists_replace=Connector binding with name {0} already exists. The old connector will be replaced with the new connector.
+DataService.Connector_exists=Connector binding with name {0} already exists. Connector name must be unique to add, using the old connector as it is.
+DataService.Connector_does_not_exists=Connector binding with name {0} does not exist in the configuration.
+DataService.Connector_modified=Connector Binding with name {0} has been modified.
+DataService.Connector_type_does_not_exists=Connector Binding type specified for Connector Binding \"{0}\" does not exist in the configuration, add Connector type first.
+DataService.ext_module_not_found=Required extension module \"{0}\" not found in the extensions directory. if not using extension modules ignore.
+DataService.Connector_still_used=Connector Binding \"{0}\" can not be deleted because it is still in use by VDBs. Remove the assosiation with VDB before deletion.
+DataService.decryption_failed=initialization of the connector binding \"{0}\" failed because, system failed to decrypt the property \"{1}\"
+DataService.FailedStop=Failed to stop the connector binding "{0}"
+DataService.FailedStart=Failed to start the connector binding "{0}"
+DataService.ext_module_not_found=Required extension module {0} not found in the extensions directory. if not using extension modules ignore.
+DataService.Connector_still_used=Connector Binding {0} can not be deleted because it is still in use by VDBs. Remove the assosiation with VDB before deletion.
+DataService.Connector_failed_start=Connector Binding {0} failed to start, check the properties and start again.
+DataService.no_connectors_defined=No connectors defined for binding
+Failed_To_Service=Failed to get service requested
+
+VDBReader.Invalid_location=Invalid file location \"{0}\". No VDB files (*.DEF) found
+VDBReader.Archive_not_Found=Archive file \"{0}\" not found, failed to load the VDB.
+VDBReader.validityErrors=Failed to load VDB file \"{0}\" because of following validity errors; {1}
+
+EmbeddedConfigurationService.no_system_vdb_path=Failed to load the System.VDB, incorrect path \"{0}\"
+EmbeddedConfigurationService.Server_Config_notfound=ServerConfig.xml file not found the location \"{0}\"
+EmbeddedConfigurationService.Server_Config_failedload=Server Configuration file failed to load \"{0}\"
+EmbeddedConfigurationService.Server_Config_notdefined=Server Configuration file is not defined in the properties file
+EmbeddedConfigurationService.Alternate_binding_inuse=Connector binding \"{0}\" is using alternate properties defined in the system configuration file.
+EmbeddedConfigurationService.ConnectorBinding_in_use_failed_delete=Connector binding with Name \"{0}\" is currenlty in use by VDB \"{1}\" with version \"{2}\"; Can not delete; Remove the assosiation first
+#EmbeddedConfigurationService.Alternate_binding_inuse=Connector binding {0} is using alternate properties defined in the system configuration file.
+EmbeddedConfigurationService.ConnectorBinding_in_use_failed_delete=Connector binding with Name {0} is currenlty in use by VDB {1} with version {2}; Can not delete; Remove the assosiation first
+EmbeddedConfigurationService.savingConfiguration=Teiid Configuration is being saved.
+EmbeddedConfigurationService.vdb_delete=VDB with name \"{0}\" and version \"{1}\" is being deleted from the configuration.
+EmbeddedConfigurationService.vdb_delete_failed=configuration service failed to delte VDB with name \"{0}\" and version \"{1}\".
+EmbeddedConfigurationService.vdb_saved=VDB with name \"{0}\" and version \"{1}\" is being saved by the configuration to \"{2}\" file name.
+EmbeddedConfigurationService.add_system_property=Adding a System property \"{0}\" with value \"{1}\" is being added to the configuration.
+EmbeddedConfigurationService.update_system_properties=Adding System properties to the configuration: {0}.
+EmbeddedConfigurationService.connector_save=Connector Binding with name \"{0}\" is being saved.
+EmbeddedConfigurationService.connector_delete=Connector Binding with name \"{0}\" is being deleted from the configuration.
+EmbeddedConfigurationService.connector_type_save=Connector Type with name \"{0}\" is being saved to configuration.
+EmbeddedConfigurationService.connector_type_save=Connector Type with name \"{0}\" is being deleted from configuration.
+EmbeddedConfigurationService.connector_type_delete_failed=Connector Type with name \"{0}\" failed to delete from configuration as they type is not found in configuration.
+EmbeddedConfigurationService.custom_connectors_restricted=License does not allow adding connector types.
+EmbeddedConfigurationService.Failed_to_load_vdb=Failed to load the VDB \"{0}\" during the initialization of Teiid
+EmbeddedConfigurationService.loaded_vdb=Loaded the VDB \"{0}\" sucessfully into Teiid.
+EmbeddedConfigurationService.not_loaded_vdb=VDB \"{0}\" is not loaded into Teiid due to licensing issues.
+EmbeddedConfigurationService.connector_binding_delete_failed=Delete of Connector Binding \"{0}\" failed. Binding not found in the configuration.
+EmbeddedConfigurationService.connector_type_in_use=Delete of Connector type \"{0}\" failed. Currently in use by a Connector Binding.
+EmbeddedConfigurationService.duplicate_vdb_found=Duplicate VDB \"{0}\" is being loaded. Can not load have multiple VDBs with same name and version.
+EmbeddedConfigurationService.connector_type_delete=Connector type \"{0}\" is deleted from the configuration.
+EmbeddedConfigurationService.connectionAdded=Connection added to VDB \"{0}\" with version \"{1}\" with connection id \"{2}\"
+EmbeddedConfigurationService.connectionRemoved=Connection removed from VDB \"{0}\" with version \"{1}\" with connection id \"{2}\"
+EmbeddedConfigurationService.dqp_loading=Teiid instance with instance id \"{0}\" is being loaded.
+EmbeddedConfigurationService.init_encryption=Cryptography libraries are in use and are initialized
+EmbeddedConfigurationService.udf_classspath_failure=Failed to resolve the user defined function''s classpath
+EmbeddedConfigurationService.udf_load=User Defined Functions file \"{0}\" is loaded, using classloader \"{1}\"
+EmbeddedConfigurationService.udf_unload=User Defined Functions file unloaded
+EmbeddedConfigurationService.bindings_exceeded_limit=VDB {1} has {0} connector bindings, that exceeds MetaMatrix license allowed number of connector bindings.
+EmbeddedConfigurationService.Invalid_connector_binding=Can not assign binding "{2}" to VDB "{0}" with "{1}", because it is a private binding from another vdb.
+EmbeddedConfigurationService.connector_binding_deployed=Connector binding {0} deployed
+
+ExtensionModuleReader.ext_module_failed_to_read=failed to read the extension module \"{0}\" from file system.
+ExtensionModuleReader.ext_module_does_not_exist=Extension module \"{0}\" does not exist in the configuration
+ExtensionModuleWriter.ext_module_save=Extension module with name \"{0}\" is saved to \"{1}\".
+ExtensionModuleWriter.ext_module_already_exists=Extension module \"{0}\" already exists in the configuration failed to delete.
+ExtensionModuleWriter.ext_module_delete_failed=Failed to delete Extension Module \"{0}\"; It may be currently in use by the Teiid, check if is it been un-assigned from all models.
+ExtensionModuleWriter.ext_module_delete=Extension module with name \"{0}\" is being deleted with file \"{1}\".
+
+UnSupported_object_conversion=This object conversion not supported..
+Admin.Vdb_or_Model_notfound=Requested Vdb or model Name not Found..
+Admin.timeout=Admin request timedout after \"{0}\" minutes
+Admin.invalid_request=Invalid request \"{0}\" is submitted to the Admin API. Please check the API documentation on usage.
+Admin.ext_path_invalid=Extension directory path is wrong or does not exists
+Admin.admin_isnull=Admin Object supplied is null
+Admin.can_not_set_property=Currently setting property on this type of Admin object is not supported.
+Admin.connector_load_failed_wrong_contents=Failed to load the Connector binding with name \"{0}\". Contents supplied are incorrect, check the contents again.
+Admin.connector_load_failed_wrong_type=Failed to load the Connector binding with name \"{0}\". Conntextor Type supplied and Connector Type used in binding are different.
+Admin.Connector_binding_does_not_exists=Connector Binding with name \"{0}\" does not exist in the configuration
+Admin.Connector_type_does_not_exists=Connector Type with name \"{0}\" does not exist in the configuration
+Admin.ext_module_does_not_exists=Extension Module with name \"{0}\" does not exist in the configuration
+Admin.vdb_does_not_exists=VDB with name \"{0}\" and version \"{1}\" does not exist in the configuration
+Admin.Invalid_ext_source=Source contents supplied for Extension module can not be null.
+Admin.Invalid_ext_source_name=Source name can not be null, use a proper file name with extension as name for the Extension Module.
+Admin.Invalid_cb_name=Connector Binding name can not be null, a valid name must be supplied
+Admin.Invalid_cb_source=Connector Binding''s source contents can not be null
+Admin.Invalid_ct_name=Connector Type name can not be null or use of special characters is not allowed, a valid name must be supplied
+Admin.Invalid_ct_source=Connector type''s source contents can not be null
+Admin.Invalid_vdb_name=VDB name can not be null or use of special characters is allowed, a valid name must be supplied
+Admin.Invalid_vdb_source=VDB source contents can not be null
+Admin.load_combined_vdb=Loading the VDB file \"{0}\", where DEF/VDB are combined in single source
+Admin.Invalid_model_name=Model name can not be null or use of special characters is not alloed, a valid name must be supplied to identify the model inside the VDB
+Admin.Invalid_identifier=Identifier supplied can not be null and must adhere to the naming patterns; Please check the java docs for the proper naming patterns.
+Admin_invalid_log_listener=Supplied log listener can not be null
+Admin.Invalid_ext_module=Extension module specified is not the JAR type, currently only ".jar" extension modules supported.
+Admin.Connector_type_exists=Connector Type \"{0}\" already exists; Can not add a duplicate, try delete and add again.
+Admin.extension_module_exists=Extension Module \"{0}\" already exists; Can not add a duplicate, delete first and add again.
+Admin.addBindingEixists=Connector Binding \"{0}\" already exists in exists in the configuration, use a unique name for the connector binding in the given Teiid instance.
+Admin.addBinding_type_exists=Adding Connector Binding \"{0}\" failed, because the Connector Type \"{1}\" already exists, and admin option set to fail on conflict
+Admin.connector_type_not_exists=Connector Type \"{0}\" does not exists in the configuration, please add Connector Type.
+Admin.Invalid Request=Request submitted does not match the requirement \"{0}\"
+Admin.No_Objects_Found=No AdminObjects found for identifier {0} and class {1}.
+Admin.Multiple_Objects_Found=Multiple AdminObjects found for identifier {0} and class {1}.
+Admin.Unsupported_Object_Class=AdminObjects class {0} not supported for this operation.
+Admin.bindings_exceeded_limit=You have reached the MetaMatrix license limit of connector bindings, Failed to add connector bindings.
+Admin.cb_doesnot_exist=The connector binding does not exist:{0}
+Admin.ct_doesnot_exist=The connector type does not exist:{0}
+Admin.CODE_DECRYPTION_FAILED=Decryption of the password property failed; Check to make sure encryption libraries are correctly installed or provide a plain text password.
+
+DQPEmbeddedManager.start_dqp=Teiid is started at time = {0}
+DQPEmbeddedManager.shutdown_dqp=Teiid is shutdown at time = {0}
+DQPEmbeddedManager.duplicate_process= There is another process running with same name {0}; Failed to start.
+
+ServerSecurityAdminImpl.User_name_too_long=The user name may not be null and cannot be longer than {0} charachters
+ServerSecurityAdminImpl.neither_User_nor_Group=Parameter memberType is neither a User nor a Group.
+ServerSecurityAdminImpl.Unable_to_aquire_MembershipObjectEditor=Unable to aquire MembershipObjectEditor.
+ServerSecurityAdminImpl.Cant_use_wildcard=The wildcard cannot be used here.
+ServerSecurityAdminImpl.Non_existant_role=No administrative role exists with the identifier [{0}].
+ServerSecurityAdminImpl.Unknown_principal=Unknown principal: {0}
+ServerSecurityAdminImpl.Empty_props=No properties to set.
+ServerSecurityAdminImpl.Invalid_prop=Property [{0}] is not a valid User property and will not be set.
+ServerSecurityAdminImpl.Invalid_props=One or more properties were not set because they are no valid for a User:
+ServerSecurityAdminImpl.vdbName_can_not_be_null=Supplied VDB name is null
+ServerSecurityAdminImpl.vdbVersion_can_not_be_null=Supplied VDB version is null
+ServerSecurityAdminImpl.no_vdb_exists=No VDB with name {0}.{1} deployed in the system.
+ServerSecurityAdminImpl.not_implemented=This feature not available.
+
+failed_to_load_admin_roles=Failed to load Admin role permissions
+admin_roles_not_defined=Admin Role permissions are not defined. Refer to admin-roles.properties file
+
+# authorization service
+AuthorizationServiceImpl.invalid_session=The principal with SessionToken <{0}> is invalid.
+AuthorizationServiceImpl.wrong_realms = Permission collection contains requests from different realms.
+AuthorizationServiceImpl.error_seraching_policies=An exception occurred while searching for all policy IDs.
+AuthorizationServiceImpl.failed_to_get_groups=Can''t get principal''s groups from Membership service.
+AuthorizationServiceImpl.Authorization_Realm_is_null=The requested Authorization Realm is null
+
+# membership service
+MembershipServiceImpl.loaded = Loaded membership domain: "{0}".
+MembershipServiceImpl.failed_to_create = Unable to create membership domain {0}
+MembershipServiceImpl.unable_to_create = Unable to create membership domain "{0}". Factory class not found in environment properties.
+MembershipServiceImpl.invalid_principal = The principal "{0}" is invalid.
+MembershipServiceImpl.Null_authentication=Domain {0} returned a null authentication result for user {1}
+MembershipServiceImpl.Invalid_user=Domain {0} indicated that user {1} was not valid
+MembershipServiceImpl.Unsupported_credentials=Domain {0} indicated that the credentials were not supported
+MembershipServiceImpl.Failed_authentication={0} could not be authenticated in any domain
+MembershipServiceImpl.Root_password_required=password is required for super user
+MembershipServiceImpl.Root_password_decryption_failed=super password could not be decrypted
+MembershipServiceImpl.principal_does_not_exist=The principal ''{0}'' does not exist in domain ''{1}''
+MembershipServiceImpl.Decrypt_failed=Could not decrypt the encrypted password for user ''{0}''
+MembershipServiceImpl.source_exception=Membership Domain ''{0}'' failed to perform the desired operation, please check the settings for this domain
+MembershipServiceImpl.load_error=Could not load file ''{0}'' from the classpath, the file system, or as a URL.
+MembershipServiceImpl.unknown_host=Did not allow root user authentication attempt, since root logons are restricted and could not determine the remote host.
+MembershipServiceImpl.invalid_host=Could not authenticate root user, since the client address {0} is not in the allowed values {1}
+MembershipServiceImpl.error_shuting_down = Error shutting down domain after ''killService'' method received.
+MembershipServiceImpl.Logon_failed=log on failed for user {1} on the domain {0}
+
+LDAPMembershipDomain.No_annonymous=Annonymous user authentications are not allowed in domain {0}
+LDAPMembershipDomain.Required_property=Required property {0} was missing.
+LDAPMembershipDomain.Admin_credentials=Admin DN and/or password supplied for LDAP Membership Domain {0} are invalid.
+LDAPMembershipDomain.Require_memberof_property=Users in LDAP Membership Domain {0} will not appear as members of any group since user's memberOf and group's memberOf attributes are both unspecified.
+
+
+# session service
+SessionServiceImpl.invalid_session=The specified session ID "{0}" is invalid. It cannot be found in the userbase.
+SessionServiceImpl.reached_max_sessions = The server has reached the maximum number of sessions of {0} as defined by the property metamatrix.session.max.connections. If more sessions are required, modify this property value in the MetaMatrix Console.
+SessionServiceImpl.failed_to_getprincipal = Membership service encountered an error getting the principal for user "{0}".
+SessionServiceImpl.expireSession = Expiring session {0}
+SessionServiceImpl.keepaliveFailed = Keepalive failed for session {0}
+SessionServiceImpl.Unexpected_error_finding_latest_version_of_Virtual_Database=Unexpected error finding latest version of Virtual Database {0}
+SessionServiceImpl.Unexpected_error_finding_latest_version_of_Virtual_Database_{0}_of_version_{1}=Unexpected error finding latest version of Virtual Database {0} of version {1}
+SessionServiceImpl.Membership_service_could_not_authenticate_user=Membership service could not authenticate user "{0}"
+SessionServiceImpl.The_username_0_and/or_password_are_incorrect=The username "{0}" and/or password and/or payload token could not be authenticated by any membership domain.
+SessionServiceImpl.terminateSession = Admin [{0}] is terminating this session: {1}.
+
+
+LogonImpl.Invalid_use_of_credentials_and_token=Conflicting use of both client session token and credentials.
+
+ServerWorkItem.Received_exception_processing_request=Unexpected exception for session {0}
+ServerWorkItem.processing_error=Processing exception ''{0}'' for session {1}. Exception type {2} thrown from {3}. Enable more detailed logging to see the entire stacktrace.
+ServerWorkItem.Component_Not_Found=Component not found: {0}
+
+SocketTransport.1=Bound to address {0} listening on port {1}
+SocketTransport.2=Problem starting server binding to address {0} and listening on port {1}
+SocketTransport.3=Socket transport is not enabled for Teiid.
+
+Illegal_access_on_admin=Illegal use of admin based connection by : {0}, {1}
+invlaid_vdb_file=Invalid VDB file deployment failed {0}
+redeploying_vdb=Re-deploying VDB {0}
+validity_errors_in_vdb=VDB has validaity errors; failed to deploy - {0}
+vdb_save_failed=Failed to save metadata for VDB {0}
+vdb_delete_failed=Failed to delete the cached metadata files due to:
+vdb_deployed=VDB "{0}" deployed.
+vdb_undeployed=VDB "{0}" undeployed.
+jndi_not_found=Jndi resource = "{0}" not found for Source Name = "{1}"
+system_vdb_load_error=System.vdb needs to be loaded before any other VDBs.
+fail_to_deploy="{0}" Can not be deployed because model "{1}" is not fully configured.
+failed_to_retrive_metadata="{0}" Can not be deployed because model "{1}" can not retrieve metadata.
+invalid_metadata_file=Invalid metadata file found at {0}; delete this file and restart server.
+udf_model_not_found=User Defined Function (UDF) model "{0}" not found in the VDB
+duplicate_vdb=VDB with given name and version already exists! {0}.{1}
+system_vdb_not_found=System.vdb not found in classpath
+failed_to_deployed=Failed to deploy {0}
\ No newline at end of file
Property changes on: trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 10 months
teiid SVN: r1953 - trunk/build/kit-jboss-container/deploy/teiid and 34 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-03-09 17:36:00 -0500 (Tue, 09 Mar 2010)
New Revision: 1953
Removed:
trunk/client/src/main/java/com/metamatrix/admin/objects/
trunk/client/src/main/java/com/metamatrix/dqp/embedded/
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/
trunk/engine/src/main/java/com/metamatrix/dqp/util/
trunk/engine/src/main/java/com/metamatrix/platform/security/
trunk/engine/src/main/java/com/metamatrix/query/util/LogConstants.java
trunk/engine/src/main/java/com/metamatrix/server/
trunk/runtime/src/main/java/com/metamatrix/platform/
trunk/runtime/src/test/java/com/metamatrix/dqp/embedded/
Modified:
branches/JCA/engine/src/main/java/com/metamatrix/common/buffer/TupleBuffer.java
trunk/build/kit-jboss-container/deploy/teiid/teiid-jboss-beans.xml
trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestEmbeddedProfile.java
trunk/documentation/server-extensions-guide/src/main/docbook/en-US/content/logging.xml
trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/BufferManagerImpl.java
trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/FileStorageManager.java
trunk/engine/src/main/java/com/metamatrix/common/queue/StatsCapturingWorkManager.java
trunk/engine/src/main/java/com/metamatrix/common/util/LogConstants.java
trunk/engine/src/main/java/com/metamatrix/query/function/FunctionTree.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/RelationalPlanner.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/NewCalculateCostUtil.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleChooseDependent.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleCopyCriteria.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/xml/XMLPlanner.java
trunk/engine/src/main/java/com/metamatrix/query/processor/QueryProcessor.java
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/AssignmentInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ErrorInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ExecDynamicSqlInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/IfInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ProcedurePlan.java
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/PlanExecutionNode.java
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalNode.java
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalPlan.java
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SortUtility.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AbortProcessingInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AddCommentInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AddNodeInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/EndBlockInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/EndDocumentInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/ExecSqlInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/ExecStagingTableInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/IfInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/InitializeDocumentInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/MoveCursorInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/MoveDocInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/RelationalPlanExecutor.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/SAXDocumentInProgress.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/WhileInstruction.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLPlan.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLProcessorEnvironment.java
trunk/engine/src/main/java/com/metamatrix/query/resolver/QueryResolver.java
trunk/engine/src/main/java/com/metamatrix/query/resolver/command/UpdateProcedureResolver.java
trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/SynchConnectorWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/language/LanguageBridgeFactory.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/AbstractWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/CodeTableCache.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/LobWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/TestConnectorWorkItem.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedPlugin.java
trunk/runtime/src/main/java/org/teiid/logging/Log4JUtil.java
trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java
trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java
trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
trunk/runtime/src/main/java/org/teiid/services/TeiidLoginContext.java
trunk/runtime/src/main/java/org/teiid/transport/LogonImpl.java
Log:
TEIID-1012 consolidating logging contexts and constants classes and updating the documentation to include information from the wiki.
Modified: branches/JCA/engine/src/main/java/com/metamatrix/common/buffer/TupleBuffer.java
===================================================================
--- branches/JCA/engine/src/main/java/com/metamatrix/common/buffer/TupleBuffer.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ branches/JCA/engine/src/main/java/com/metamatrix/common/buffer/TupleBuffer.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -22,7 +22,6 @@
package com.metamatrix.common.buffer;
-import java.lang.ref.SoftReference;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -39,7 +38,6 @@
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.Assertion;
import com.metamatrix.dqp.DQPPlugin;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.sql.symbol.Expression;
public class TupleBuffer {
@@ -312,8 +310,8 @@
public void remove() {
if (!removed) {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Removing TupleBuffer:", this.tupleSourceID); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR, "Removing TupleBuffer:", this.tupleSourceID); //$NON-NLS-1$
}
this.batchBuffer = null;
purge();
Modified: trunk/build/kit-jboss-container/deploy/teiid/teiid-jboss-beans.xml
===================================================================
--- trunk/build/kit-jboss-container/deploy/teiid/teiid-jboss-beans.xml 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/build/kit-jboss-container/deploy/teiid/teiid-jboss-beans.xml 2010-03-09 22:36:00 UTC (rev 1953)
@@ -61,7 +61,9 @@
-->
<property name="maxProcessingBatchesColumns">128</property>
<!-- Max File size in MB (default 2GB)-->
- <property name="maxFileSize">2048</property>
+ <property name="maxFileSize">2048</property>
+ <!-- Max open buffer files (default 64) -->
+ <property name="maxOpenFiles">64</property>
</bean>
<bean name="RuntimeEngineDeployer" class="org.teiid.jboss.deployers.RuntimeEngineDeployer">
Modified: trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestEmbeddedProfile.java
===================================================================
--- trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestEmbeddedProfile.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/client-jdbc/src/test/java/org/teiid/jdbc/TestEmbeddedProfile.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -21,10 +21,7 @@
*/
package org.teiid.jdbc;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
import java.sql.DriverManager;
import java.sql.SQLException;
@@ -32,7 +29,6 @@
import org.junit.Test;
-import com.metamatrix.dqp.embedded.DQPEmbeddedProperties;
import com.metamatrix.jdbc.BaseDataSource;
import com.metamatrix.jdbc.api.ExecutionProperties;
Modified: trunk/documentation/server-extensions-guide/src/main/docbook/en-US/content/logging.xml
===================================================================
--- trunk/documentation/server-extensions-guide/src/main/docbook/en-US/content/logging.xml 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/documentation/server-extensions-guide/src/main/docbook/en-US/content/logging.xml 2010-03-09 22:36:00 UTC (rev 1953)
@@ -12,11 +12,159 @@
control logging level, contexts, and log locations, you should be
familiar with
<ulink url="http://logging.apache.org/log4j/">log4j</ulink>
- and the container's jboss-log4j.xml configuration file. All the logs
- produced by Teiid are prefixed by org.teiid. This makes it extremely
- easy to control of of Teiid logging from a single context.
+ and the container's jboss-log4j.xml configuration file.
</para>
+ <para>
+ All the logs
+ produced by Teiid are prefixed by org.teiid. This
+ makes it extremely
+ easy to control of of Teiid logging from a single
+ context. Note however that changes to the log configuration file
+ require a restart to take affect.
+ </para>
<sect2>
+ <title>Logging Contexts</title>
+ <para>While all of Teiid's logs are prefixed with org.teiid, there
+ are more specific contexts depending on the functional area of the
+ system. Note that logs originating from third-party code, including
+ integrated org.jboss components, will be logged through their
+ respective contexts. See the table below for information on contexts
+ relevant to Teiid. See the container's jboss-log4j.xml for a more
+ complete listing of logging contexts used in the container.</para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>Context</para>
+ </entry>
+ <entry>
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>com.arjuna</para>
+ </entry>
+ <entry>
+ <para>Third-party transaction manager. This will include
+ information about all transactions, not just those for Teiid.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid</para>
+ </entry>
+ <entry>
+ <para>Root context for all Teiid logs. Note: there are
+ potentially other contexts used under org.teiid than are shown
+ in this table.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.PROCESSOR</para>
+ </entry>
+ <entry>
+ <para>Query processing logs. See also org.teiid.PLANNER for
+ query planning logs.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.PLANNER</para>
+ </entry>
+ <entry>
+ <para>Query planning logs.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.SESSION</para>
+ </entry>
+ <entry>
+ <para>Session events logs.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.MEMBERSHIP</para>
+ </entry>
+ <entry>
+ <para>Authentication and group event logs.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.SERVER</para>
+ </entry>
+ <entry>
+ <para>Events related to socket transports, pooling, threading,
+ etc.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.CONNECTOR</para>
+ </entry>
+ <entry>
+ <para>Connector logs.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.BUFFER_MGR</para>
+ </entry>
+ <entry>
+ <para>Buffer and storage management logs.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.TXN_LOG</para>
+ </entry>
+ <entry>
+ <para>Detail log of all transaction operations.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.COMMAND_LOG</para>
+ </entry>
+ <entry>
+ <para>
+ See
+ <link linkend="command_logigng">command logging</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.AUDIT_LOG</para>
+ </entry>
+ <entry>
+ <para>
+ See
+ <link linkend="audit_logigng">audit logging</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>org.teiid.ADMIN_API</para>
+ </entry>
+ <entry>
+ <para>Admin API logs.</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </sect2>
+ <sect2>
<title>Command Logging API</title>
<para>
If the default log4j logging mechanisms are not sufficient for your
@@ -31,7 +179,7 @@
</para>
</sect2>
</sect1>
- <sect1>
+ <sect1 id="command_logging">
<title>Command Logging</title>
<para>Command logging captures executing commands in the
Teiid System.
@@ -45,10 +193,29 @@
<para>To enable command logging to the default log location, simply
enable the DETAIL level of logging for the org.teiid.COMMAND_LOG
context.</para>
- <para>To enable command logging to an alternative file location,
- configure a separate file appender for the DETAIL logging of the
- org.teiid.COMMAND_LOG context. An example of this is already in
- the log4j.xml distributed with Teiid.</para>
+ <para>
+ To enable command logging to an alternative file location,
+ configure a
+ separate file appender for the DETAIL logging of the
+ org.teiid.COMMAND_LOG context. An example of this is shown below and
+ can also be found in the jboss-log4j.xml distributed with Teiid.
+ <programlisting><![CDATA[
+ <appender name="COMMAND" class="org.apache.log4j.RollingFileAppender">
+ <param name="File" value="log/command.log"/>
+ <param name="MaxFileSize" value="1000KB"/>
+ <param name="MaxBackupIndex" value="25"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %p [%t] %c - %m%n"/>
+ </layout>
+ </appender>
+
+ <category name="org.teiid.COMMAND_LOG">
+ <priority value="INFO"/>
+ <appender-ref ref="COMMAND"/>
+ </category>
+ ]]>
+ </programlisting>
+ </para>
<sect2>
<title>Command Logging API</title>
<para>
@@ -59,7 +226,8 @@
custom appender will have access to log4j LoggingEvents to the
COMMAND_LOG context, which have a
message that is an instance of
- org.teiid.logging.api.CommandLogMessage (defined in the teiid-connector-api-&versionNumber;.jar).
+ org.teiid.logging.api.CommandLogMessage defined in the
+ teiid-connector-api-&versionNumber;.jar.
</para>
<para>
See
@@ -68,7 +236,7 @@
</para>
</sect2>
</sect1>
- <sect1>
+ <sect1 id="audit_logging">
<title>Audit Logging</title>
<para>Audit logging captures important security events. This includes
the enforcement of permissions, authentication success/failures, etc.
@@ -88,11 +256,16 @@
your
audit logging needs, you may need a custom log4j appender.
The
- custom appender will have access to log4j LoggingEvents to the
- AUDIT_LOG context, which have a
+ custom
+ appender will have access to log4j LoggingEvents to the
+ AUDIT_LOG
+ context, which have a
message that is an instance of
- org.teiid.logging.api.AuditMessage (defined in the teiid-connector-api-&versionNumber;.jar). AuditMessages include
- information about user, the action, and the target(s) of the action.
+ org.teiid.logging.api.AuditMessage defined in the
+ teiid-connector-api-&versionNumber;.jar.
+ AuditMessages include
+ information about user, the action, and the
+ target(s) of the action.
</para>
<para>
See
Modified: trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/BufferManagerImpl.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/BufferManagerImpl.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/BufferManagerImpl.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -61,7 +61,6 @@
import com.metamatrix.core.MetaMatrixRuntimeException;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.Assertion;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.execution.QueryExecPlugin;
import com.metamatrix.query.processor.xml.XMLUtil;
@@ -113,7 +112,7 @@
private int columnCount;
public ManagedBatchImpl(String id, FileStore store, TupleBatch batch) {
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Add batch to BufferManager", batchAdded.incrementAndGet()); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR, "Add batch to BufferManager", batchAdded.incrementAndGet()); //$NON-NLS-1$
this.id = id;
this.store = store;
this.activeBatch = batch;
@@ -150,7 +149,7 @@
@Override
public TupleBatch getBatch(boolean cache, String[] types) throws MetaMatrixComponentException {
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Reading batch from disk", readAttempts.incrementAndGet(), "reference hits", referenceHit.get()); //$NON-NLS-1$ //$NON-NLS-2$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR, "Reading batch from disk", readAttempts.incrementAndGet(), "reference hits", referenceHit.get()); //$NON-NLS-1$ //$NON-NLS-2$
synchronized (activeBatches) {
TupleBufferInfo tbi = activeBatches.remove(this.id);
if (tbi != null) {
@@ -186,7 +185,7 @@
return batch;
}
}
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Reading batch from disk", readCount.incrementAndGet()); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR, "Reading batch from disk", readCount.incrementAndGet()); //$NON-NLS-1$
try {
ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(store.createInputStream(this.offset), IO_BUFFER_SIZE));
batch = new TupleBatch();
@@ -211,7 +210,7 @@
TupleBatch batch = activeBatch;
if (batch != null) {
if (!persistent) {
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Writing batch to disk", writeCount.incrementAndGet()); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR, "Writing batch to disk", writeCount.incrementAndGet()); //$NON-NLS-1$
synchronized (store) {
offset = store.getLength();
FileStoreOutputStream fsos = store.createOutputStream(IO_BUFFER_SIZE);
@@ -350,16 +349,16 @@
}
};
TupleBuffer tupleBuffer = new TupleBuffer(batchManager, newID, elements, getProcessorBatchSize());
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, new Object[]{"Creating TupleBuffer:", newID, "of type "+tupleSourceType}); //$NON-NLS-1$ //$NON-NLS-2$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR, new Object[]{"Creating TupleBuffer:", newID, "of type "+tupleSourceType}); //$NON-NLS-1$ //$NON-NLS-2$
}
return tupleBuffer;
}
@Override
public FileStore createFileStore(String name) {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Creating FileStore:", name); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR, "Creating FileStore:", name); //$NON-NLS-1$
}
return this.diskMgr.createFileStore(name);
}
@@ -462,7 +461,7 @@
try {
mb.persist();
} catch (MetaMatrixComponentException e) {
- LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, e, "Error persisting batch, attempts to read that batch later will result in an exception"); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR, e, "Error persisting batch, attempts to read that batch later will result in an exception"); //$NON-NLS-1$
}
}
}
Modified: trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/FileStorageManager.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/FileStorageManager.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/FileStorageManager.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -37,7 +37,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.Assertion;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.execution.QueryExecPlugin;
/**
@@ -222,8 +221,8 @@
File createFile(String name, int fileNumber) throws MetaMatrixComponentException {
try {
File storageFile = File.createTempFile(FILE_PREFIX + name + "_" + String.valueOf(fileNumber) + "_", null, this.dirFile); //$NON-NLS-1$ //$NON-NLS-2$
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_STORAGE_MGR, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_STORAGE_MGR, "Created temporary storage area file " + storageFile.getAbsoluteFile()); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR, "Created temporary storage area file " + storageFile.getAbsoluteFile()); //$NON-NLS-1$
}
return storageFile;
} catch(IOException e) {
Modified: trunk/engine/src/main/java/com/metamatrix/common/queue/StatsCapturingWorkManager.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/common/queue/StatsCapturingWorkManager.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/common/queue/StatsCapturingWorkManager.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -94,8 +94,8 @@
}
String name = t.getName();
t.setName(name + "_" + poolName + threadCounter.getAndIncrement()); //$NON-NLS-1$
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_POOLING, MessageLevel.TRACE)) {
- LogManager.logTrace(LogConstants.CTX_POOLING, "Beginning work with virtual worker", t.getName()); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_SERVER, MessageLevel.TRACE)) {
+ LogManager.logTrace(LogConstants.CTX_SERVER, "Beginning work with virtual worker", t.getName()); //$NON-NLS-1$
}
boolean success = false;
try {
@@ -139,8 +139,8 @@
private static void handleException(Work work, WorkException e) {
if (work instanceof WorkListener) {
((WorkListener)work).workRejected(new WorkEvent(work, WorkEvent.WORK_REJECTED, work, new WorkRejectedException(e)));
- } else if (LogManager.isMessageToBeRecorded(LogConstants.CTX_POOLING, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_POOLING, e, "Exception adding work to the WorkManager"); //$NON-NLS-1$
+ } else if (LogManager.isMessageToBeRecorded(LogConstants.CTX_SERVER, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_SERVER, e, "Exception adding work to the WorkManager"); //$NON-NLS-1$
}
}
@@ -192,7 +192,7 @@
}
if (atMaxThreads) {
if (newMaxQueueSize && maximumPoolSize > 1) {
- LogManager.logWarning(LogConstants.CTX_POOLING, QueryPlugin.Util.getString("WorkerPool.Max_thread", maximumPoolSize, poolName, highestQueueSize)); //$NON-NLS-1$
+ LogManager.logWarning(LogConstants.CTX_SERVER, QueryPlugin.Util.getString("WorkerPool.Max_thread", maximumPoolSize, poolName, highestQueueSize)); //$NON-NLS-1$
}
return;
}
Modified: trunk/engine/src/main/java/com/metamatrix/common/util/LogConstants.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/common/util/LogConstants.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/common/util/LogConstants.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -22,15 +22,25 @@
package com.metamatrix.common.util;
+import org.teiid.connector.basic.DefaultConnectorLogger;
+
public interface LogConstants {
// add the new contexts to the Log4JUtil.java class, for configuration purpose
- public static final String CTX_CONFIG = "CONFIG"; //$NON-NLS-1$
- public static final String CTX_COMMUNICATION = "COMMUNICATION"; //$NON-NLS-1$
- public static final String CTX_POOLING = "RESOURCE_POOLING"; //$NON-NLS-1$
public static final String CTX_SESSION = "SESSION"; //$NON-NLS-1$
public static final String CTX_MEMBERSHIP = "MEMBERSHIP"; //$NON-NLS-1$
public static final String CTX_AUTHORIZATION = "AUTHORIZATION"; //$NON-NLS-1$
- public static final String CTX_AUTHORIZATION_ADMIN_API = "AUTHORIZATION_ADMIN_API"; //$NON-NLS-1$
- public static final String CTX_SERVER= "Server"; //$NON-NLS-1$
- public static final String CTX_ADMIN = "ADMIN"; //$NON-NLS-1$
+ public static final String CTX_SERVER= "SERVER"; //$NON-NLS-1$
+ public static final String CTX_QUERY_PLANNER = "PLANNER"; //$NON-NLS-1$
+ public static final String CTX_DQP = "PROCESSOR"; //$NON-NLS-1$
+ public static final String CTX_CONNECTOR = DefaultConnectorLogger.CTX_CONNECTOR;
+ public static final String CTX_BUFFER_MGR = "BUFFER_MGR"; //$NON-NLS-1$
+ public static final String CTX_TXN_LOG = "TXN_LOG"; //$NON-NLS-1$
+ public static final String CTX_COMMANDLOGGING = "COMMAND_LOG"; //$NON-NLS-1$
+ public static final String CTX_AUDITLOGGING = "AUDIT_LOG"; //$NON-NLS-1$
+ public static final String CTX_ADMIN_API = "ADMIN_API"; //$NON-NLS-1$
+ // Query contexts
+ public static final String CTX_FUNCTION_TREE = CTX_QUERY_PLANNER + ".FUNCTION_TREE"; //$NON-NLS-1$
+ public static final String CTX_QUERY_RESOLVER = CTX_QUERY_PLANNER + ".RESOLVER"; //$NON-NLS-1$
+ public static final String CTX_XML_PLANNER = CTX_QUERY_PLANNER + ".XML_PLANNER"; //$NON-NLS-1$
+ public static final String CTX_XML_PLAN = CTX_DQP + ".XML_PLAN"; //$NON-NLS-1$
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/function/FunctionTree.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/function/FunctionTree.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/function/FunctionTree.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -37,6 +37,7 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.types.DataTypeManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.MetaMatrixRuntimeException;
import com.metamatrix.core.util.Assertion;
import com.metamatrix.core.util.ReflectionHelper;
@@ -46,7 +47,6 @@
import com.metamatrix.query.function.metadata.FunctionParameter;
import com.metamatrix.query.util.CommandContext;
import com.metamatrix.query.util.ErrorMessageKeys;
-import com.metamatrix.query.util.LogConstants;
/**
* Data structure used to store function signature information. There are multiple uses
Modified: trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/RelationalPlanner.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/RelationalPlanner.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/RelationalPlanner.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -40,6 +40,7 @@
import com.metamatrix.api.exception.query.QueryResolverException;
import com.metamatrix.api.exception.query.QueryValidatorException;
import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.id.IDGenerator;
import com.metamatrix.query.QueryPlugin;
import com.metamatrix.query.analysis.AnalysisRecord;
@@ -98,7 +99,6 @@
import com.metamatrix.query.sql.visitor.ValueIteratorProviderCollectorVisitor;
import com.metamatrix.query.util.CommandContext;
import com.metamatrix.query.util.ErrorMessageKeys;
-import com.metamatrix.query.util.LogConstants;
import com.metamatrix.query.validator.ValidationVisitor;
/**
Modified: trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/NewCalculateCostUtil.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/NewCalculateCostUtil.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/NewCalculateCostUtil.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -39,6 +39,7 @@
import com.metamatrix.common.buffer.BufferManager;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.types.DataTypeManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.query.QueryPlugin;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.metadata.SupportConstants;
@@ -69,7 +70,6 @@
import com.metamatrix.query.sql.visitor.EvaluatableVisitor;
import com.metamatrix.query.sql.visitor.GroupsUsedByElementsVisitor;
import com.metamatrix.query.util.CommandContext;
-import com.metamatrix.query.util.LogConstants;
/**
Modified: trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleChooseDependent.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleChooseDependent.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleChooseDependent.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -32,6 +32,7 @@
import com.metamatrix.api.exception.query.QueryMetadataException;
import com.metamatrix.api.exception.query.QueryPlannerException;
import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.query.analysis.AnalysisRecord;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder;
@@ -47,7 +48,6 @@
import com.metamatrix.query.sql.symbol.Expression;
import com.metamatrix.query.sql.util.SymbolMap;
import com.metamatrix.query.util.CommandContext;
-import com.metamatrix.query.util.LogConstants;
/**
* Finds nodes that can be turned into dependent joins
Modified: trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleCopyCriteria.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleCopyCriteria.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleCopyCriteria.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -35,6 +35,7 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.query.QueryPlannerException;
import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.query.analysis.AnalysisRecord;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder;
@@ -51,7 +52,6 @@
import com.metamatrix.query.sql.symbol.ElementSymbol;
import com.metamatrix.query.sql.visitor.GroupsUsedByElementsVisitor;
import com.metamatrix.query.util.CommandContext;
-import com.metamatrix.query.util.LogConstants;
/**
* For each join node this rule will find the set of criteria allowed to influence the join (the join criteria, and inner
Modified: trunk/engine/src/main/java/com/metamatrix/query/optimizer/xml/XMLPlanner.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/optimizer/xml/XMLPlanner.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/optimizer/xml/XMLPlanner.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -32,6 +32,7 @@
import com.metamatrix.api.exception.query.QueryMetadataException;
import com.metamatrix.api.exception.query.QueryPlannerException;
import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.MetaMatrixRuntimeException;
import com.metamatrix.core.id.IDGenerator;
import com.metamatrix.query.analysis.AnalysisRecord;
@@ -63,7 +64,6 @@
import com.metamatrix.query.sql.visitor.ElementCollectorVisitor;
import com.metamatrix.query.sql.visitor.GroupCollectorVisitor;
import com.metamatrix.query.util.CommandContext;
-import com.metamatrix.query.util.LogConstants;
/**
* <p> This prepares an {@link com.metamatrix.query.processor.xml.XMLPlan XMLPlan} from
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/QueryProcessor.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/QueryProcessor.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/QueryProcessor.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -33,10 +33,10 @@
import com.metamatrix.common.buffer.BufferManager.BufferReserveMode;
import com.metamatrix.common.buffer.BufferManager.TupleSourceType;
import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.MetaMatrixRuntimeException;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.Assertion;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.execution.QueryExecPlugin;
import com.metamatrix.query.processor.BatchCollector.BatchProducer;
import com.metamatrix.query.util.CommandContext;
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/proc/AssignmentInstruction.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/proc/AssignmentInstruction.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/proc/AssignmentInstruction.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -27,7 +27,6 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.sql.util.VariableContext;
/**
@@ -60,7 +59,7 @@
protected void processValue(Object value, VariableContext varContext) throws MetaMatrixComponentException,
MetaMatrixProcessingException {
varContext.setValue(getVariable(), value);
- LogManager.logTrace(LogConstants.CTX_DQP,
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP,
new Object[] {this.toString() + " The variable " //$NON-NLS-1$
+ getVariable() + " in the variablecontext is updated with the value :", value}); //$NON-NLS-1$
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ErrorInstruction.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ErrorInstruction.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ErrorInstruction.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -28,7 +28,6 @@
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.api.exception.query.ProcedureErrorInstructionException;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.sql.util.VariableContext;
/**
@@ -67,7 +66,7 @@
*/
protected void processValue(Object value, VariableContext varContext) throws MetaMatrixComponentException,
MetaMatrixProcessingException {
- LogManager.logTrace(LogConstants.CTX_DQP,
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP,
new Object[] {"Processing RaiseErrorInstruction with the value :", value}); //$NON-NLS-1$
throw new ProcedureErrorInstructionException(ERROR_PREFIX + (value != null ? value.toString() : "")); //$NON-NLS-1$
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ExecDynamicSqlInstruction.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ExecDynamicSqlInstruction.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ExecDynamicSqlInstruction.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -39,7 +39,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.types.DataTypeManager;
import com.metamatrix.core.id.IDGenerator;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.analysis.AnalysisRecord;
import com.metamatrix.query.execution.QueryExecPlugin;
import com.metamatrix.query.metadata.QueryMetadataInterface;
@@ -146,7 +145,7 @@
.getString("ExecDynamicSqlInstruction.0")); //$NON-NLS-1$
}
- LogManager.logTrace(LogConstants.CTX_DQP,
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP,
new Object[] { "Executing dynamic sql ", value }); //$NON-NLS-1$
Command command = QueryParser.getQueryParser().parseCommand(value.toString());
@@ -236,7 +235,7 @@
for (SetClause setClause : dynamicCommand.getUsing().getClauses()) {
Object assignment = procEnv.evaluateExpression(setClause.getValue());
- LogManager.logTrace(LogConstants.CTX_DQP,
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP,
new Object[] { this, " The using variable ", //$NON-NLS-1$
setClause.getSymbol(), " has value :", assignment }); //$NON-NLS-1$
localContext.setValue(setClause.getSymbol(), assignment);
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/proc/IfInstruction.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/proc/IfInstruction.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/proc/IfInstruction.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -32,7 +32,6 @@
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.processor.program.Program;
import com.metamatrix.query.processor.program.ProgramInstruction;
import com.metamatrix.query.sql.lang.Criteria;
@@ -94,13 +93,13 @@
boolean evalValue = procEnv.evaluateCriteria(condition);
if(evalValue) {
- LogManager.logTrace(LogConstants.CTX_DQP, new Object[]{"IFInstruction: "+ //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, new Object[]{"IFInstruction: "+ //$NON-NLS-1$
" The criteria on the if block evaluated to true, processing the if block"}); //$NON-NLS-1$
//push the "if" Program onto the stack
procEnv.push(ifProgram);
} else if(elseProgram != null) {
- LogManager.logTrace(LogConstants.CTX_DQP, new Object[]{"IFInstruction: "+ //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, new Object[]{"IFInstruction: "+ //$NON-NLS-1$
" The criteria on the if block evaluated to false, processing the else block"}); //$NON-NLS-1$
//push the "else" Program onto the stack
procEnv.push(elseProgram);
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ProcedurePlan.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ProcedurePlan.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/proc/ProcedurePlan.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -43,7 +43,6 @@
import com.metamatrix.common.buffer.TupleBatch;
import com.metamatrix.common.buffer.TupleSource;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.execution.QueryExecPlugin;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.metadata.SupportConstants;
@@ -166,7 +165,7 @@
originalProgram.resetProgramCounter();
programs.clear();
programs.push(originalProgram);
- LogManager.logTrace(LogConstants.CTX_DQP, "ProcedurePlan reset"); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, "ProcedurePlan reset"); //$NON-NLS-1$
}
public ProcessorDataManager getDataManager() {
@@ -265,23 +264,23 @@
Program program = peek();
inst = program.getCurrentInstruction();
if (inst == null){
- LogManager.logTrace(LogConstants.CTX_DQP, "Finished program", program); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, "Finished program", program); //$NON-NLS-1$
this.pop();
continue;
}
if (inst instanceof RepeatedInstruction) {
- LogManager.logTrace(LogConstants.CTX_DQP, "Executing repeated instruction", inst); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, "Executing repeated instruction", inst); //$NON-NLS-1$
RepeatedInstruction loop = (RepeatedInstruction)inst;
if (loop.testCondition(this)) {
- LogManager.logTrace(LogConstants.CTX_DQP, "Passed condition, executing program " + loop.getNestedProgram()); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, "Passed condition, executing program " + loop.getNestedProgram()); //$NON-NLS-1$
inst.process(this);
this.push(loop.getNestedProgram());
continue;
}
- LogManager.logTrace(LogConstants.CTX_DQP, "Exiting repeated instruction", inst); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, "Exiting repeated instruction", inst); //$NON-NLS-1$
loop.postInstruction(this);
} else {
- LogManager.logTrace(LogConstants.CTX_DQP, "Executing instruction", inst); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, "Executing instruction", inst); //$NON-NLS-1$
inst.process(this);
}
program.incrementProgramCounter();
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/relational/PlanExecutionNode.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/relational/PlanExecutionNode.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/relational/PlanExecutionNode.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -31,7 +31,6 @@
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.buffer.TupleBatch;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.processor.ProcessorPlan;
import com.metamatrix.query.sql.util.VariableContext;
import com.metamatrix.query.util.CommandContext;
@@ -140,7 +139,7 @@
try {
plan.close();
} catch (MetaMatrixComponentException e1){
- LogManager.logDetail(LogConstants.CTX_DQP, e1, "Error closing processor"); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, e1, "Error closing processor"); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalNode.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalNode.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalNode.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -38,7 +38,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.Assertion;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.processor.Describable;
import com.metamatrix.query.processor.DescribableUtil;
import com.metamatrix.query.processor.ProcessorDataManager;
@@ -389,7 +388,7 @@
* @param batch Batch being sent
*/
private void recordBatch(TupleBatch batch) {
- if (!this.context.getProcessDebug() || !LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
+ if (!this.context.getProcessDebug() || !LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
return;
}
// Print summary
@@ -405,7 +404,7 @@
for (int row = batch.getBeginRow(); row <= batch.getEndRow(); row++) {
str.append("\t").append(row).append(": ").append(batch.getTuple(row)).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
- LogManager.logDetail(LogConstants.CTX_DQP, str.toString());
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, str.toString());
}
// =========================================================================
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalPlan.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalPlan.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalPlan.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -39,7 +39,6 @@
import com.metamatrix.query.processor.ProcessorDataManager;
import com.metamatrix.query.processor.ProcessorPlan;
import com.metamatrix.query.util.CommandContext;
-import com.metamatrix.query.util.LogConstants;
/**
*/
@@ -122,7 +121,6 @@
super.reset();
this.root.reset();
- LogManager.logTrace(LogConstants.CTX_QUERY_PLANNER, "RelationalPlan reset"); //$NON-NLS-1$
}
public String toString() {
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SortUtility.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SortUtility.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SortUtility.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -41,7 +41,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.Assertion;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.sql.lang.OrderBy;
import com.metamatrix.query.sql.symbol.SingleElementSymbol;
@@ -262,8 +261,8 @@
bufferManager.releaseBuffers(release);
reserved -= release;
try {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.TRACE)) {
- LogManager.logTrace(LogConstants.CTX_DQP, "Merging", maxSortIndex, "sublists out of", activeTupleBuffers.size()); //$NON-NLS-1$ //$NON-NLS-2$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP, MessageLevel.TRACE)) {
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, "Merging", maxSortIndex, "sublists out of", activeTupleBuffers.size()); //$NON-NLS-1$ //$NON-NLS-2$
}
// initialize the sublists with the min value
for(int i = 0; i<maxSortIndex; i++) {
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AbortProcessingInstruction.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AbortProcessingInstruction.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AbortProcessingInstruction.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -31,7 +31,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.query.execution.QueryExecPlugin;
import com.metamatrix.query.util.ErrorMessageKeys;
-import com.metamatrix.query.util.LogConstants;
/**
* This instruction, intended to be reached conditionally (only under certain
@@ -61,7 +60,7 @@
public XMLContext process(XMLProcessorEnvironment env, XMLContext context)
throws BlockedException, MetaMatrixComponentException, MetaMatrixProcessingException{
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, "ABORT processing now."); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, "ABORT processing now."); //$NON-NLS-1$
throw new MetaMatrixComponentException(DEFAULT_MESSAGE);
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AddCommentInstruction.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AddCommentInstruction.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AddCommentInstruction.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -29,7 +29,6 @@
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.query.util.LogConstants;
/**
* Adds a comment to an element of the document in progress
@@ -57,7 +56,7 @@
DocumentInProgress doc = env.getDocumentInProgress();
doc.addComment(this.commentText);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, "COMMENT"); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, "COMMENT"); //$NON-NLS-1$
env.incrementCurrentProgramCounter();
return context;
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AddNodeInstruction.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AddNodeInstruction.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/AddNodeInstruction.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -22,7 +22,12 @@
package com.metamatrix.query.processor.xml;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MetaMatrixProcessingException;
@@ -30,7 +35,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.query.execution.QueryExecPlugin;
import com.metamatrix.query.sql.symbol.ElementSymbol;
-import com.metamatrix.query.util.LogConstants;
/**
*/
@@ -91,15 +95,15 @@
if (defaultValue != null){
if(isElement) {
success = doc.addElement(descriptor, defaultValue);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"TAG elem",descriptor.getName(),"fixed value",defaultValue}); //$NON-NLS-1$ //$NON-NLS-2$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"TAG elem",descriptor.getName(),"fixed value",defaultValue}); //$NON-NLS-1$ //$NON-NLS-2$
} else {
success = doc.addAttribute(descriptor, defaultValue);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"TAG attr",descriptor.getName(),"fixed value",defaultValue}); //$NON-NLS-1$ //$NON-NLS-2$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"TAG attr",descriptor.getName(),"fixed value",defaultValue}); //$NON-NLS-1$ //$NON-NLS-2$
}
} else {
if(isElement) {
success = doc.addElement(descriptor, nillableDescriptor);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"TAG elem",descriptor.getName()}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"TAG elem",descriptor.getName()}); //$NON-NLS-1$
} //else nothing gets outputted for attribute with no content
}
} else {
@@ -109,24 +113,24 @@
if (valueStr != null){
if(isElement) {
success = doc.addElement(descriptor, valueStr);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"TAG elem",descriptor.getName(),"value",valueStr}); //$NON-NLS-1$ //$NON-NLS-2$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"TAG elem",descriptor.getName(),"value",valueStr}); //$NON-NLS-1$ //$NON-NLS-2$
} else {
success = doc.addAttribute(descriptor, valueStr);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"TAG attr",descriptor.getName(),"value",valueStr}); //$NON-NLS-1$ //$NON-NLS-2$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"TAG attr",descriptor.getName(),"value",valueStr}); //$NON-NLS-1$ //$NON-NLS-2$
}
} else {
if (defaultValue != null){
if(isElement) {
success = doc.addElement(descriptor, defaultValue);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"TAG elem",descriptor.getName(),"default value",defaultValue}); //$NON-NLS-1$ //$NON-NLS-2$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"TAG elem",descriptor.getName(),"default value",defaultValue}); //$NON-NLS-1$ //$NON-NLS-2$
} else {
success = doc.addAttribute(descriptor, defaultValue);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"TAG attr",descriptor.getName(),"default value",defaultValue}); //$NON-NLS-1$ //$NON-NLS-2$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"TAG attr",descriptor.getName(),"default value",defaultValue}); //$NON-NLS-1$ //$NON-NLS-2$
}
} else {
if(isElement) {
success = doc.addElement(descriptor, nillableDescriptor);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"TAG elem",descriptor.getName(),"no value"}); //$NON-NLS-1$ //$NON-NLS-2$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"TAG elem",descriptor.getName(),"no value"}); //$NON-NLS-1$ //$NON-NLS-2$
} //else nothing gets outputted for attribute with no content
}
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/EndBlockInstruction.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/EndBlockInstruction.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/EndBlockInstruction.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -29,7 +29,6 @@
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.query.util.LogConstants;
/**
* <p>This instruction closes a result set, which closes and removes the TupleSource
@@ -66,7 +65,7 @@
context.removeResultSet(resultSetName);
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{CLOSE_FINISHED,resultSetName});
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{CLOSE_FINISHED,resultSetName});
env.incrementCurrentProgramCounter();
return context;
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/EndDocumentInstruction.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/EndDocumentInstruction.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/EndDocumentInstruction.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -29,7 +29,6 @@
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.query.util.LogConstants;
/**
* This instruction marks the current document in progress as
@@ -54,7 +53,7 @@
// program stack (don't want to start a new doc in the middle of
// recursive processing)
if (!env.isRecursiveProgramInStack()) {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, "ending document"); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, "ending document"); //$NON-NLS-1$
env.getDocumentInProgress().markAsFinished();
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/ExecSqlInstruction.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/ExecSqlInstruction.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/ExecSqlInstruction.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -30,7 +30,6 @@
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.query.mapping.xml.ResultSetInfo;
-import com.metamatrix.query.util.LogConstants;
/**
* Executes a SQL statement, defines a result set.
@@ -48,7 +47,7 @@
public XMLContext process(XMLProcessorEnvironment env, XMLContext context)
throws BlockedException, MetaMatrixComponentException, MetaMatrixProcessingException{
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"SQL: Result set DOESN'T exist:",resultSetName}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"SQL: Result set DOESN'T exist:",resultSetName}); //$NON-NLS-1$
PlanExecutor executor = context.getResultExecutor(resultSetName);
if (executor == null) {
executor = env.createResultExecutor(resultSetName, info);
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/ExecStagingTableInstruction.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/ExecStagingTableInstruction.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/ExecStagingTableInstruction.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -30,7 +30,6 @@
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.query.mapping.xml.ResultSetInfo;
-import com.metamatrix.query.util.LogConstants;
/**
@@ -59,7 +58,7 @@
throws BlockedException, MetaMatrixComponentException, MetaMatrixProcessingException {
if (!env.isStagingTableLoaded(this.resultSetName)) {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"SQL: Result set DOESN'T exist:",resultSetName}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"SQL: Result set DOESN'T exist:",resultSetName}); //$NON-NLS-1$
PlanExecutor executor = context.getResultExecutor(resultSetName);
if (executor == null) {
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/IfInstruction.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/IfInstruction.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/IfInstruction.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -32,7 +32,6 @@
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.query.util.LogConstants;
/**
* <p>This instruction holds a List of Criteria, and for each Criteria there is a
@@ -196,7 +195,7 @@
Program thenProgram = condition.getThenProgram();
env.pushProgram(thenProgram, condition.isProgramRecursive());
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"IF: true condition", condition, "- then program:", thenProgram}); //$NON-NLS-1$ //$NON-NLS-2$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"IF: true condition", condition, "- then program:", thenProgram}); //$NON-NLS-1$ //$NON-NLS-2$
}
return context;
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/InitializeDocumentInstruction.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/InitializeDocumentInstruction.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/InitializeDocumentInstruction.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -30,7 +30,6 @@
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.query.mapping.xml.MappingNodeConstants;
-import com.metamatrix.query.util.LogConstants;
import com.metamatrix.query.util.XMLFormatConstants;
/**
@@ -78,7 +77,7 @@
public XMLContext process(XMLProcessorEnvironment env, XMLContext context)
throws BlockedException, MetaMatrixComponentException, MetaMatrixProcessingException{
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, "DOC begin"); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, "DOC begin"); //$NON-NLS-1$
// Only process this instruction if there are no recursive programs in the
// program stack (don't want to start a new doc in the middle of
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/MoveCursorInstruction.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/MoveCursorInstruction.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/MoveCursorInstruction.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -29,7 +29,6 @@
import com.metamatrix.api.exception.MetaMatrixProcessingException;
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.query.util.LogConstants;
/**
*/
@@ -52,7 +51,7 @@
public XMLContext process(XMLProcessorEnvironment env, XMLContext context)
throws BlockedException, MetaMatrixComponentException, MetaMatrixProcessingException {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"NEXT", resultSetName}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"NEXT", resultSetName}); //$NON-NLS-1$
context.getNextRow(resultSetName);
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/MoveDocInstruction.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/MoveDocInstruction.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/MoveDocInstruction.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -34,7 +34,6 @@
import com.metamatrix.core.util.Assertion;
import com.metamatrix.query.execution.QueryExecPlugin;
import com.metamatrix.query.util.ErrorMessageKeys;
-import com.metamatrix.query.util.LogConstants;
/**
*/
@@ -62,7 +61,7 @@
switch(this.direction) {
case UP:
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, "UP in document"); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, "UP in document"); //$NON-NLS-1$
try {
doc.moveToParent();
} catch (SAXException err) {
@@ -70,7 +69,7 @@
}
break;
case DOWN:
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, "LAST child in document"); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, "LAST child in document"); //$NON-NLS-1$
doc.moveToLastChild();
break;
default:
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/RelationalPlanExecutor.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/RelationalPlanExecutor.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/RelationalPlanExecutor.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -40,7 +40,6 @@
import com.metamatrix.query.sql.symbol.ElementSymbol;
import com.metamatrix.query.sql.util.VariableContext;
import com.metamatrix.query.util.CommandContext;
-import com.metamatrix.query.util.LogConstants;
/**
@@ -154,7 +153,7 @@
*/
public void close() throws MetaMatrixComponentException {
this.internalProcessor.closeProcessing();
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"closed executor", resultInfo.getResultSetName()}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"closed executor", resultInfo.getResultSetName()}); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/SAXDocumentInProgress.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/SAXDocumentInProgress.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/SAXDocumentInProgress.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -39,7 +39,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.query.mapping.xml.MappingNodeConstants;
-import com.metamatrix.query.util.LogConstants;
/**
* This class is used to build XML document and stream the output as
@@ -154,7 +153,7 @@
return true;
}
} catch (SAXException e) {
- LogManager.logError(LogConstants.CTX_XML_PLAN, e, e.getMessage());
+ LogManager.logError(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, e, e.getMessage());
return false;
}
showState( "addElement(2) - BOT" ); //$NON-NLS-1$
@@ -344,19 +343,19 @@
private void showState( String sOccasion ) {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_XML_PLAN, MessageLevel.TRACE)) {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"\n [showState] State Vars at: " + sOccasion} ); //$NON-NLS-1$
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"[showState] currentParent: " + currentParent} ); //$NON-NLS-1$
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"[showState] currentObject: " + currentObject} ); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, MessageLevel.TRACE)) {
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"\n [showState] State Vars at: " + sOccasion} ); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"[showState] currentParent: " + currentParent} ); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"[showState] currentObject: " + currentObject} ); //$NON-NLS-1$
if ( currentObject != null ) {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"[showState] currentObject.getNillableDescriptor(): " + currentObject.getNillableDescriptor()}); //$NON-NLS-1$
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"[showState] workingElements: " + currentObject.getChildren()}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"[showState] currentObject.getNillableDescriptor(): " + currentObject.getNillableDescriptor()}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"[showState] workingElements: " + currentObject.getChildren()}); //$NON-NLS-1$
}
if ( currentParent != null ) {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"[showState] currentParent.getParent(): " + currentParent.getParent()}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"[showState] currentParent.getParent(): " + currentParent.getParent()}); //$NON-NLS-1$
} else {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"[showState] currentParent.getParent(): is NULL "}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"[showState] currentParent.getParent(): is NULL "}); //$NON-NLS-1$
}
}
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/WhileInstruction.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/WhileInstruction.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/WhileInstruction.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -32,7 +32,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.query.sql.symbol.ElementSymbol;
import com.metamatrix.query.sql.util.VariableContext;
-import com.metamatrix.query.util.LogConstants;
/**
* Loop instruction on the result set execute before this instruction.
@@ -70,7 +69,7 @@
setFirst(context.getVariableContext(), Boolean.TRUE);
}
else {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"WHILE removed finished result set:",resultSetName}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"WHILE removed finished result set:",resultSetName}); //$NON-NLS-1$
//increment the current program counter, so this
//While instruction will not be executed again
@@ -98,7 +97,7 @@
protected void pushProgram(XMLProcessorEnvironment env,
XMLContext context,
List row) throws MetaMatrixComponentException {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"WHILE repeating for result set:",resultSetName,", block program:", blockProgram}); //$NON-NLS-1$ //$NON-NLS-2$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"WHILE repeating for result set:",resultSetName,", block program:", blockProgram}); //$NON-NLS-1$ //$NON-NLS-2$
context.setVariableValues(resultSetName, row);
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLPlan.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLPlan.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLPlan.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -85,7 +85,6 @@
import com.metamatrix.query.tempdata.TempTableStoreImpl;
import com.metamatrix.query.util.CommandContext;
import com.metamatrix.query.util.ErrorMessageKeys;
-import com.metamatrix.query.util.LogConstants;
import com.metamatrix.query.util.XMLFormatConstants;
/**
*
@@ -148,7 +147,7 @@
this.env = (XMLProcessorEnvironment)this.env.clone();
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, "XMLPlan reset"); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, "XMLPlan reset"); //$NON-NLS-1$
}
public ProcessorDataManager getDataManager() {
@@ -273,7 +272,7 @@
// do the xml processing.
ProcessorInstruction inst = env.getCurrentInstruction();
while (inst != null){
- LogManager.logTrace(LogConstants.CTX_QUERY_PLANNER, "Executing instruction", inst); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, "Executing instruction", inst); //$NON-NLS-1$
this.context = inst.process(this.env, this.context);
//code to check for end of document, set current doc
@@ -576,7 +575,7 @@
return "XMLPlan:\n" + ProgramUtil.programToString(this.originalProgram); //$NON-NLS-1$
} catch (Exception e){
e.printStackTrace();
- LogManager.logWarning(LogConstants.CTX_XML_PLAN, e,
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, e,
QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0001));
}
return "XMLPlan"; //$NON-NLS-1$
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLProcessorEnvironment.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLProcessorEnvironment.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLProcessorEnvironment.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -38,7 +38,6 @@
import com.metamatrix.query.processor.ProcessorPlan;
import com.metamatrix.query.sql.symbol.GroupSymbol;
import com.metamatrix.query.util.CommandContext;
-import com.metamatrix.query.util.LogConstants;
public class XMLProcessorEnvironment {
@@ -139,8 +138,8 @@
while (this.programStack.size() > 1 &&
programState.programCounter >= programState.program.getProcessorInstructions().size()) {
this.programStack.removeFirst();
- if(LogManager.isMessageToBeRecorded(LogConstants.CTX_XML_PLAN, MessageLevel.TRACE)) {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"Processor Environment popped program w/ recursion count " + programState.recursionCount, "; " + this.programStack.size(), " programs left."}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if(LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, MessageLevel.TRACE)) {
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"Processor Environment popped program w/ recursion count " + programState.recursionCount, "; " + this.programStack.size(), " programs left."}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
programState = (ProgramState)this.programStack.getFirst();
}
@@ -164,10 +163,10 @@
} else {
programState.recursionCount = ProgramState.NOT_RECURSIVE + 1;
}
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"Pushed recursive program w/ recursion count " + programState.recursionCount}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"Pushed recursive program w/ recursion count " + programState.recursionCount}); //$NON-NLS-1$
} else {
- LogManager.logTrace(LogConstants.CTX_XML_PLAN, new Object[]{"Pushed non-recursive program w/ recursion count " + programState.recursionCount}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_XML_PLAN, new Object[]{"Pushed non-recursive program w/ recursion count " + programState.recursionCount}); //$NON-NLS-1$
}
this.programStack.addFirst(programState);
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/resolver/QueryResolver.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/resolver/QueryResolver.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/resolver/QueryResolver.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -61,7 +61,6 @@
import com.metamatrix.query.sql.lang.Query;
import com.metamatrix.query.sql.lang.UnaryFromClause;
import com.metamatrix.query.sql.symbol.GroupSymbol;
-import com.metamatrix.query.util.LogConstants;
/**
* <P>The QueryResolver is used between Parsing and QueryValidation. The SQL queries,
@@ -132,7 +131,7 @@
AnalysisRecord analysis, boolean resolveNullLiterals)
throws QueryResolverException, MetaMatrixComponentException {
- LogManager.logTrace(LogConstants.CTX_QUERY_RESOLVER, new Object[]{"Resolving command", currentCommand}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_QUERY_RESOLVER, new Object[]{"Resolving command", currentCommand}); //$NON-NLS-1$
TempMetadataAdapter resolverMetadata = null;
try {
Modified: trunk/engine/src/main/java/com/metamatrix/query/resolver/command/UpdateProcedureResolver.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/resolver/command/UpdateProcedureResolver.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/resolver/command/UpdateProcedureResolver.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -73,7 +73,6 @@
import com.metamatrix.query.sql.util.SymbolMap;
import com.metamatrix.query.sql.visitor.ValueIteratorProviderCollectorVisitor;
import com.metamatrix.query.util.ErrorMessageKeys;
-import com.metamatrix.query.util.LogConstants;
/**
*/
@@ -171,7 +170,7 @@
private void resolveBlock(CreateUpdateProcedureCommand command, Block block, GroupContext externalGroups,
TempMetadataAdapter metadata, boolean isUpdateProcedure, AnalysisRecord analysis)
throws QueryResolverException, QueryMetadataException, MetaMatrixComponentException {
- LogManager.logTrace(LogConstants.CTX_QUERY_RESOLVER, new Object[]{"Resolving block", block}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_QUERY_RESOLVER, new Object[]{"Resolving block", block}); //$NON-NLS-1$
//create a new variable and metadata context for this block so that discovered metadata is not visible else where
TempMetadataStore store = new TempMetadataStore(new HashMap(metadata.getMetadataStore().getData()));
@@ -189,7 +188,7 @@
private void resolveStatement(CreateUpdateProcedureCommand command, Statement statement, GroupContext externalGroups, GroupSymbol variables, TempMetadataAdapter metadata, boolean isUpdateProcedure, AnalysisRecord analysis)
throws QueryResolverException, QueryMetadataException, MetaMatrixComponentException {
- LogManager.logTrace(LogConstants.CTX_QUERY_RESOLVER, new Object[]{"Resolving statement", statement}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_QUERY_RESOLVER, new Object[]{"Resolving statement", statement}); //$NON-NLS-1$
switch(statement.getType()) {
case Statement.TYPE_IF:
Deleted: trunk/engine/src/main/java/com/metamatrix/query/util/LogConstants.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/util/LogConstants.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/com/metamatrix/query/util/LogConstants.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -1,41 +0,0 @@
-/*
- * 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 com.metamatrix.query.util;
-
-
-public interface LogConstants {
-
-//**********************************************************************
-//PLEASE NOTE:!!!!!!!!!!!!!!!!!
-//All constants defined here should also be defined in
-//com.metamatrix.common.util.LogContextsUtil
-//**********************************************************************
-
- // Query contexts
- public static final String CTX_FUNCTION_TREE = "FUNCTION_TREE"; //$NON-NLS-1$
- public static final String CTX_QUERY_PLANNER = "QUERY_PLANNER"; //$NON-NLS-1$
- public static final String CTX_QUERY_RESOLVER = "QUERY_RESOLVER"; //$NON-NLS-1$
- public static final String CTX_XML_PLANNER = "XML_QUERY_PLANNER"; //$NON-NLS-1$
- public static final String CTX_XML_PLAN = "XML_PLAN"; //$NON-NLS-1$
-
-}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -28,7 +28,6 @@
import com.metamatrix.cache.CacheFactory;
import com.metamatrix.cache.CacheConfiguration.Policy;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.dqp.util.LogConstants;
public class DQPContextCache implements Serializable{
private static final long serialVersionUID = 6958846566556640186L;
@@ -55,7 +54,7 @@
try {
this.cache.removeChild(this.processIdentifier);
} catch(IllegalStateException e) {
- LogManager.logWarning(LogConstants.CTX_DQP, e, e.getMessage());
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, e, e.getMessage());
}
}
@@ -75,7 +74,7 @@
}
}
} catch(IllegalStateException e) {
- LogManager.logWarning(LogConstants.CTX_DQP, e, e.getMessage());
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, e, e.getMessage());
}
}
@@ -95,7 +94,7 @@
}
}
} catch(IllegalStateException e) {
- LogManager.logWarning(LogConstants.CTX_DQP, e, e.getMessage());
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, e, e.getMessage());
}
}
@@ -111,7 +110,7 @@
scopeNode.removeChild(session);
}
} catch(IllegalStateException e) {
- LogManager.logWarning(LogConstants.CTX_DQP, e, e.getMessage());
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, e, e.getMessage());
}
}
@@ -129,7 +128,7 @@
scopeNode.removeChild(id.toUpperCase());
}
} catch(IllegalStateException e) {
- LogManager.logWarning(LogConstants.CTX_DQP, e, e.getMessage());
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, e, e.getMessage());
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -61,6 +61,7 @@
import com.metamatrix.common.comm.api.ResultsReceiver;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.queue.StatsCapturingWorkManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.Assertion;
import com.metamatrix.dqp.DQPPlugin;
@@ -68,7 +69,6 @@
import com.metamatrix.dqp.message.AtomicRequestMessage;
import com.metamatrix.dqp.message.AtomicResultsMessage;
import com.metamatrix.dqp.service.BufferService;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.optimizer.capabilities.BasicSourceCapabilities;
import com.metamatrix.query.optimizer.capabilities.SourceCapabilities;
import com.metamatrix.query.optimizer.capabilities.SourceCapabilities.Scope;
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorWorkItem.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorWorkItem.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -46,7 +46,6 @@
import org.teiid.dqp.internal.datamgr.metadata.RuntimeMetadataImpl;
import org.teiid.dqp.internal.process.AbstractWorkItem;
import org.teiid.dqp.internal.process.DQPWorkContext;
-import org.teiid.logging.api.CommandLogMessage;
import org.teiid.logging.api.CommandLogMessage.Event;
import com.metamatrix.api.exception.MetaMatrixComponentException;
@@ -56,12 +55,12 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.types.DataTypeManager;
import com.metamatrix.common.types.TransformationException;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.util.Assertion;
import com.metamatrix.dqp.DQPPlugin;
import com.metamatrix.dqp.message.AtomicRequestID;
import com.metamatrix.dqp.message.AtomicRequestMessage;
import com.metamatrix.dqp.message.AtomicResultsMessage;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.metadata.TempMetadataAdapter;
import com.metamatrix.query.metadata.TempMetadataStore;
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/SynchConnectorWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/SynchConnectorWorkItem.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/SynchConnectorWorkItem.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -33,10 +33,10 @@
import com.metamatrix.common.comm.api.ResultsReceiver;
import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.util.LogConstants;
import com.metamatrix.dqp.message.AtomicRequestMessage;
import com.metamatrix.dqp.message.AtomicResultsMessage;
import com.metamatrix.dqp.service.TransactionContext;
-import com.metamatrix.dqp.util.LogConstants;
public class SynchConnectorWorkItem extends ConnectorWorkItem {
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/language/LanguageBridgeFactory.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/language/LanguageBridgeFactory.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/language/LanguageBridgeFactory.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -63,10 +63,7 @@
import org.teiid.dqp.internal.datamgr.metadata.RuntimeMetadataImpl;
import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.common.log.LogManager;
-import com.metamatrix.dqp.DQPPlugin;
import com.metamatrix.dqp.message.ParameterInfo;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.metadata.TempMetadataID;
import com.metamatrix.query.sql.lang.BatchedUpdateCommand;
@@ -641,7 +638,6 @@
try {
group.setMetadataObject(metadataFactory.getGroup(symbol.getMetadataID()));
} catch(Exception e) {
- LogManager.logWarning(LogConstants.CTX_CONNECTOR, e, DQPPlugin.Util.getString("LanguageBridgeFactory.Unable_to_set_the_metadata_ID_for_group_{0}._11", symbol.getName())); //$NON-NLS-1$
throw new MetaMatrixComponentException(e);
}
return group;
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/AbstractWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/AbstractWorkItem.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/AbstractWorkItem.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -27,7 +27,6 @@
import javax.resource.spi.work.WorkListener;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.dqp.util.LogConstants;
/**
@@ -115,12 +114,12 @@
if (!ignoreDone) {
throw new IllegalStateException("More work is not valid once DONE"); //$NON-NLS-1$
}
- LogManager.logDetail(LogConstants.CTX_DQP, new Object[] {this, "ignoring more work, since the work item is done"}); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, new Object[] {this, "ignoring more work, since the work item is done"}); //$NON-NLS-1$
}
}
private void logTrace(String msg) {
- LogManager.logTrace(LogConstants.CTX_DQP, new Object[] {this, msg, this.threadState});
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, new Object[] {this, msg, this.threadState});
}
protected abstract void process();
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/CodeTableCache.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/CodeTableCache.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/CodeTableCache.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -34,8 +34,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.core.util.HashCodeUtil;
import com.metamatrix.dqp.DQPPlugin;
-import com.metamatrix.dqp.embedded.DQPEmbeddedProperties;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.util.CommandContext;
import com.metamatrix.vdb.runtime.VDBKey;
@@ -151,11 +149,11 @@
// Depends on size of results and available memory and system parameters
int potentialSize = table.codeMap.size() + records.length;
if (potentialSize > maxCodeTableRecords) {
- throw new MetaMatrixProcessingException("ERR.018.005.0100", DQPPlugin.Util.getString("ERR.018.005.0100", DQPEmbeddedProperties.MAX_CODE_TABLE_RECORDS_PER_TABLE)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new MetaMatrixProcessingException("ERR.018.005.0100", DQPPlugin.Util.getString("ERR.018.005.0100", "maxCodeTables")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
if (potentialSize + rowCount > maxCodeRecords) {
- throw new MetaMatrixProcessingException("ERR.018.005.0100", DQPPlugin.Util.getString("ERR.018.005.0100", DQPEmbeddedProperties.MAX_CODE_TABLE_RECORDS)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new MetaMatrixProcessingException("ERR.018.005.0100", DQPPlugin.Util.getString("ERR.018.005.0100", "maxCodeTableRecords")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
// Add data: <List<List<keyValue, returnValue>> from results to the code table cache
@@ -236,7 +234,7 @@
// Clear the cacheKeyDone
this.rowCount = 0;
// Log status
- LogManager.logInfo(LogConstants.CTX_DQP, DQPPlugin.Util.getString("CodeTableCache.Cleared_code_tables", removedTables, removedRecords)); //$NON-NLS-1$
+ LogManager.logInfo(com.metamatrix.common.util.LogConstants.CTX_DQP, DQPPlugin.Util.getString("CodeTableCache.Cleared_code_tables", removedTables, removedRecords)); //$NON-NLS-1$
}
/**
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -79,7 +79,6 @@
import com.metamatrix.dqp.service.SessionService;
import com.metamatrix.dqp.service.TransactionContext;
import com.metamatrix.dqp.service.TransactionService;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.processor.ProcessorDataManager;
import com.metamatrix.query.tempdata.TempTableStoreImpl;
@@ -206,7 +205,7 @@
} catch (InterruptedException e) {
}
// TODO: Should we be doing more cleanup here??
- LogManager.logDetail(LogConstants.CTX_DQP, "Stopping the DQP"); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, "Stopping the DQP"); //$NON-NLS-1$
}
/**
@@ -309,8 +308,8 @@
public ResultsFuture<ResultsMessage> processCursorRequest(long reqID,
int batchFirst, int fetchSize) throws MetaMatrixProcessingException {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_DQP, "DQP process cursor request from " + batchFirst); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, "DQP process cursor request from " + batchFirst); //$NON-NLS-1$
}
DQPWorkContext workContext = DQPWorkContext.getWorkContext();
ResultsFuture<ResultsMessage> resultsFuture = new ResultsFuture<ResultsMessage>();
@@ -357,8 +356,8 @@
public ResultsFuture<?> closeLobChunkStream(int lobRequestId,
long requestId, String streamId)
throws MetaMatrixProcessingException {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_DQP, "Request to close the Lob stream with Stream id="+streamId+" instance id="+lobRequestId); //$NON-NLS-1$//$NON-NLS-2$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, "Request to close the Lob stream with Stream id="+streamId+" instance id="+lobRequestId); //$NON-NLS-1$//$NON-NLS-2$
}
DQPWorkContext workContext = DQPWorkContext.getWorkContext();
RequestWorkItem workItem = safeGetWorkItem(workContext.getRequestID(requestId));
@@ -371,8 +370,8 @@
public ResultsFuture<LobChunk> requestNextLobChunk(int lobRequestId,
long requestId, String streamId)
throws MetaMatrixProcessingException {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_DQP, "Request for next Lob chunk with Stream id="+streamId+" instance id="+lobRequestId); //$NON-NLS-1$//$NON-NLS-2$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, "Request for next Lob chunk with Stream id="+streamId+" instance id="+lobRequestId); //$NON-NLS-1$//$NON-NLS-2$
}
RequestWorkItem workItem = getRequestWorkItem(DQPWorkContext.getWorkContext().getRequestID(requestId));
ResultsFuture<LobChunk> resultsFuture = new ResultsFuture<LobChunk>();
@@ -427,7 +426,7 @@
try {
cancelRequest(reqId);
} catch (MetaMatrixComponentException err) {
- LogManager.logWarning(LogConstants.CTX_DQP, err, "Failed to cancel " + reqId); //$NON-NLS-1$
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, err, "Failed to cancel " + reqId); //$NON-NLS-1$
}
}
}
@@ -436,7 +435,7 @@
try {
transactionService.cancelTransactions(sessionId, false);
} catch (XATransactionException err) {
- LogManager.logWarning(LogConstants.CTX_DQP, "rollback failed for requestID=" + sessionId); //$NON-NLS-1$
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, "rollback failed for requestID=" + sessionId); //$NON-NLS-1$
}
}
contextCache.removeSessionScopedCache(sessionId);
@@ -448,8 +447,8 @@
}
private boolean cancelRequest(RequestID requestID) throws MetaMatrixComponentException {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_DQP, "cancelQuery for requestID=" + requestID); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, "cancelQuery for requestID=" + requestID); //$NON-NLS-1$
}
boolean markCancelled = false;
@@ -461,7 +460,7 @@
if (markCancelled) {
logMMCommand(workItem, Event.CANCEL, null);
} else {
- LogManager.logDetail(LogConstants.CTX_DQP, DQPPlugin.Util.getString("DQPCore.failed_to_cancel")); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, DQPPlugin.Util.getString("DQPCore.failed_to_cancel")); //$NON-NLS-1$
}
return markCancelled;
}
@@ -478,25 +477,25 @@
* @throws MetaMatrixComponentException
*/
void closeRequest(RequestID requestID) throws MetaMatrixComponentException {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_DQP, "closeQuery for requestID=" + requestID); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, "closeQuery for requestID=" + requestID); //$NON-NLS-1$
}
RequestWorkItem workItem = safeGetWorkItem(requestID);
if (workItem != null) {
workItem.requestClose();
} else {
- LogManager.logDetail(LogConstants.CTX_DQP, requestID + " close call ignored as the request has already been removed."); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, requestID + " close call ignored as the request has already been removed."); //$NON-NLS-1$
}
}
private void clearPlanCache(){
- LogManager.logInfo(LogConstants.CTX_DQP, DQPPlugin.Util.getString("DQPCore.Clearing_prepared_plan_cache")); //$NON-NLS-1$
+ LogManager.logInfo(com.metamatrix.common.util.LogConstants.CTX_DQP, DQPPlugin.Util.getString("DQPCore.Clearing_prepared_plan_cache")); //$NON-NLS-1$
this.prepPlanCache.clearAll();
}
private void clearCodeTableCache(){
- LogManager.logInfo(LogConstants.CTX_DQP, DQPPlugin.Util.getString("DQPCore.Clearing_code_table_cache")); //$NON-NLS-1$
+ LogManager.logInfo(com.metamatrix.common.util.LogConstants.CTX_DQP, DQPPlugin.Util.getString("DQPCore.Clearing_code_table_cache")); //$NON-NLS-1$
this.dataTierMgr.clearCodeTables();
}
@@ -563,7 +562,7 @@
}
void logMMCommand(RequestWorkItem workItem, Event status, Integer rowCount) {
- if (!LogManager.isMessageToBeRecorded(LogConstants.CTX_COMMANDLOGGING, MessageLevel.INFO)) {
+ if (!LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_COMMANDLOGGING, MessageLevel.INFO)) {
return;
}
@@ -583,7 +582,7 @@
} else {
message = new CommandLogMessage(System.currentTimeMillis(), rID.toString(), txnID, workContext.getConnectionID(), workContext.getUserName(), workContext.getVdbName(), workContext.getVdbVersion(), rowCount, status);
}
- LogManager.log(MessageLevel.DETAIL, LogConstants.CTX_COMMANDLOGGING, message);
+ LogManager.log(MessageLevel.DETAIL, com.metamatrix.common.util.LogConstants.CTX_COMMANDLOGGING, message);
}
ProcessorDataManager getDataTierManager() {
@@ -639,7 +638,7 @@
prepPlanCache = new SessionAwareCache<PreparedPlan>(config.getPreparedPlanCacheMaxCount());
// Processor debug flag
- LogManager.logInfo(LogConstants.CTX_DQP, DQPPlugin.Util.getString("DQPCore.Processor_debug_allowed_{0}", this.processorDebugAllowed)); //$NON-NLS-1$
+ LogManager.logInfo(com.metamatrix.common.util.LogConstants.CTX_DQP, DQPPlugin.Util.getString("DQPCore.Processor_debug_allowed_{0}", this.processorDebugAllowed)); //$NON-NLS-1$
//get buffer manager
this.bufferManager = bufferService.getBufferManager();
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -64,7 +64,6 @@
import com.metamatrix.core.CoreConstants;
import com.metamatrix.core.util.Assertion;
import com.metamatrix.dqp.DQPPlugin;
-import com.metamatrix.dqp.embedded.DQPEmbeddedProperties;
import com.metamatrix.dqp.message.AtomicRequestID;
import com.metamatrix.dqp.message.AtomicRequestMessage;
import com.metamatrix.dqp.message.AtomicResultsMessage;
@@ -409,7 +408,7 @@
case CACHE_EXISTS:
return this.codeTableCache.lookupValue(codeTableName, returnElementName, keyElementName, keyValue, context);
case CACHE_OVERLOAD:
- throw new MetaMatrixProcessingException("ERR.018.005.0100", DQPPlugin.Util.getString("ERR.018.005.0100", DQPEmbeddedProperties.MAX_CODE_TABLES)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new MetaMatrixProcessingException("ERR.018.005.0100", DQPPlugin.Util.getString("ERR.018.005.0100", "maxCodeTables")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
default:
throw BlockedException.INSTANCE;
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/LobWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/LobWorkItem.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/LobWorkItem.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -40,7 +40,6 @@
import com.metamatrix.common.types.XMLType;
import com.metamatrix.core.util.Assertion;
import com.metamatrix.dqp.DQPPlugin;
-import com.metamatrix.dqp.util.LogConstants;
public class LobWorkItem implements Work {
@@ -76,7 +75,7 @@
chunk = stream.getNextChunk();
shouldClose = chunk.isLast();
} catch (MetaMatrixComponentException e) {
- LogManager.logWarning(LogConstants.CTX_DQP, e, DQPPlugin.Util.getString("ProcessWorker.LobError")); //$NON-NLS-1$
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, e, DQPPlugin.Util.getString("ProcessWorker.LobError")); //$NON-NLS-1$
ex = e;
} catch (IOException e) {
ex = e;
@@ -98,7 +97,7 @@
stream.close();
}
} catch (IOException e) {
- LogManager.logWarning(LogConstants.CTX_DQP, e, DQPPlugin.Util.getString("ProcessWorker.LobError")); //$NON-NLS-1$
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, e, DQPPlugin.Util.getString("ProcessWorker.LobError")); //$NON-NLS-1$
}
parent.removeLobStream(streamRequestId);
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -38,7 +38,6 @@
import com.metamatrix.api.exception.query.QueryValidatorException;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.types.DataTypeManager;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.QueryPlugin;
import com.metamatrix.query.eval.Evaluator;
import com.metamatrix.query.metadata.QueryMetadataInterface;
@@ -137,7 +136,7 @@
if (prepPlan == null) {
//if prepared plan does not exist, create one
prepPlan = new PreparedPlan();
- LogManager.logTrace(LogConstants.CTX_DQP, new Object[] { "Query does not exist in cache: ", sqlQuery}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, new Object[] { "Query does not exist in cache: ", sqlQuery}); //$NON-NLS-1$
}
ProcessorPlan cachedPlan = prepPlan.getPlan();
@@ -152,7 +151,7 @@
this.prepPlanCache.put(id, this.context.isSessionFunctionEvaluated(), prepPlan);
}
} else {
- LogManager.logTrace(LogConstants.CTX_DQP, new Object[] { "Query exist in cache: ", sqlQuery }); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, new Object[] { "Query exist in cache: ", sqlQuery }); //$NON-NLS-1$
processPlan = cachedPlan.clone();
//already in cache. obtain the values from cache
analysisRecord = prepPlan.getAnalysisRecord();
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -56,7 +56,6 @@
import com.metamatrix.dqp.service.AuthorizationService;
import com.metamatrix.dqp.service.TransactionContext;
import com.metamatrix.dqp.service.TransactionService;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.jdbc.api.ExecutionProperties;
import com.metamatrix.query.analysis.AnalysisRecord;
import com.metamatrix.query.metadata.QueryMetadataInterface;
@@ -345,7 +344,7 @@
if (ExecutionProperties.TXN_WRAP_AUTO.equals(requestMsg.getTxnAutoWrapMode())){
startAutoWrapTxn = true;
} else if (ExecutionProperties.TXN_WRAP_OFF.equals(requestMsg.getTxnAutoWrapMode())) {
- LogManager.logDetail(LogConstants.CTX_DQP, DQPPlugin.Util.getString("Request.potentially_unsafe")); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, DQPPlugin.Util.getString("Request.potentially_unsafe")); //$NON-NLS-1$
}
}
@@ -450,7 +449,7 @@
} finally {
String debugLog = analysisRecord.getDebugLog();
if(debugLog != null && debugLog.length() > 0) {
- LogManager.logInfo(LogConstants.CTX_DQP, debugLog);
+ LogManager.logInfo(com.metamatrix.common.util.LogConstants.CTX_DQP, debugLog);
}
}
@@ -458,7 +457,7 @@
analysisRecord.setQueryPlan(processPlan.getDescriptionProperties());
}
- LogManager.logDetail(LogConstants.CTX_DQP, new Object[] { DQPPlugin.Util.getString("BasicInterceptor.ProcessTree_for__4"), requestId, processPlan }); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, new Object[] { DQPPlugin.Util.getString("BasicInterceptor.ProcessTree_for__4"), requestId, processPlan }); //$NON-NLS-1$
} catch (QueryMetadataException e) {
Object[] params = new Object[] { requestId};
String msg = DQPPlugin.Util.getString("DQPCore.Unknown_query_metadata_exception_while_registering_query__{0}.", params); //$NON-NLS-1$
@@ -528,7 +527,7 @@
public void processRequest()
throws QueryValidatorException, QueryParserException, QueryResolverException, MetaMatrixComponentException, QueryPlannerException {
- LogManager.logDetail(LogConstants.CTX_DQP, this.requestId, "executing", this.requestMsg.isPreparedStatement()?"prepared":"", this.requestMsg.getCommandString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, this.requestId, "executing", this.requestMsg.isPreparedStatement()?"prepared":"", this.requestMsg.getCommandString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
initMetadata();
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -58,7 +58,6 @@
import com.metamatrix.dqp.message.ResultsMessage;
import com.metamatrix.dqp.service.TransactionContext;
import com.metamatrix.dqp.service.TransactionService;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.analysis.AnalysisRecord;
import com.metamatrix.query.analysis.QueryAnnotation;
import com.metamatrix.query.execution.QueryExecPlugin;
@@ -166,7 +165,7 @@
protected void process() {
DQPWorkContext.setWorkContext(this.dqpWorkContext);
- LogManager.logDetail(LogConstants.CTX_DQP, "############# PW PROCESSING on", requestID, "with state", state, "###########"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, "############# PW PROCESSING on", requestID, "with state", state, "###########"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
try {
if (this.state == ProcessingState.NEW) {
@@ -184,12 +183,12 @@
}
}
} catch (BlockedException e) {
- LogManager.logDetail(LogConstants.CTX_DQP, "############# PW EXITING on", requestID, "- processor blocked ###########"); //$NON-NLS-1$ //$NON-NLS-2$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, "############# PW EXITING on", requestID, "- processor blocked ###########"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (QueryProcessor.ExpiredTimeSliceException e) {
- LogManager.logDetail(LogConstants.CTX_DQP, "############# PW reenqueueing ", requestID, "- time slice expired ###########"); //$NON-NLS-1$ //$NON-NLS-2$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, "############# PW reenqueueing ", requestID, "- time slice expired ###########"); //$NON-NLS-1$ //$NON-NLS-2$
this.moreWork();
} catch (Throwable e) {
- LogManager.logDetail(LogConstants.CTX_DQP, e, "############# PW EXITING on", requestID, "- error occurred ###########"); //$NON-NLS-1$ //$NON-NLS-2$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, e, "############# PW EXITING on", requestID, "- error occurred ###########"); //$NON-NLS-1$ //$NON-NLS-2$
if (!isCanceled()) {
dqpCore.logMMCommand(this, Event.CANCEL, null);
@@ -202,9 +201,9 @@
cause = cause.getCause();
}
StackTraceElement elem = cause.getStackTrace()[0];
- LogManager.logWarning(LogConstants.CTX_DQP, DQPPlugin.Util.getString("ProcessWorker.processing_error", e.getMessage(), requestID, e.getClass().getName(), elem)); //$NON-NLS-1$
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, DQPPlugin.Util.getString("ProcessWorker.processing_error", e.getMessage(), requestID, e.getClass().getName(), elem)); //$NON-NLS-1$
}else {
- LogManager.logError(LogConstants.CTX_DQP, e, DQPPlugin.Util.getString("ProcessWorker.error", requestID)); //$NON-NLS-1$
+ LogManager.logError(com.metamatrix.common.util.LogConstants.CTX_DQP, e, DQPPlugin.Util.getString("ProcessWorker.error", requestID)); //$NON-NLS-1$
}
}
@@ -261,8 +260,8 @@
sendResultsIfNeeded(null);
} else {
moreWork(false); // If the timeslice expired, then the processor can probably produce more batches.
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_DQP, "############# PW EXITING on " + requestID + " - reenqueueing for more processing ###########"); //$NON-NLS-1$ //$NON-NLS-2$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, "############# PW EXITING on " + requestID + " - reenqueueing for more processing ###########"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
@@ -278,8 +277,8 @@
this.processor.closeProcessing();
}
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_DQP, "Removing tuplesource for the request " + requestID); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, "Removing tuplesource for the request " + requestID); //$NON-NLS-1$
}
rowcount = resultsBuffer.getRowCount();
if (this.processor != null) {
@@ -315,7 +314,7 @@
try {
this.transactionService.rollback(transactionContext);
} catch (XATransactionException e1) {
- LogManager.logWarning(LogConstants.CTX_DQP, e1, DQPPlugin.Util.getString("ProcessWorker.failed_rollback")); //$NON-NLS-1$
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, e1, DQPPlugin.Util.getString("ProcessWorker.failed_rollback")); //$NON-NLS-1$
}
}
@@ -391,8 +390,8 @@
return result;
}
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_DQP, "[RequestWorkItem.sendResultsIfNeeded] requestID:", requestID, "resultsID:", this.resultsBuffer, "done:", doneProducingBatches ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, "[RequestWorkItem.sendResultsIfNeeded] requestID:", requestID, "resultsID:", this.resultsBuffer, "done:", doneProducingBatches ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
//TODO: support fetching more than 1 batch
@@ -509,11 +508,11 @@
private void sendError() {
synchronized (this) {
if (this.resultsReceiver == null) {
- LogManager.logDetail(LogConstants.CTX_DQP, processingException, "Unable to send error to client as results were already sent.", requestID); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, processingException, "Unable to send error to client as results were already sent.", requestID); //$NON-NLS-1$
return;
}
}
- LogManager.logDetail(LogConstants.CTX_DQP, processingException, "Sending error to client", requestID); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, processingException, "Sending error to client", requestID); //$NON-NLS-1$
ResultsMessage response = new ResultsMessage(requestMsg);
response.setException(processingException);
setAnalysisRecords(response, analysisRecord);
@@ -570,7 +569,7 @@
try {
transactionService.cancelTransactions(requestID.getConnectionID(), true);
} catch (XATransactionException err) {
- LogManager.logWarning(LogConstants.CTX_DQP, "rollback failed for requestID=" + requestID.getConnectionID()); //$NON-NLS-1$
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, "rollback failed for requestID=" + requestID.getConnectionID()); //$NON-NLS-1$
throw new MetaMatrixComponentException(err);
}
}
@@ -594,15 +593,15 @@
return true;
}
- LogManager.logDetail(LogConstants.CTX_DQP, "Connector request not found. AtomicRequestID=", ari); //$NON-NLS-1$
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, "Connector request not found. AtomicRequestID=", ari); //$NON-NLS-1$
return false;
}
public void requestClose() throws MetaMatrixComponentException {
synchronized (this) {
if (this.state == ProcessingState.CLOSE || this.closeRequested) {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_DQP, "Request already closing" + requestID); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(com.metamatrix.common.util.LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
+ LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_DQP, "Request already closing" + requestID); //$NON-NLS-1$
}
return;
}
@@ -619,7 +618,7 @@
public void closeAtomicRequest(AtomicRequestID atomicRequestId) {
connectorInfo.remove(atomicRequestId);
- LogManager.logTrace(LogConstants.CTX_DQP, new Object[] {"closed atomic-request:", atomicRequestId}); //$NON-NLS-1$
+ LogManager.logTrace(com.metamatrix.common.util.LogConstants.CTX_DQP, new Object[] {"closed atomic-request:", atomicRequestId}); //$NON-NLS-1$
}
public void addConnectorRequest(AtomicRequestID atomicRequestId, DataTierTupleSource connInfo) {
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/TestConnectorWorkItem.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/TestConnectorWorkItem.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/TestConnectorWorkItem.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -51,7 +51,6 @@
import com.metamatrix.dqp.message.RequestID;
import com.metamatrix.dqp.message.RequestMessage;
import com.metamatrix.dqp.service.TransactionContext;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.platform.security.api.SessionToken;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.parser.QueryParser;
@@ -381,7 +380,7 @@
synchConnectorWorkItem.run();
assertNotNull("Connection should not be null when IsImmutable is true", synchConnectorWorkItem.connection); //$NON-NLS-1$
} catch ( Exception e ) {
- LogManager.logWarning(LogConstants.CTX_CONNECTOR, e.getMessage());
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_CONNECTOR, e.getMessage());
}
}
@@ -417,7 +416,7 @@
synchConnectorWorkItem.run();
assertNull("Connection should be null when IsImmutable is false", synchConnectorWorkItem.connection); //$NON-NLS-1$
} catch ( Exception e ) {
- LogManager.logWarning(LogConstants.CTX_CONNECTOR, e.getMessage());
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_CONNECTOR, e.getMessage());
}
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -80,7 +80,6 @@
import com.metamatrix.dqp.service.BufferService;
import com.metamatrix.dqp.service.SessionService;
import com.metamatrix.dqp.service.TransactionService;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.platform.security.api.ILogon;
import com.metamatrix.platform.security.api.SessionToken;
@@ -119,9 +118,9 @@
// create the necessary services
createClientServices();
- this.csr.registerClientService(ILogon.class, proxyService(ILogon.class, logon), com.metamatrix.common.util.LogConstants.CTX_SERVER);
- this.csr.registerClientService(ClientSideDQP.class, proxyService(ClientSideDQP.class, this.dqpCore), LogConstants.CTX_QUERY_SERVICE);
- this.csr.registerClientService(Admin.class, proxyService(Admin.class, admin), LogConstants.CTX_ADMIN_API);
+ this.csr.registerClientService(ILogon.class, proxyService(ILogon.class, logon), com.metamatrix.common.util.LogConstants.CTX_SESSION);
+ this.csr.registerClientService(ClientSideDQP.class, proxyService(ClientSideDQP.class, this.dqpCore), com.metamatrix.common.util.LogConstants.CTX_DQP);
+ this.csr.registerClientService(Admin.class, proxyService(Admin.class, admin), com.metamatrix.common.util.LogConstants.CTX_ADMIN_API);
if (this.jdbcSocketConfiguration.isEnabled()) {
this.jdbcSocket = new SocketTransport(this.jdbcSocketConfiguration, csr);
@@ -180,7 +179,7 @@
txnService.setTransactionProvider(new ContainerTransactionProvider(terminator));
txnService.setProcessName(processName);
txnService.setXidFactory(new XidFactory());
- return (TransactionService)LogManager.createLoggingProxy(LogConstants.CTX_TXN_LOG, txnService, new Class[] {TransactionService.class}, MessageLevel.DETAIL);
+ return (TransactionService)LogManager.createLoggingProxy(com.metamatrix.common.util.LogConstants.CTX_TXN_LOG, txnService, new Class[] {TransactionService.class}, MessageLevel.DETAIL);
}
private <T> T proxyService(final Class<T> iface, final T instance) {
Modified: trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedPlugin.java
===================================================================
--- trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedPlugin.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedPlugin.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -26,7 +26,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.core.BundleUtil;
-import com.metamatrix.dqp.util.LogConstants;
public class DQPEmbeddedPlugin {
@@ -39,35 +38,35 @@
public static void logError(Exception e, String msg, Object[] args) {
String actualMsg = Util.getString(msg, args);
if (e != null) {
- LogManager.logError(LogConstants.CTX_DQP, e, actualMsg);
+ LogManager.logError(com.metamatrix.common.util.LogConstants.CTX_DQP, e, actualMsg);
}
else {
- LogManager.logError(LogConstants.CTX_DQP, actualMsg);
+ LogManager.logError(com.metamatrix.common.util.LogConstants.CTX_DQP, actualMsg);
}
}
public static void logError(String msg, Object[] args) {
String actualMsg = Util.getString(msg,args);
- LogManager.logError(LogConstants.CTX_DQP, actualMsg);
+ LogManager.logError(com.metamatrix.common.util.LogConstants.CTX_DQP, actualMsg);
}
public static void logWarning(Exception e, String msg, Object[] args) {
String actualMsg = Util.getString(msg,args);
if (e != null) {
- LogManager.logWarning(LogConstants.CTX_DQP, e, actualMsg);
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, e, actualMsg);
}
else {
- LogManager.logWarning(LogConstants.CTX_DQP, actualMsg);
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, actualMsg);
}
}
public static void logWarning(String msg, Object[] args) {
String actualMsg = Util.getString(msg,args);
- LogManager.logWarning(LogConstants.CTX_DQP, actualMsg);
+ LogManager.logWarning(com.metamatrix.common.util.LogConstants.CTX_DQP, actualMsg);
}
public static void logInfo(String msg, Object[] args) {
String actualMsg = Util.getString(msg,args);
- LogManager.logInfo(LogConstants.CTX_DQP, actualMsg);
+ LogManager.logInfo(com.metamatrix.common.util.LogConstants.CTX_DQP, actualMsg);
}
}
Modified: trunk/runtime/src/main/java/org/teiid/logging/Log4JUtil.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/logging/Log4JUtil.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/runtime/src/main/java/org/teiid/logging/Log4JUtil.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -98,26 +98,18 @@
public static Set<String> getContexts(){
HashSet<String> contexts = new HashSet<String>();
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_DQP);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_CONNECTOR);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_BUFFER_MGR);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_STORAGE_MGR);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_TXN_LOG);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_EXTENSION_SOURCE);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_COMMANDLOGGING);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_AUDITLOGGING);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_QUERY_SERVICE);
- contexts.add(ROOT_CONTEXT+com.metamatrix.dqp.util.LogConstants.CTX_PROCESS_INFO_LOG);
-
- contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_CONFIG);
- contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_COMMUNICATION);
- contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_POOLING);
+ contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_DQP);
+ contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_CONNECTOR);
+ contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_BUFFER_MGR);
+ contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_TXN_LOG);
+ contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_COMMANDLOGGING);
+ contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_AUDITLOGGING);
contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_SESSION);
contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_AUTHORIZATION);
contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_MEMBERSHIP);
- contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_AUTHORIZATION_ADMIN_API);
contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_SERVER);
- contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_ADMIN);
+ contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_ADMIN_API);
+ contexts.add(ROOT_CONTEXT+com.metamatrix.common.util.LogConstants.CTX_QUERY_PLANNER);
contexts.add("com.arjuna"); //$NON-NLS-1$
contexts.add("org.jboss"); //$NON-NLS-1$
Modified: trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -62,7 +62,6 @@
import com.metamatrix.core.util.LRUCache;
import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
import com.metamatrix.dqp.service.AuthorizationService;
-import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.platform.security.api.MetaMatrixPrincipal;
import com.metamatrix.platform.security.api.MetaMatrixPrincipalName;
import com.metamatrix.platform.security.api.SessionToken;
@@ -149,7 +148,7 @@
// Audit - request
AuditMessage msg = new AuditMessage( contextName, "getInaccessibleResources-request", caller.getUsername(), resources.toArray(new String[resources.size()])); //$NON-NLS-1$
- LogManager.log(MessageLevel.INFO, LogConstants.CTX_AUDITLOGGING, msg);
+ LogManager.log(MessageLevel.INFO, com.metamatrix.common.util.LogConstants.CTX_AUDITLOGGING, msg);
if (isEntitled()){
return Collections.EMPTY_LIST;
@@ -174,10 +173,10 @@
if (results.isEmpty()) {
msg = new AuditMessage( contextName, "getInaccessibleResources-granted all", caller.getUsername(), resources.toArray(new String[resources.size()])); //$NON-NLS-1$
- LogManager.log(MessageLevel.INFO, LogConstants.CTX_AUDITLOGGING, msg);
+ LogManager.log(MessageLevel.INFO, com.metamatrix.common.util.LogConstants.CTX_AUDITLOGGING, msg);
} else {
msg = new AuditMessage( contextName, "getInaccessibleResources-denied", caller.getUsername(), resources.toArray(new String[resources.size()])); //$NON-NLS-1$
- LogManager.log(MessageLevel.INFO, LogConstants.CTX_AUDITLOGGING, msg);
+ LogManager.log(MessageLevel.INFO, com.metamatrix.common.util.LogConstants.CTX_AUDITLOGGING, msg);
}
return results;
}
Modified: trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -195,6 +195,11 @@
public long getMaxFileSize() {
return maxFileSize;
}
+
+ @ManagementProperty(description="Max open buffer files (default 64)")
+ public void setMaxOpenFiles(int maxOpenFiles) {
+ this.maxOpenFiles = maxOpenFiles;
+ }
@ManagementProperty(description="#The number of batch columns guarenteed to a processing operation. Set this value lower if the workload typically" +
"processes larger numbers of concurrent queries with large intermediate results from operations such as sorting, " +
Modified: trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -208,7 +208,7 @@
newSession.addAttchment("SecurityContext", securityContext);
newSession.addAttchment(VDBMetaData.class, vdb);
newSession.addAttchment(SessionToken.class, new SessionToken(id, userName));
-
+ LogManager.logDetail(LogConstants.CTX_SESSION, new Object[] {"Logon successful for \"", userName, "\" - created SessionID \"", "" + id, "\"" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
this.sessionCache.put(newSession.getSessionId(), newSession);
return newSession;
}
Modified: trunk/runtime/src/main/java/org/teiid/services/TeiidLoginContext.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/TeiidLoginContext.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/runtime/src/main/java/org/teiid/services/TeiidLoginContext.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -59,7 +59,7 @@
public void authenticateUser(String username, Credentials credential, String applicationName, List<String> domains) throws LoginException {
- LogManager.logTrace(LogConstants.CTX_MEMBERSHIP, new Object[] {"authenticateUser", username, applicationName}); //$NON-NLS-1$
+ LogManager.logDetail(LogConstants.CTX_MEMBERSHIP, new Object[] {"authenticateUser", username, applicationName}); //$NON-NLS-1$
final String baseUsername = getBaseUsername(username);
final char[] password = credential.getCredentialsAsCharArray();
@@ -92,10 +92,10 @@
this.loginContext.login();
this.userName = baseUsername+AT+domain;
this.securitydomain = domain;
-
+ LogManager.logDetail(LogConstants.CTX_MEMBERSHIP, new Object[] {"Logon successful for \"", username, "\""}); //$NON-NLS-1$ //$NON-NLS-2$
return;
} catch (LoginException e) {
- LogManager.logDetail(LogConstants.CTX_MEMBERSHIP,e.getMessage());
+ LogManager.logDetail(LogConstants.CTX_MEMBERSHIP,e, e.getMessage());
}
}
throw new LoginException(DQPEmbeddedPlugin.Util.getString("SessionServiceImpl.The_username_0_and/or_password_are_incorrect", username )); //$NON-NLS-1$
Modified: trunk/runtime/src/main/java/org/teiid/transport/LogonImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/LogonImpl.java 2010-03-09 20:21:26 UTC (rev 1952)
+++ trunk/runtime/src/main/java/org/teiid/transport/LogonImpl.java 2010-03-09 22:36:00 UTC (rev 1953)
@@ -39,8 +39,6 @@
import com.metamatrix.api.exception.security.SessionServiceException;
import com.metamatrix.common.api.MMURL;
import com.metamatrix.common.comm.api.ServerConnection;
-import com.metamatrix.common.log.LogManager;
-import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.CoreConstants;
import com.metamatrix.dqp.client.ResultsFuture;
import com.metamatrix.dqp.service.SessionService;
@@ -76,7 +74,6 @@
SessionMetadata sessionInfo = service.createSession(user,credential, applicationName, connProps, adminConnection);
long sessionID = updateDQPContext(sessionInfo, adminConnection);
- LogManager.logDetail(LogConstants.CTX_SESSION, new Object[] {"Logon successful for \"", user, "\" - created SessionID \"", "" + sessionID, "\"" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
if (Boolean.parseBoolean(connProps.getProperty(ServerConnection.LOCAL_CONNECTION))) {
service.setLocalSession(sessionID);
}
14 years, 10 months
teiid SVN: r1952 - in trunk: jboss-integration and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-03-09 15:21:26 -0500 (Tue, 09 Mar 2010)
New Revision: 1952
Modified:
trunk/jboss-integration/pom.xml
trunk/pom.xml
Log:
TEIID-833 fixing build failure
Modified: trunk/jboss-integration/pom.xml
===================================================================
--- trunk/jboss-integration/pom.xml 2010-03-09 19:32:17 UTC (rev 1951)
+++ trunk/jboss-integration/pom.xml 2010-03-09 20:21:26 UTC (rev 1952)
@@ -11,40 +11,6 @@
<version>7.0.0-SNAPSHOT</version>
<description>JBoss specific integration layer for teiid</description>
- <build>
- <testResources>
- <testResource>
- <directory>target/test-classes/jboss-embedded</directory>
- </testResource>
- </testResources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>unpack</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-jboss-embedded</artifactId>
- <type>jar</type>
- <overWrite>true</overWrite>
- <outputDirectory>target/test-classes/jboss-embedded</outputDirectory>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
<dependencies>
<dependency>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-03-09 19:32:17 UTC (rev 1951)
+++ trunk/pom.xml 2010-03-09 20:21:26 UTC (rev 1952)
@@ -329,12 +329,6 @@
<artifactId>teiid-runtime</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-jboss-embedded</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
<!-- External dependencies -->
<dependency>
14 years, 10 months
teiid SVN: r1951 - trunk/build/kit-jboss-container/deploy/teiid.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-03-09 14:32:17 -0500 (Tue, 09 Mar 2010)
New Revision: 1951
Modified:
trunk/build/kit-jboss-container/deploy/teiid/teiid-jboss-beans.xml
Log:
TEIID-833: removing the max open files setting
Modified: trunk/build/kit-jboss-container/deploy/teiid/teiid-jboss-beans.xml
===================================================================
--- trunk/build/kit-jboss-container/deploy/teiid/teiid-jboss-beans.xml 2010-03-09 19:29:44 UTC (rev 1950)
+++ trunk/build/kit-jboss-container/deploy/teiid/teiid-jboss-beans.xml 2010-03-09 19:32:17 UTC (rev 1951)
@@ -62,8 +62,6 @@
<property name="maxProcessingBatchesColumns">128</property>
<!-- Max File size in MB (default 2GB)-->
<property name="maxFileSize">2048</property>
- <!-- Max open buffer files (default 64) -->
- <property name="maxOpenFiles">64</property>
</bean>
<bean name="RuntimeEngineDeployer" class="org.teiid.jboss.deployers.RuntimeEngineDeployer">
14 years, 10 months
teiid SVN: r1950 - trunk/runtime/src/main/resources.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-03-09 14:29:44 -0500 (Tue, 09 Mar 2010)
New Revision: 1950
Modified:
trunk/runtime/src/main/resources/commons-logging.properties
Log:
TEIID-833: updating the package name change
Modified: trunk/runtime/src/main/resources/commons-logging.properties
===================================================================
--- trunk/runtime/src/main/resources/commons-logging.properties 2010-03-09 18:11:28 UTC (rev 1949)
+++ trunk/runtime/src/main/resources/commons-logging.properties 2010-03-09 19:29:44 UTC (rev 1950)
@@ -1,2 +1,2 @@
# overrides the logging in jboss cache and jboss transactions integration code
-org.apache.commons.logging.Log=org.teiid.configuration.CommonsLogManagerAdapter
\ No newline at end of file
+org.apache.commons.logging.Log=org.teiid.logging.CommonsLogManagerAdapter
\ No newline at end of file
14 years, 10 months
teiid SVN: r1949 - in trunk: connector-api/src/main/java/org/teiid/connector/metadata/runtime and 16 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-03-09 13:11:28 -0500 (Tue, 09 Mar 2010)
New Revision: 1949
Added:
trunk/connector-api/src/main/java/org/teiid/logging/
trunk/connector-api/src/main/java/org/teiid/logging/api/
trunk/connector-api/src/main/java/org/teiid/logging/api/AuditMessage.java
trunk/connector-api/src/main/java/org/teiid/logging/api/CommandLogMessage.java
trunk/documentation/server-extensions-guide/src/main/docbook/en-US/content/logging.xml
Removed:
trunk/documentation/server-extensions-guide/src/main/docbook/en-US/content/command-logging.xml
trunk/engine/src/main/java/com/metamatrix/common/application/
trunk/engine/src/main/java/com/metamatrix/dqp/service/AuditMessage.java
trunk/engine/src/main/java/com/metamatrix/dqp/service/CommandLogMessage.java
trunk/engine/src/main/java/com/metamatrix/dqp/service/ConnectorBindingLifeCycleListener.java
trunk/engine/src/main/java/com/metamatrix/dqp/service/ConnectorStatus.java
trunk/engine/src/main/java/com/metamatrix/dqp/service/VDBLifeCycleListener.java
trunk/engine/src/main/java/com/metamatrix/platform/security/api/
trunk/engine/src/main/java/com/metamatrix/server/serverapi/
trunk/engine/src/main/java/com/metamatrix/server/util/
Modified:
trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/AbstractMetadataRecord.java
trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/BaseColumn.java
trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Column.java
trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/ColumnSet.java
trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Datatype.java
trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/ForeignKey.java
trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/KeyRecord.java
trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Procedure.java
trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/ProcedureParameter.java
trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Schema.java
trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Table.java
trunk/documentation/connector-developer-guide/src/main/docbook/en-US/content/introduction.xml
trunk/documentation/server-extensions-guide/pom.xml
trunk/documentation/server-extensions-guide/src/main/docbook/en-US/server_extensions_guide.xml
trunk/engine/src/main/java/com/metamatrix/dqp/service/AuthorizationService.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/validator/AuthorizationValidationVisitor.java
trunk/engine/src/test/java/com/metamatrix/dqp/service/FakeAuthorizationService.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/validator/TestAuthorizationValidationVisitor.java
trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java
Log:
TEIID-667 TEIID-668 updating command and audit log classes/docs
Modified: trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/AbstractMetadataRecord.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/AbstractMetadataRecord.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/AbstractMetadataRecord.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -35,6 +35,8 @@
*/
public abstract class AbstractMetadataRecord implements Serializable {
+ private static final long serialVersionUID = 564092984812414058L;
+
public final static char NAME_DELIM_CHAR = '.';
private static AtomicLong UUID_SEQUENCE = new AtomicLong();
Modified: trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/BaseColumn.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/BaseColumn.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/BaseColumn.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -26,6 +26,8 @@
public abstract class BaseColumn extends AbstractMetadataRecord {
+ private static final long serialVersionUID = 6382258617714856616L;
+
public enum NullType {
No_Nulls {
@Override
Modified: trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Column.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Column.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Column.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -28,6 +28,8 @@
*/
public class Column extends BaseColumn implements Comparable<Column> {
+ private static final long serialVersionUID = -1310120788764453726L;
+
public enum SearchType {
Unsearchable,
Like_Only {
Modified: trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/ColumnSet.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/ColumnSet.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/ColumnSet.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -27,7 +27,9 @@
public class ColumnSet<T extends AbstractMetadataRecord> extends AbstractMetadataRecord {
- private List<Column> columns;
+ private static final long serialVersionUID = -1185104601468519829L;
+
+ private List<Column> columns;
private T parent;
public List<Column> getColumns() {
Modified: trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Datatype.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Datatype.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Datatype.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -25,13 +25,10 @@
import org.teiid.connector.metadata.runtime.BaseColumn.NullType;
import org.teiid.connector.metadata.runtime.Column.SearchType;
-
-
-/**
- * ColumnRecordImpl
- */
public class Datatype extends AbstractMetadataRecord {
+ private static final long serialVersionUID = -7839335802224393230L;
+
public enum Type {
Basic,
UserDefined,
Modified: trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/ForeignKey.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/ForeignKey.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/ForeignKey.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -27,7 +27,9 @@
*/
public class ForeignKey extends KeyRecord {
- private String uniqueKeyID;
+ private static final long serialVersionUID = -8835750783230001311L;
+
+ private String uniqueKeyID;
private KeyRecord primaryKey;
public ForeignKey() {
Modified: trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/KeyRecord.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/KeyRecord.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/KeyRecord.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -24,6 +24,8 @@
public class KeyRecord extends ColumnSet<Table> {
+ private static final long serialVersionUID = -3526999525526556933L;
+
public enum Type {
Primary,
Foreign,
Modified: trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Procedure.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Procedure.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Procedure.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -31,6 +31,8 @@
*/
public class Procedure extends AbstractMetadataRecord {
+ private static final long serialVersionUID = 7714869437683360834L;
+
public enum Type {
Function,
UDF,
Modified: trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/ProcedureParameter.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/ProcedureParameter.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/ProcedureParameter.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -27,6 +27,8 @@
*/
public class ProcedureParameter extends BaseColumn {
+ private static final long serialVersionUID = 3484281155208939073L;
+
public enum Type {
Unknown,
In,
Modified: trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Schema.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Schema.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Schema.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -27,7 +27,9 @@
public class Schema extends AbstractMetadataRecord {
- private boolean physical = true;
+ private static final long serialVersionUID = -5113742472848113008L;
+
+ private boolean physical = true;
private boolean isVisible = true;
private String primaryMetamodelUri = "http://www.metamatrix.com/metamodels/Relational"; //$NON-NLS-1$
Modified: trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Table.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Table.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/Table.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -26,11 +26,10 @@
import java.util.LinkedList;
import java.util.List;
-/**
- * TableRecordImpl
- */
public class Table extends ColumnSet<Schema> {
+ private static final long serialVersionUID = 4891356771125218672L;
+
public enum Type {
Table,
View,
Copied: trunk/connector-api/src/main/java/org/teiid/logging/api/AuditMessage.java (from rev 1941, trunk/engine/src/main/java/com/metamatrix/dqp/service/AuditMessage.java)
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/logging/api/AuditMessage.java (rev 0)
+++ trunk/connector-api/src/main/java/org/teiid/logging/api/AuditMessage.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -0,0 +1,72 @@
+/*
+ * 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.logging.api;
+
+import java.util.Arrays;
+
+/**
+ * Log format for auditing.
+ */
+public class AuditMessage {
+ private String context;
+ private String activity;
+ private String principal;
+ private Object[] resources;
+
+ public AuditMessage(String context, String activity, String principal, String[] resources ) {
+ this.context = context;
+ this.activity = activity;
+ this.principal = principal;
+ this.resources = resources;
+ }
+
+ public String getContext() {
+ return this.context;
+ }
+
+ public String getActivity() {
+ return this.activity;
+ }
+
+ public String getPrincipal() {
+ return this.principal;
+ }
+
+ public Object[] getResources() {
+ return this.resources;
+ }
+
+ public String toString() {
+ StringBuffer msg = new StringBuffer();
+ msg.append(" ["); //$NON-NLS-1$
+ msg.append( getPrincipal() );
+ msg.append("] <"); //$NON-NLS-1$
+ msg.append( getContext() );
+ msg.append('.');
+ msg.append( getActivity() );
+ msg.append("> "); //$NON-NLS-1$
+ msg.append( Arrays.toString(resources) );
+ return msg.toString();
+ }
+
+}
Copied: trunk/connector-api/src/main/java/org/teiid/logging/api/CommandLogMessage.java (from rev 1941, trunk/engine/src/main/java/com/metamatrix/dqp/service/CommandLogMessage.java)
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/logging/api/CommandLogMessage.java (rev 0)
+++ trunk/connector-api/src/main/java/org/teiid/logging/api/CommandLogMessage.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -0,0 +1,215 @@
+/*
+ * 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.logging.api;
+
+import java.text.DateFormat;
+import java.util.Date;
+
+import org.teiid.connector.api.ExecutionContext;
+
+/**
+ * Log Message for source and user command events.
+ */
+public class CommandLogMessage {
+
+ public enum Event {
+ NEW,
+ END,
+ CANCEL,
+ ERROR
+ }
+
+ private boolean source;
+ private Event event;
+ private long timestamp;
+
+ // Transaction info
+ private String transactionID;
+
+ // Session info
+ private String sessionID;
+ private String applicationName;
+ private String principal;
+ private String vdbName;
+ private int vdbVersion;
+
+ // RequestInfo
+ private String requestID;
+ private Long sourceCommandID;
+ private String sql;
+ private Integer rowCount;
+ private String modelName;
+ private String connectorBindingName;
+ private ExecutionContext executionContext;
+
+ public CommandLogMessage(long timestamp,
+ String requestID,
+ String transactionID,
+ String sessionID,
+ String applicationName,
+ String principal,
+ String vdbName,
+ int vdbVersion,
+ String sql) {
+ // userCommandStart
+ this(timestamp, requestID, transactionID, sessionID, principal, vdbName, vdbVersion, null, Event.NEW);
+ this.applicationName = applicationName;
+ this.sql = sql;
+ }
+ public CommandLogMessage(long timestamp,
+ String requestID,
+ String transactionID,
+ String sessionID,
+ String principal,
+ String vdbName,
+ int vdbVersion,
+ Integer finalRowCount,
+ Event event) {
+ // userCommandEnd
+ this.event = event;
+ this.timestamp = timestamp;
+ this.requestID = requestID;
+ this.transactionID = transactionID;
+ this.sessionID = sessionID;
+ this.principal = principal;
+ this.vdbName = vdbName;
+ this.vdbVersion = vdbVersion;
+ this.rowCount = finalRowCount;
+ }
+ public CommandLogMessage(long timestamp,
+ String requestID,
+ long sourceCommandID,
+ String transactionID,
+ String modelName,
+ String connectorBindingName,
+ String sessionID,
+ String principal,
+ String sql,
+ ExecutionContext context) {
+ // dataSourceCommandStart
+ this(timestamp, requestID, sourceCommandID, transactionID, modelName, connectorBindingName, sessionID, principal, null, Event.NEW, context);
+ this.sql = sql;
+ }
+ public CommandLogMessage(long timestamp,
+ String requestID,
+ long sourceCommandID,
+ String transactionID,
+ String modelName,
+ String connectorBindingName,
+ String sessionID,
+ String principal,
+ Integer finalRowCount,
+ Event event,
+ ExecutionContext context) {
+ // dataSourceCommandEnd
+ this.source = true;
+ this.event = event;
+ this.timestamp = timestamp;
+ this.requestID = requestID;
+ this.sourceCommandID = sourceCommandID;
+ this.transactionID = transactionID;
+ this.modelName = modelName;
+ this.connectorBindingName = connectorBindingName;
+ this.sessionID = sessionID;
+ this.principal = principal;
+ this.rowCount = finalRowCount;
+ this.executionContext = context;
+ }
+
+ public String toString() {
+ if (!source && event == Event.NEW) {
+ return "\tSTART USER COMMAND:\tstartTime=" + getTimestampString(new Date(timestamp)) + "\trequestID=" + requestID + "\ttxID=" + transactionID + "\tsessionID=" + sessionID + "\tapplicationName=" + applicationName + "\tprincipal=" + principal + "\tvdbName=" + vdbName + "\tvdbVersion=" + vdbVersion + "\tsql=" + sql; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ }
+ if (!source) {
+ return "\t"+ event +" USER COMMAND:\tendTime=" + getTimestampString(new Date(timestamp)) + "\trequestID=" + requestID + "\ttxID=" + transactionID + "\tsessionID=" + sessionID + "\tprincipal=" + principal + "\tvdbName=" + vdbName + "\tvdbVersion=" + vdbVersion + "\tfinalRowCount=" + rowCount; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ }
+ if (event == Event.NEW) {
+ return "\tSTART DATA SRC COMMAND:\tstartTime=" + getTimestampString(new Date(timestamp)) + "\trequestID=" + requestID + "\tsourceCommandID="+ sourceCommandID + "\ttxID=" + transactionID + "\tmodelName="+ modelName + "\tconnectorBindingName=" + connectorBindingName + "\tsessionID=" + sessionID + "\tprincipal=" + principal + "\tsql=" + sql; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ }
+ return "\t"+ event +" SRC COMMAND:\tendTime=" + getTimestampString(new Date(timestamp)) + "\trequestID=" + requestID + "\tsourceCommandID="+ sourceCommandID + "\ttxID=" + transactionID + "\tmodelName="+ modelName + "\tconnectorBindingName=" + connectorBindingName + "\tsessionID=" + sessionID + "\tprincipal=" + principal + "\tfinalRowCount=" + rowCount; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ }
+
+ private String getTimestampString(Date date) {
+ return DateFormat.getDateInstance().format(date);
+ }
+ public long getTimestamp() {
+ return timestamp;
+ }
+ public String getTransactionID() {
+ return transactionID;
+ }
+ public String getSessionID() {
+ return sessionID;
+ }
+ public String getApplicationName() {
+ return applicationName;
+ }
+ public String getPrincipal() {
+ return principal;
+ }
+ public String getVdbName() {
+ return vdbName;
+ }
+ public int getVdbVersion() {
+ return vdbVersion;
+ }
+ public String getRequestID() {
+ return requestID;
+ }
+ public Long getSourceCommandID() {
+ return sourceCommandID;
+ }
+ /**
+ * Returns the command. Only valid for {@link Event#NEW}
+ * @return
+ */
+ public String getSql() {
+ return sql;
+ }
+ /**
+ * Returns the command. Only valid for {@link Event#END}
+ * @return
+ */
+ public Integer getRowCount() {
+ return rowCount;
+ }
+ public String getModelName() {
+ return modelName;
+ }
+ public String getConnectorBindingName() {
+ return connectorBindingName;
+ }
+ public Event getStatus() {
+ return event;
+ }
+ public boolean isSource() {
+ return source;
+ }
+ /**
+ * Only available for source commands
+ * @return
+ */
+ public ExecutionContext getExecutionContext() {
+ return executionContext;
+ }
+}
Modified: trunk/documentation/connector-developer-guide/src/main/docbook/en-US/content/introduction.xml
===================================================================
--- trunk/documentation/connector-developer-guide/src/main/docbook/en-US/content/introduction.xml 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/documentation/connector-developer-guide/src/main/docbook/en-US/content/introduction.xml 2010-03-09 18:11:28 UTC (rev 1949)
@@ -1,8 +1,8 @@
<chapter id="introduction">
<title>Connectors in Teiid</title>
- <para>In Teiid a connector handles all communications with individual enterprise information sources, which can include
- databases, data feeds, flat files, or any other entity you have modeled.</para>
- <para>In Teiid, a connector is used to:</para>
+ <para>A connector handles all communications with individual enterprise information sources, which can include
+ databases, data feeds, flat files, etc.</para>
+ <para>A connector is used to:</para>
<itemizedlist>
<listitem>
<para>Translate a Teiid-specific command into a native command.</para>
@@ -11,7 +11,7 @@
<para>Execute the command.</para>
</listitem>
<listitem>
- <para>Return batches of results to Teiid.</para>
+ <para>Return batches of results.</para>
</listitem>
</itemizedlist>
<para>Teiid is responsible for reassembling the results from one or more connectors into an
@@ -24,7 +24,7 @@
</para>
<sect1>
<title>Do You Need a New Connector?</title>
- <para>Teiid can provide several connectors for common enterprise information system types. If
+ <para>Teiid provides several connectors for common enterprise information system types. If
you can use one of these enterprise information systems, you do not need to develop a custom one.
</para>
<para>Teiid offers the following connectors:</para>
@@ -33,7 +33,7 @@
<para>
<emphasis>JDBC:</emphasis>
Connects to many relational databases. The JDBC Connector is validated against the following database
- systems: Oracle, Microsoft SQL Server, IBM DB2, MySQL, Postgres, Derby, and Sybase. In addition, the JDBC Connector can
+ systems: Oracle, Microsoft SQL Server, IBM DB2, MySQL, Postgres, Derby, Sybase, H2, and HSQL. In addition, the JDBC Connector can
often be used with other 3rd-party drivers and provides a wide range of extensibility options to
specialize behavior against those drivers.
</para>
@@ -82,14 +82,11 @@
<para>Expectation for incoming queries/metadata</para>
</listitem>
<listitem>
- <para>The SQL and processing constructs supported by information system.</para>
+ <para>The processing constructs, or capabilities, supported by information system.</para>
</listitem>
<listitem>
<para>Required properties for the connector, such as URL, user name, etc.</para>
</listitem>
- <listitem>
- <para>The CDK development kit (jars and tools).</para>
- </listitem>
</itemizedlist>
</listitem>
<listitem>
Modified: trunk/documentation/server-extensions-guide/pom.xml
===================================================================
--- trunk/documentation/server-extensions-guide/pom.xml 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/documentation/server-extensions-guide/pom.xml 2010-03-09 18:11:28 UTC (rev 1949)
@@ -45,7 +45,7 @@
<format>
<formatName>pdf</formatName>
<stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
- <finalName>membership_domain_guide.pdf</finalName>
+ <finalName>server_extensions_guide.pdf</finalName>
</format>
<!-- <format>
<formatName>html_single</formatName>
Deleted: trunk/documentation/server-extensions-guide/src/main/docbook/en-US/content/command-logging.xml
===================================================================
--- trunk/documentation/server-extensions-guide/src/main/docbook/en-US/content/command-logging.xml 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/documentation/server-extensions-guide/src/main/docbook/en-US/content/command-logging.xml 2010-03-09 18:11:28 UTC (rev 1949)
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<chapter id="Command_logging">
- <title>Command Logging</title>
- <para>Commaand logger lets the user capture the commands that are being executed in the Teiid System
- at the user level as well the at the data source level. The user commands are commands that have been submitted
- to the system and data source commands are those that are being executed by the connectors</para>
- <para>Users have the ability to capture command logging information in a log file, saved to a user-specified
- location. If a custom command logger is in use, command logging information will no longer be logged to the
- repository tables. Users and administrators must choose between the default logging to the Teiid
- Repository and custom command logging.</para>
- <sect1>
- <title>Command Logging API</title>
- <para>
- Command Logging is defined by interface com.metamatrix.dqp.spi.CommandLoggerSPI
- administrators and users can write their own Java implementation of this interface and plug it into
- Teiid by supplying the fully-qualified classname as the value of the
- metamatrix.server.commandLoggerClassname system property.
- </para>
- <para>Users must also add the implementation class file to the classpath of the Teiid System. This
- can be done by creating a jar file, adding it to the /lib/patches directory section, and doing a full stop
- and restart of the server.</para>
- <para>A user’s CommandLogger implementation may require its own property names and values. Add these
- name/value pairs as a semicolon-delimited list after the command logger classname property in the Teiid
- Console. For example, a user might need to place a value such as this into the Console system property:
- </para>
- <programlisting><![CDATA[
-com.myCode.MyClass;metamatrix.transaction.log.storeMMCMD=true;metamatrix.transaction.log.storeSRCCMD=true;myCustomProperty1=MyValue1;
- ]]></programlisting>
- <para>The first part of this string tells Teiid what class it needs to load and instantiate. The other
- two parts of the string (delimited by semicolons), are a couple of name/value pairs that will be passed to
- the newly-instantiated Command Logger.</para>
- <para>The system properties "metamatrix.transaction.log.storeMMCMD" and
- "metamatrix.transaction.log.storeSRCCMD" control whether to send the custom logger user level command and
- source level commands respectively.</para>
- <note>
- <para>Teiid has provided a sample implementation of the SPI that logs to a file. Supply the
- following text for the "metamatrix.server.commandLoggerClassname" property in the Console to enable it</para>
- <programlisting><![CDATA[
- com.metamatrix.dqp.spi.basic.FileCommandLogger;dqp.commandLogger.fileName=commandLogFile.txt
- ]]></programlisting>
- <para>This means that an instance of the class FileCommandLogger will be used by the new Tracking Service
- implementation. The FileCommandLogger is expecting a filename property called dqp.commandLogger.fileName to
- be passed to it, and the value of that property is commandLogFile.txt.</para>
- </note>
- </sect1>
-
-</chapter>
\ No newline at end of file
Copied: trunk/documentation/server-extensions-guide/src/main/docbook/en-US/content/logging.xml (from rev 1941, trunk/documentation/server-extensions-guide/src/main/docbook/en-US/content/command-logging.xml)
===================================================================
--- trunk/documentation/server-extensions-guide/src/main/docbook/en-US/content/logging.xml (rev 0)
+++ trunk/documentation/server-extensions-guide/src/main/docbook/en-US/content/logging.xml 2010-03-09 18:11:28 UTC (rev 1949)
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % CustomDTD SYSTEM "../../../../../../docbook/custom.dtd">
+%CustomDTD;
+]>
+<chapter id="logging">
+ <title>Logging</title>
+ <sect1 id="general_logging">
+ <title>General Logging</title>
+ <para>
+ The Teiid system provides a wealth of information via logging. To
+ control logging level, contexts, and log locations, you should be
+ familiar with
+ <ulink url="http://logging.apache.org/log4j/">log4j</ulink>
+ and the container's jboss-log4j.xml configuration file. All the logs
+ produced by Teiid are prefixed by org.teiid. This makes it extremely
+ easy to control of of Teiid logging from a single context.
+ </para>
+ <sect2>
+ <title>Command Logging API</title>
+ <para>
+ If the default log4j logging mechanisms are not sufficient for your
+ logging needs you may need a appender - see
+ <ulink url="http://logging.apache.org/log4j/1.2/apidocs/index.html">the log4j javadocs</ulink>
+ . Note that log4j already provides quite a few appenders including
+ JMS, RDBMS, and SMTP.
+ </para>
+ <para>If you develop a custom logging solution, the implementation
+ jar should be placed in the lib directory of the server profile
+ Teiid is installed in.
+ </para>
+ </sect2>
+ </sect1>
+ <sect1>
+ <title>Command Logging</title>
+ <para>Command logging captures executing commands in the
+ Teiid System.
+ Both user commands (that have been submitted
+ to Teiid)
+ and data source
+ commands (that are being executed by the
+ connectors)
+ are tracked
+ through command logging.</para>
+ <para>To enable command logging to the default log location, simply
+ enable the DETAIL level of logging for the org.teiid.COMMAND_LOG
+ context.</para>
+ <para>To enable command logging to an alternative file location,
+ configure a separate file appender for the DETAIL logging of the
+ org.teiid.COMMAND_LOG context. An example of this is already in
+ the log4j.xml distributed with Teiid.</para>
+ <sect2>
+ <title>Command Logging API</title>
+ <para>
+ If the default log4j logging mechanisms are not sufficient for
+ your
+ command logging needs, you may need a custom log4j appender.
+ The
+ custom appender will have access to log4j LoggingEvents to the
+ COMMAND_LOG context, which have a
+ message that is an instance of
+ org.teiid.logging.api.CommandLogMessage (defined in the teiid-connector-api-&versionNumber;.jar).
+ </para>
+ <para>
+ See
+ <link linkend="general_logging">General Logging</link>
+ for more information on utilizing log4j.
+ </para>
+ </sect2>
+ </sect1>
+ <sect1>
+ <title>Audit Logging</title>
+ <para>Audit logging captures important security events. This includes
+ the enforcement of permissions, authentication success/failures, etc.
+ </para>
+ <para>To enable audit logging to the default log location, simply
+ enable the DETAIL level of logging for the org.teiid.AUDIT_LOG
+ context.</para>
+ <para>To enable audit logging to an alternative file location,
+ configure a separate file appender for the DETAIL logging of the
+ org.teiid.AUDIT_LOG context. An example of this is already in
+ the
+ log4j.xml distributed with Teiid.</para>
+ <sect2>
+ <title>Audit Logging API</title>
+ <para>
+ If the default log4j logging mechanisms are not sufficient for
+ your
+ audit logging needs, you may need a custom log4j appender.
+ The
+ custom appender will have access to log4j LoggingEvents to the
+ AUDIT_LOG context, which have a
+ message that is an instance of
+ org.teiid.logging.api.AuditMessage (defined in the teiid-connector-api-&versionNumber;.jar). AuditMessages include
+ information about user, the action, and the target(s) of the action.
+ </para>
+ <para>
+ See
+ <link linkend="general_logging">General Logging</link>
+ for more information on utilizing log4j.
+ </para>
+ </sect2>
+ </sect1>
+</chapter>
\ No newline at end of file
Modified: trunk/documentation/server-extensions-guide/src/main/docbook/en-US/server_extensions_guide.xml
===================================================================
--- trunk/documentation/server-extensions-guide/src/main/docbook/en-US/server_extensions_guide.xml 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/documentation/server-extensions-guide/src/main/docbook/en-US/server_extensions_guide.xml 2010-03-09 18:11:28 UTC (rev 1949)
@@ -46,10 +46,10 @@
<toc/>
<xi:include href="content/introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="content/logging.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/security.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/custom-membership.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/appendix-a.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="content/command-logging.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</book>
Deleted: trunk/engine/src/main/java/com/metamatrix/dqp/service/AuditMessage.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/service/AuditMessage.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/service/AuditMessage.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -1,123 +0,0 @@
-/*
- * 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 com.metamatrix.dqp.service;
-
-
-public class AuditMessage {
- private static final String RESOURCE_DELIMITER = ", "; //$NON-NLS-1$
-
- private String context;
- private String activity;
- private String principal;
- private Object[] resources;
-
- public AuditMessage(String context, String activity, String principal, Object[] resources ) {
- this.context = context;
- this.activity = activity;
- this.principal = principal;
- this.resources = resources;
- }
-
- public String getContext() {
- return this.context;
- }
-
- public String getActivity() {
- return this.activity;
- }
-
- public String getPrincipal() {
- return this.principal;
- }
-
- public Object[] getResources() {
- return this.resources;
- }
-
- public String getText() {
- StringBuffer text = new StringBuffer();
- if(resources != null && resources.length > 0 ) {
- Object resource = resources[0];
- if ( resource != null ) {
- text.append(resource.toString());
- }
- for(int i=1; i<resources.length; ++i) {
- text.append(RESOURCE_DELIMITER);
- resource = resources[i];
- if ( resource != null ) {
- text.append(resource.toString());
- }
- }
- }
- return text.toString();
- }
-
- public String getText( String delimiter ) {
- StringBuffer text = new StringBuffer();
- if ( delimiter != null ) {
- if(resources != null && resources.length > 0 ) {
- Object resource = resources[0];
- if ( resource != null ) {
- text.append(resource.toString());
- }
- for(int i=1; i<resources.length; ++i) {
- text.append(delimiter);
- resource = resources[i];
- if ( resource != null ) {
- text.append(resource.toString());
- }
- }
- }
- } else {
- if(resources != null && resources.length > 0 ) {
- Object resource = resources[0];
- if ( resource != null ) {
- text.append(resource.toString());
- }
- for(int i=1; i<resources.length; ++i) {
- text.append(RESOURCE_DELIMITER);
- resource = resources[i];
- if ( resource != null ) {
- text.append(resource.toString());
- }
- }
- }
- }
- return text.toString();
- }
-
- public String toString() {
- StringBuffer msg = new StringBuffer();
- msg.append(" ["); //$NON-NLS-1$
- msg.append( getPrincipal() );
- msg.append("] <"); //$NON-NLS-1$
- msg.append( getContext() );
- msg.append('.');
- msg.append( getActivity() );
- msg.append("> "); //$NON-NLS-1$
- msg.append( getText() );
-
- return msg.toString();
- }
-
-}
Modified: trunk/engine/src/main/java/com/metamatrix/dqp/service/AuthorizationService.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/service/AuthorizationService.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/service/AuthorizationService.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -43,11 +43,13 @@
public static final int ACTION_UPDATE = 2;
public static final int ACTION_DELETE = 3;
- public static final int CONTEXT_QUERY = 0;
- public static final int CONTEXT_INSERT = 1;
- public static final int CONTEXT_UPDATE = 2;
- public static final int CONTEXT_DELETE = 3;
- public static final int CONTEXT_PROCEDURE = 4;
+ public enum Context {
+ QUERY,
+ INSERT,
+ UPDATE,
+ DELETE,
+ STORED_PROCEDURE;
+ }
public static final String ENTITELEMENTS_ENABLED = "auth.check_entitlements"; //$NON-NLS-1$
public static final String ADMIN_ROLES_FILE = "auth.adminRolesFile"; //$NON-NLS-1$
@@ -61,7 +63,7 @@
* @return Collection Subset of resources
* @throws MetaMatrixComponentException If an error occurs in the service while checking resources
*/
- Collection getInaccessibleResources(int action, Collection resources, int context) throws MetaMatrixComponentException;
+ Collection getInaccessibleResources(int action, Collection resources, Context context) throws MetaMatrixComponentException;
/**
* Determine whether entitlements checking is enabled on the server.
Deleted: trunk/engine/src/main/java/com/metamatrix/dqp/service/CommandLogMessage.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/service/CommandLogMessage.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/service/CommandLogMessage.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -1,190 +0,0 @@
-/*
- * 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 com.metamatrix.dqp.service;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.teiid.connector.api.ExecutionContext;
-
-
-
-public class CommandLogMessage {
-
- static final int USER_COMMAND_START = 0;
- static final int USER_COMMAND_END = 1;
- static final int DATASOURCE_COMMAND_START = 2;
- static final int DATASOURCE_COMMAND_END = 3;
-
- public static final short CMD_POINT_BEGIN = 1;
- public static final short CMD_POINT_END = 2;
-
- public static final short CMD_STATUS_NEW = 1;
- public static final short CMD_STATUS_END = 2;
- public static final short CMD_STATUS_CANCEL = 3;
- public static final short CMD_STATUS_ERROR = 4;
-
- private static final String TIMESTAMP_FORMAT = "yyyy.MM.dd HH:mm:ss.SSS"; //$NON-NLS-1$
- private static DateFormat TIMESTAMP_FORMATTER = new SimpleDateFormat(TIMESTAMP_FORMAT);
-
- int type;
- long timestamp;
-
- // Transaction info
- String transactionID;
- String subTransactionID;
- boolean isCommit;
-
- // Session info
- String sessionID;
- String applicationName;
- String principal;
- String vdbName;
- int vdbVersion;
-
- // RequestInfo
- String requestID;
- long sourceCommandID;
- String sql;
- int rowCount;
- String modelName;
- String connectorBindingName;
- boolean isCancelled;
- boolean errorOccurred;
- ExecutionContext executionContext;
-
-
- public CommandLogMessage(long timestamp,
- String requestID,
- String transactionID,
- String sessionID,
- String applicationName,
- String principal,
- String vdbName,
- int vdbVersion,
- String sql) {
- // userCommandStart
- this.type = USER_COMMAND_START;
- this.timestamp = timestamp;
- this.requestID = requestID;
- this.transactionID = transactionID;
- this.sessionID = sessionID;
- this.applicationName = applicationName;
- this.principal = principal;
- this.vdbName = vdbName;
- this.vdbVersion = vdbVersion;
- this.sql = sql;
- }
- public CommandLogMessage(long timestamp,
- String requestID,
- String transactionID,
- String sessionID,
- String principal,
- String vdbName,
- int vdbVersion,
- int finalRowCount,
- boolean isCancelled,
- boolean errorOccurred) {
- // userCommandEnd
- this.type = USER_COMMAND_END;
- this.timestamp = timestamp;
- this.requestID = requestID;
- this.transactionID = transactionID;
- this.sessionID = sessionID;
- this.principal = principal;
- this.vdbName = vdbName;
- this.vdbVersion = vdbVersion;
- this.rowCount = finalRowCount;
- this.isCancelled = isCancelled;
- this.errorOccurred = errorOccurred;
- }
- public CommandLogMessage(long timestamp,
- String requestID,
- long sourceCommandID,
- String subTransactionID,
- String modelName,
- String connectorBindingName,
- String sessionID,
- String principal,
- String sql,
- ExecutionContext context) {
- // dataSourceCommandStart
- this.type = DATASOURCE_COMMAND_START;
- this.timestamp = timestamp;
- this.requestID = requestID;
- this.sourceCommandID = sourceCommandID;
- this.subTransactionID = subTransactionID;
- this.modelName = modelName;
- this.connectorBindingName = connectorBindingName;
- this.sessionID = sessionID;
- this.principal = principal;
- this.sql = sql;
- this.executionContext = context;
- }
- public CommandLogMessage(long timestamp,
- String requestID,
- long sourceCommandID,
- String subTransactionID,
- String modelName,
- String connectorBindingName,
- String sessionID,
- String principal,
- int finalRowCount,
- boolean isCancelled,
- boolean errorOccurred,
- ExecutionContext context) {
- // dataSourceCommandEnd
- this.type = DATASOURCE_COMMAND_END;
- this.timestamp = timestamp;
- this.requestID = requestID;
- this.sourceCommandID = sourceCommandID;
- this.subTransactionID = subTransactionID;
- this.modelName = modelName;
- this.connectorBindingName = connectorBindingName;
- this.sessionID = sessionID;
- this.principal = principal;
- this.rowCount = finalRowCount;
- this.isCancelled = isCancelled;
- this.errorOccurred = errorOccurred;
- this.executionContext = context;
- }
-
- public String toString() {
- switch (this.type) {
- case USER_COMMAND_START:
- return getTimestampString(new Date()) + "\tSTART USER COMMAND:\tstartTime=" + getTimestampString(new Date(timestamp)) + "\trequestID=" + requestID + "\ttxID=" + transactionID + "\tsessionID=" + sessionID + "\tapplicationName=" + applicationName + "\tprincipal=" + principal + "\tvdbName=" + vdbName + "\tvdbVersion=" + vdbVersion + "\tsql=" + sql; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
- case USER_COMMAND_END:
- return getTimestampString(new Date()) + "\tEND USER COMMAND:\tendTime=" + getTimestampString(new Date(timestamp)) + "\trequestID=" + requestID + "\ttxID=" + transactionID + "\tsessionID=" + sessionID + "\tprincipal=" + principal + "\tvdbName=" + vdbName + "\tvdbVersion=" + vdbVersion + "\tfinalRowCount=" + rowCount + "\tisCancelled=" + isCancelled + "\terrorOccurred=" + errorOccurred; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- case DATASOURCE_COMMAND_START:
- return getTimestampString(new Date()) + "\tSTART DATA SRC COMMAND:\tstartTime=" + getTimestampString(new Date(timestamp)) + "\trequestID=" + requestID + "\tsourceCommandID="+ sourceCommandID + "\tsubTxID=" + subTransactionID + "\tmodelName="+ modelName + "\tconnectorBindingName=" + connectorBindingName + "\tsessionID=" + sessionID + "\tprincipal=" + principal + "\tsql=" + sql; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
- case DATASOURCE_COMMAND_END:
- return getTimestampString(new Date()) + "\tEND DATA SRC COMMAND:\tendTime=" + getTimestampString(new Date(timestamp)) + "\trequestID=" + requestID + "\tsourceCommandID="+ sourceCommandID + "\tsubTxID=" + subTransactionID + "\tmodelName="+ modelName + "\tconnectorBindingName=" + connectorBindingName + "\tsessionID=" + sessionID + "\tprincipal=" + principal + "\tfinalRowCount=" + rowCount + "\tisCancelled=" + isCancelled + "\terrorOccurred=" + errorOccurred; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
- }
- return null;
- }
-
- private String getTimestampString(Date date) {
- return TIMESTAMP_FORMATTER.format(date);
- }
-}
Deleted: trunk/engine/src/main/java/com/metamatrix/dqp/service/ConnectorBindingLifeCycleListener.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/service/ConnectorBindingLifeCycleListener.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/service/ConnectorBindingLifeCycleListener.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -1,42 +0,0 @@
-/*
- * 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 com.metamatrix.dqp.service;
-
-
-/**
- * A listerner object for listening the connector bindings adding deleting
- */
-public interface ConnectorBindingLifeCycleListener {
-
- /**
- * Connector Binding Loaded
- * @param bindingName
- */
- public void loaded(String bindingName);
-
- /**
- * Connector Binding Un-Loaded
- * @param bindingName
- */
- public void unloaded(String bindingName);
-}
Deleted: trunk/engine/src/main/java/com/metamatrix/dqp/service/ConnectorStatus.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/service/ConnectorStatus.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/service/ConnectorStatus.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -1,26 +0,0 @@
-/*
- * 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 com.metamatrix.dqp.service;
-
-public enum ConnectorStatus {
- NOT_INITIALIZED, INIT_FAILED, OPEN, DATA_SOURCE_UNAVAILABLE, CLOSED, UNABLE_TO_CHECK;
-}
Deleted: trunk/engine/src/main/java/com/metamatrix/dqp/service/VDBLifeCycleListener.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/service/VDBLifeCycleListener.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/service/VDBLifeCycleListener.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -1,45 +0,0 @@
-/*
- * 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 com.metamatrix.dqp.service;
-
-
-/**
- * A listener object for listening for the life cycle events for the VDB
- * @since 4.3
- */
-public interface VDBLifeCycleListener {
-
- /**
- * A new VDB is loaded/added to the system
- * @param vdbName - name of the VDB
- * @param vdbVersion - version of the VDB
- */
- public void loaded(String vdbName, String vdbVersion);
-
- /**
- * VDB is unloaded/deleted from the system
- * @param vdbName - name of the VDB
- * @param vdbVersion - version of the VDB
- */
- public void unloaded(String vdbName, String vdbVersion);
-}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -54,6 +54,8 @@
import org.teiid.connector.metadata.runtime.MetadataStore;
import org.teiid.dqp.internal.cache.DQPContextCache;
import org.teiid.dqp.internal.datamgr.CapabilitiesConverter;
+import org.teiid.logging.api.CommandLogMessage;
+import org.teiid.logging.api.CommandLogMessage.Event;
import org.teiid.security.SecurityHelper;
import com.metamatrix.common.comm.api.ResultsReceiver;
@@ -66,8 +68,6 @@
import com.metamatrix.dqp.message.AtomicRequestMessage;
import com.metamatrix.dqp.message.AtomicResultsMessage;
import com.metamatrix.dqp.service.BufferService;
-import com.metamatrix.dqp.service.CommandLogMessage;
-import com.metamatrix.dqp.service.ConnectorStatus;
import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.optimizer.capabilities.BasicSourceCapabilities;
import com.metamatrix.query.optimizer.capabilities.SourceCapabilities;
@@ -81,6 +81,10 @@
@ManagementObject(isRuntime=true, componentType=@ManagementComponent(type="teiid",subtype="connectormanager"), properties=ManagementProperties.EXPLICIT)
public class ConnectorManager {
+ public enum ConnectorStatus {
+ NOT_INITIALIZED, INIT_FAILED, OPEN, DATA_SOURCE_UNAVAILABLE, CLOSED, UNABLE_TO_CHECK;
+ }
+
public static final int DEFAULT_MAX_THREADS = 20;
private String connectorName;
@@ -334,12 +338,12 @@
* Add begin point to transaction monitoring table.
* @param qr Request that contains the MetaMatrix command information in the transaction.
*/
- void logSRCCommand(AtomicRequestMessage qr, ExecutionContext context, short cmdStatus, int finalRowCnt) {
+ void logSRCCommand(AtomicRequestMessage qr, ExecutionContext context, Event cmdStatus, Integer finalRowCnt) {
if (!LogManager.isMessageToBeRecorded(LogConstants.CTX_COMMANDLOGGING, MessageLevel.INFO)) {
return;
}
String sqlStr = null;
- if(cmdStatus == CommandLogMessage.CMD_STATUS_NEW){
+ if(cmdStatus == Event.NEW){
Command cmd = qr.getCommand();
sqlStr = cmd != null ? cmd.toString() : null;
}
@@ -352,23 +356,14 @@
String modelName = qr.getModelName();
AtomicRequestID id = qr.getAtomicRequestID();
- short cmdPoint = cmdStatus == CommandLogMessage.CMD_STATUS_NEW ? CommandLogMessage.CMD_POINT_BEGIN : CommandLogMessage.CMD_POINT_END;
String principal = userName == null ? "unknown" : userName; //$NON-NLS-1$
CommandLogMessage message = null;
- if (cmdPoint == CommandLogMessage.CMD_POINT_BEGIN) {
+ if (cmdStatus == Event.NEW) {
message = new CommandLogMessage(System.currentTimeMillis(), qr.getRequestID().toString(), id.getNodeID(), transactionID, modelName, connectorName, qr.getWorkContext().getConnectionID(), principal, sqlStr, context);
}
else {
- boolean isCancelled = false;
- boolean errorOccurred = false;
-
- if (cmdStatus == CommandLogMessage.CMD_STATUS_CANCEL) {
- isCancelled = true;
- } else if (cmdStatus == CommandLogMessage.CMD_STATUS_ERROR) {
- errorOccurred = true;
- }
- message = new CommandLogMessage(System.currentTimeMillis(), qr.getRequestID().toString(), id.getNodeID(), transactionID, modelName, connectorName, qr.getWorkContext().getConnectionID(), principal, finalRowCnt, isCancelled, errorOccurred, context);
+ message = new CommandLogMessage(System.currentTimeMillis(), qr.getRequestID().toString(), id.getNodeID(), transactionID, modelName, connectorName, qr.getWorkContext().getConnectionID(), principal, finalRowCnt, cmdStatus, context);
}
LogManager.log(MessageLevel.DETAIL, LogConstants.CTX_COMMANDLOGGING, message);
}
@@ -400,7 +395,7 @@
private void checkStatus() throws ConnectorException {
if (this.state != ConnectorStatus.OPEN) {
- throw new ConnectorException(DQPPlugin.Util.getString("ConnectorManager.not_in_valid_state", this.connectorName));
+ throw new ConnectorException(DQPPlugin.Util.getString("ConnectorManager.not_in_valid_state", this.connectorName)); //$NON-NLS-1$
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorWorkItem.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorWorkItem.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -46,6 +46,8 @@
import org.teiid.dqp.internal.datamgr.metadata.RuntimeMetadataImpl;
import org.teiid.dqp.internal.process.AbstractWorkItem;
import org.teiid.dqp.internal.process.DQPWorkContext;
+import org.teiid.logging.api.CommandLogMessage;
+import org.teiid.logging.api.CommandLogMessage.Event;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MetaMatrixProcessingException;
@@ -59,7 +61,6 @@
import com.metamatrix.dqp.message.AtomicRequestID;
import com.metamatrix.dqp.message.AtomicRequestMessage;
import com.metamatrix.dqp.message.AtomicResultsMessage;
-import com.metamatrix.dqp.service.CommandLogMessage;
import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.metadata.TempMetadataAdapter;
@@ -198,7 +199,7 @@
try {
LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.id, "Processing CANCEL request"}); //$NON-NLS-1$
asynchCancel();
- this.manager.logSRCCommand(this.requestMsg, this.securityContext, CommandLogMessage.CMD_STATUS_CANCEL, -1);
+ this.manager.logSRCCommand(this.requestMsg, this.securityContext, Event.CANCEL, -1);
} catch (ConnectorException e) {
LogManager.logWarning(LogConstants.CTX_CONNECTOR, e, DQPPlugin.Util.getString("Cancel_request_failed", this.id)); //$NON-NLS-1$
} finally {
@@ -227,7 +228,7 @@
if (t instanceof RuntimeException && t.getCause() != null) {
t = t.getCause();
}
- manager.logSRCCommand(this.requestMsg, this.securityContext, CommandLogMessage.CMD_STATUS_ERROR, -1);
+ manager.logSRCCommand(this.requestMsg, this.securityContext, Event.ERROR, null);
String msg = DQPPlugin.Util.getString("ConnectorWorker.process_failed", this.id); //$NON-NLS-1$
if (isCancelled.get()) {
@@ -250,7 +251,7 @@
this.isClosed = true;
LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.id, "Processing Close :", this.requestMsg.getCommand()}); //$NON-NLS-1$
if (success) {
- manager.logSRCCommand(this.requestMsg, this.securityContext, CommandLogMessage.CMD_STATUS_END, this.rowCount);
+ manager.logSRCCommand(this.requestMsg, this.securityContext, Event.END, this.rowCount);
}
try {
if (execution != null) {
@@ -357,7 +358,7 @@
LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.requestMsg.getAtomicRequestID(), "Obtained execution"}); //$NON-NLS-1$
//Log the Source Command (Must be after obtaining the execution context)
- manager.logSRCCommand(this.requestMsg, this.securityContext, CommandLogMessage.CMD_STATUS_NEW, -1);
+ manager.logSRCCommand(this.requestMsg, this.securityContext, Event.NEW, null);
}
protected void handleBatch()
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -47,6 +47,8 @@
import org.teiid.adminapi.impl.WorkerPoolStatisticsMetadata;
import org.teiid.dqp.internal.cache.DQPContextCache;
import org.teiid.dqp.internal.datamgr.impl.ConnectorManagerRepository;
+import org.teiid.logging.api.CommandLogMessage;
+import org.teiid.logging.api.CommandLogMessage.Event;
import org.teiid.security.SecurityHelper;
import com.metamatrix.api.exception.MetaMatrixComponentException;
@@ -74,7 +76,6 @@
import com.metamatrix.dqp.message.ResultsMessage;
import com.metamatrix.dqp.service.AuthorizationService;
import com.metamatrix.dqp.service.BufferService;
-import com.metamatrix.dqp.service.CommandLogMessage;
import com.metamatrix.dqp.service.SessionService;
import com.metamatrix.dqp.service.TransactionContext;
import com.metamatrix.dqp.service.TransactionService;
@@ -299,7 +300,7 @@
ResultsFuture<ResultsMessage> resultsFuture = new ResultsFuture<ResultsMessage>();
RequestWorkItem workItem = new RequestWorkItem(this, requestMsg, request, resultsFuture.getResultsReceiver(), requestID, workContext);
- logMMCommand(workItem, true, false, 0);
+ logMMCommand(workItem, Event.NEW, null);
addRequest(requestID, workItem, state);
this.addWork(workItem);
@@ -458,7 +459,7 @@
markCancelled = workItem.requestCancel();
}
if (markCancelled) {
- logMMCommand(workItem, false, true, 0);
+ logMMCommand(workItem, Event.CANCEL, null);
} else {
LogManager.logDetail(LogConstants.CTX_DQP, DQPPlugin.Util.getString("DQPCore.failed_to_cancel")); //$NON-NLS-1$
}
@@ -561,7 +562,7 @@
this.transactionService.terminateTransaction(xid);
}
- void logMMCommand(RequestWorkItem workItem, boolean isBegin, boolean isCancel, int rowCount) {
+ void logMMCommand(RequestWorkItem workItem, Event status, Integer rowCount) {
if (!LogManager.isMessageToBeRecorded(LogConstants.CTX_COMMANDLOGGING, MessageLevel.INFO)) {
return;
}
@@ -569,10 +570,6 @@
RequestMessage msg = workItem.requestMsg;
DQPWorkContext workContext = DQPWorkContext.getWorkContext();
RequestID rID = new RequestID(workContext.getConnectionID(), msg.getExecutionId());
- String command = null;
- if(isBegin && !isCancel){
- command = msg.getCommandString();
- }
String txnID = null;
TransactionContext tc = workItem.getTransactionContext();
if (tc != null && tc.getXid() != null) {
@@ -580,28 +577,11 @@
}
String appName = workContext.getAppName();
// Log to request log
- short point = isBegin? CommandLogMessage.CMD_POINT_BEGIN:CommandLogMessage.CMD_POINT_END;
- short status = CommandLogMessage.CMD_STATUS_NEW;
- if(!isBegin){
- if(isCancel){
- status = CommandLogMessage.CMD_STATUS_CANCEL;
- }else{
- status = CommandLogMessage.CMD_STATUS_END;
- }
- }
CommandLogMessage message = null;
- if (point == CommandLogMessage.CMD_POINT_BEGIN) {
- message = new CommandLogMessage(System.currentTimeMillis(), rID.toString(), txnID, workContext.getConnectionID(), appName, workContext.getUserName(), workContext.getVdbName(), workContext.getVdbVersion(), command);
+ if (status == Event.NEW) {
+ message = new CommandLogMessage(System.currentTimeMillis(), rID.toString(), txnID, workContext.getConnectionID(), appName, workContext.getUserName(), workContext.getVdbName(), workContext.getVdbVersion(), msg.getCommandString());
} else {
- boolean isCancelled = false;
- boolean errorOccurred = false;
-
- if (status == CommandLogMessage.CMD_STATUS_CANCEL) {
- isCancelled = true;
- } else if (status == CommandLogMessage.CMD_STATUS_ERROR) {
- errorOccurred = true;
- }
- message = new CommandLogMessage(System.currentTimeMillis(), rID.toString(), txnID, workContext.getConnectionID(), workContext.getUserName(), workContext.getVdbName(), workContext.getVdbVersion(), rowCount, isCancelled, errorOccurred);
+ message = new CommandLogMessage(System.currentTimeMillis(), rID.toString(), txnID, workContext.getConnectionID(), workContext.getUserName(), workContext.getVdbName(), workContext.getVdbVersion(), rowCount, status);
}
LogManager.log(MessageLevel.DETAIL, LogConstants.CTX_COMMANDLOGGING, message);
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -34,6 +34,7 @@
import java.util.concurrent.ConcurrentHashMap;
import org.teiid.dqp.internal.process.SessionAwareCache.CacheID;
+import org.teiid.logging.api.CommandLogMessage.Event;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MetaMatrixException;
@@ -55,7 +56,6 @@
import com.metamatrix.dqp.message.RequestID;
import com.metamatrix.dqp.message.RequestMessage;
import com.metamatrix.dqp.message.ResultsMessage;
-import com.metamatrix.dqp.service.CommandLogMessage;
import com.metamatrix.dqp.service.TransactionContext;
import com.metamatrix.dqp.service.TransactionService;
import com.metamatrix.dqp.util.LogConstants;
@@ -192,7 +192,7 @@
LogManager.logDetail(LogConstants.CTX_DQP, e, "############# PW EXITING on", requestID, "- error occurred ###########"); //$NON-NLS-1$ //$NON-NLS-2$
if (!isCanceled()) {
- logCommandError();
+ dqpCore.logMMCommand(this, Event.CANCEL, null);
//Case 5558: Differentiate between system level errors and
//processing errors. Only log system level errors as errors,
//log the processing errors as warnings only
@@ -326,7 +326,7 @@
if (this.processingException != null) {
sendError();
} else {
- dqpCore.logMMCommand(this, false, false, rowcount);
+ dqpCore.logMMCommand(this, Event.END, rowcount);
}
}
@@ -636,18 +636,6 @@
}
}
- /**
- * Log the command to the MM cmd log.
- */
- private void logCommandError() {
- String transactionID = null;
- if (this.transactionContext != null && this.transactionContext.getXid() != null) {
- transactionID = this.transactionContext.getXid().toString();
- }
- CommandLogMessage message = new CommandLogMessage(System.currentTimeMillis(), requestID.toString(), transactionID == null ? null : transactionID, requestID.getConnectionID(), dqpWorkContext.getUserName(), dqpWorkContext.getVdbName(), dqpWorkContext.getVdbVersion(), -1, false, true);
- LogManager.log(MessageLevel.INFO, LogConstants.CTX_COMMANDLOGGING, message);
- }
-
boolean isCanceled() {
return isCanceled;
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/validator/AuthorizationValidationVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/validator/AuthorizationValidationVisitor.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/validator/AuthorizationValidationVisitor.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -41,6 +41,7 @@
import com.metamatrix.api.exception.query.QueryMetadataException;
import com.metamatrix.dqp.DQPPlugin;
import com.metamatrix.dqp.service.AuthorizationService;
+import com.metamatrix.dqp.service.AuthorizationService.Context;
import com.metamatrix.query.function.FunctionLibrary;
import com.metamatrix.query.metadata.TempMetadataID;
import com.metamatrix.query.resolver.util.ResolverUtil;
@@ -123,7 +124,7 @@
symbols.add(lookup.getGroup());
symbols.add(lookup.getKeyElement());
symbols.add(lookup.getReturnElement());
- validateEntitlements(symbols, AuthorizationService.ACTION_READ, AuthorizationService.CONTEXT_QUERY);
+ validateEntitlements(symbols, AuthorizationService.ACTION_READ, Context.QUERY);
}
} catch (MetaMatrixComponentException e) {
handleException(e, obj);
@@ -142,7 +143,7 @@
validateEntitlements(
obj.getVariables(),
AuthorizationService.ACTION_CREATE,
- AuthorizationService.CONTEXT_INSERT);
+ Context.INSERT);
}
/**
@@ -154,12 +155,12 @@
validateEntitlements(
ElementCollectorVisitor.getElements(obj.getCriteria(), true),
AuthorizationService.ACTION_READ,
- AuthorizationService.CONTEXT_UPDATE);
+ Context.UPDATE);
}
// The variables from the changes must be checked for UPDATE entitlement
// validateEntitlements on all the variables used in the update.
- validateEntitlements(obj.getChangeList().getClauseMap().keySet(), AuthorizationService.ACTION_UPDATE, AuthorizationService.CONTEXT_UPDATE);
+ validateEntitlements(obj.getChangeList().getClauseMap().keySet(), AuthorizationService.ACTION_UPDATE, Context.UPDATE);
}
/**
@@ -171,13 +172,13 @@
validateEntitlements(
ElementCollectorVisitor.getElements(obj.getCriteria(), true),
AuthorizationService.ACTION_READ,
- AuthorizationService.CONTEXT_DELETE);
+ Context.DELETE);
}
// Check that all elements of group being deleted have delete permission
HashSet deleteVars = new HashSet();
deleteVars.add(obj.getGroup());
- validateEntitlements(deleteVars, AuthorizationService.ACTION_DELETE, AuthorizationService.CONTEXT_DELETE);
+ validateEntitlements(deleteVars, AuthorizationService.ACTION_DELETE, Context.DELETE);
}
/**
@@ -198,7 +199,7 @@
}
validateEntitlements(intoElements,
AuthorizationService.ACTION_CREATE,
- AuthorizationService.CONTEXT_INSERT);
+ Context.INSERT);
}
// Validate this query's entitlements
@@ -211,7 +212,7 @@
return;
}
- validateEntitlements(entitledObjects, AuthorizationService.ACTION_READ, AuthorizationService.CONTEXT_QUERY);
+ validateEntitlements(entitledObjects, AuthorizationService.ACTION_READ, Context.QUERY);
}
/**
@@ -220,7 +221,7 @@
protected void validateEntitlements(StoredProcedure obj) {
List symbols = new ArrayList(1);
symbols.add(obj.getGroup());
- validateEntitlements(symbols, AuthorizationService.ACTION_READ, AuthorizationService.CONTEXT_PROCEDURE);
+ validateEntitlements(symbols, AuthorizationService.ACTION_READ, Context.STORED_PROCEDURE);
}
private String getActionLabel(int actionCode) {
@@ -240,7 +241,7 @@
* @param actionCode The actions to validate for
* @param auditContext The {@link AuthorizationService} to use when resource auditing is done.
*/
- protected void validateEntitlements(Collection symbols, int actionCode, int auditContext) {
+ protected void validateEntitlements(Collection symbols, int actionCode, Context auditContext) {
Map nameToSymbolMap = new HashMap();
Iterator symbolIter = symbols.iterator();
while(symbolIter.hasNext()) {
Modified: trunk/engine/src/test/java/com/metamatrix/dqp/service/FakeAuthorizationService.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/dqp/service/FakeAuthorizationService.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/engine/src/test/java/com/metamatrix/dqp/service/FakeAuthorizationService.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -52,12 +52,10 @@
knownResources.add(new Resource(action, resource));
}
- /*
- * @see com.metamatrix.dqp.service.AuthorizationService#getInaccessibleResources(java.lang.String, int, java.util.Collection, int)
- */
- public Collection getInaccessibleResources(int action, Collection resources, int context)
- throws MetaMatrixComponentException {
-
+ @Override
+ public Collection getInaccessibleResources(int action,
+ Collection resources, Context context)
+ throws MetaMatrixComponentException {
List found = new ArrayList();
if (resources.isEmpty()) {
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/validator/TestAuthorizationValidationVisitor.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/validator/TestAuthorizationValidationVisitor.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/validator/TestAuthorizationValidationVisitor.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -108,11 +108,11 @@
FakeAuthorizationService svc = new FakeAuthorizationService(true);
// pm2.g2
- svc.addResource(AuthorizationService.CONTEXT_INSERT, "pm2.g2.e1"); //$NON-NLS-1$
+ svc.addResource(AuthorizationService.ACTION_CREATE, "pm2.g2.e1"); //$NON-NLS-1$
// pm3.g2
- svc.addResource(AuthorizationService.CONTEXT_INSERT, "pm3.g2.e1"); //$NON-NLS-1$
- svc.addResource(AuthorizationService.CONTEXT_INSERT, "pm3.g2.e2"); //$NON-NLS-1$
+ svc.addResource(AuthorizationService.ACTION_CREATE, "pm3.g2.e1"); //$NON-NLS-1$
+ svc.addResource(AuthorizationService.ACTION_CREATE, "pm3.g2.e2"); //$NON-NLS-1$
return svc;
}
Modified: trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java 2010-03-09 17:19:00 UTC (rev 1948)
+++ trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java 2010-03-09 18:11:28 UTC (rev 1949)
@@ -42,6 +42,7 @@
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.deployers.VDBRepository;
import org.teiid.dqp.internal.process.DQPWorkContext;
+import org.teiid.logging.api.AuditMessage;
import org.teiid.security.roles.AuthorizationActions;
import org.teiid.security.roles.AuthorizationPermission;
import org.teiid.security.roles.AuthorizationPoliciesHolder;
@@ -60,13 +61,11 @@
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.LRUCache;
import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
-import com.metamatrix.dqp.service.AuditMessage;
import com.metamatrix.dqp.service.AuthorizationService;
import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.platform.security.api.MetaMatrixPrincipal;
import com.metamatrix.platform.security.api.MetaMatrixPrincipalName;
import com.metamatrix.platform.security.api.SessionToken;
-import com.metamatrix.server.util.ServerAuditContexts;
import com.metamatrix.vdb.runtime.VDBKey;
/**
@@ -99,12 +98,11 @@
private VDBRepository vdbRepository;
@Override
- public Collection getInaccessibleResources(int action, Collection resources, int context)
- throws MetaMatrixComponentException {
+ public Collection getInaccessibleResources(int action, Collection resources, com.metamatrix.dqp.service.AuthorizationService.Context context) throws MetaMatrixComponentException {
AuthorizationRealm realm = getRealm(DQPWorkContext.getWorkContext());
AuthorizationActions actions = getActions(action);
Collection permissions = createPermissions(realm, resources, actions);
- String auditContext = getAuditContext(context);
+ String auditContext = context.toString();
Collection inaccessableResources = Collections.EMPTY_LIST;
try {
inaccessableResources = getInaccessibleResources(auditContext, permissions);
@@ -141,7 +139,7 @@
LogManager.logDetail(com.metamatrix.common.util.LogConstants.CTX_AUTHORIZATION, new Object[]{"getInaccessibleResources(", caller, ", ", contextName, ", ", requests, ")"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- List resources = new ArrayList();
+ List<String> resources = new ArrayList<String>();
if (requests != null && ! requests.isEmpty()) {
Iterator permItr = requests.iterator();
while ( permItr.hasNext() ) {
@@ -150,7 +148,7 @@
}
// Audit - request
- AuditMessage msg = new AuditMessage( contextName, "getInaccessibleResources-request", caller.getUsername(), resources.toArray()); //$NON-NLS-1$
+ AuditMessage msg = new AuditMessage( contextName, "getInaccessibleResources-request", caller.getUsername(), resources.toArray(new String[resources.size()])); //$NON-NLS-1$
LogManager.log(MessageLevel.INFO, LogConstants.CTX_AUDITLOGGING, msg);
if (isEntitled()){
@@ -175,10 +173,10 @@
}
if (results.isEmpty()) {
- msg = new AuditMessage( contextName, "getInaccessibleResources-granted all", caller.getUsername(), resources.toArray()); //$NON-NLS-1$
+ msg = new AuditMessage( contextName, "getInaccessibleResources-granted all", caller.getUsername(), resources.toArray(new String[resources.size()])); //$NON-NLS-1$
LogManager.log(MessageLevel.INFO, LogConstants.CTX_AUDITLOGGING, msg);
} else {
- msg = new AuditMessage( contextName, "getInaccessibleResources-denied", caller.getUsername(), resources.toArray()); //$NON-NLS-1$
+ msg = new AuditMessage( contextName, "getInaccessibleResources-denied", caller.getUsername(), resources.toArray(new String[resources.size()])); //$NON-NLS-1$
LogManager.log(MessageLevel.INFO, LogConstants.CTX_AUDITLOGGING, msg);
}
return results;
@@ -448,17 +446,6 @@
return permissions;
}
- private String getAuditContext(int auditCode) {
- switch(auditCode) {
- case AuthorizationService.CONTEXT_QUERY: return ServerAuditContexts.CTX_QUERY;
- case AuthorizationService.CONTEXT_INSERT: return ServerAuditContexts.CTX_INSERT;
- case AuthorizationService.CONTEXT_UPDATE: return ServerAuditContexts.CTX_UPDATE;
- case AuthorizationService.CONTEXT_DELETE: return ServerAuditContexts.CTX_DELETE;
- case AuthorizationService.CONTEXT_PROCEDURE: return ServerAuditContexts.CTX_PROCEDURE;
- default: return ServerAuditContexts.CTX_QUERY;
- }
- }
-
public void setVDBRepository(VDBRepository repo) {
this.vdbRepository = repo;
}
14 years, 10 months
teiid SVN: r1948 - trunk.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-03-09 12:19:00 -0500 (Tue, 09 Mar 2010)
New Revision: 1948
Modified:
trunk/pom.xml
Log:
TEIID-833
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-03-09 17:03:57 UTC (rev 1947)
+++ trunk/pom.xml 2010-03-09 17:19:00 UTC (rev 1948)
@@ -94,9 +94,7 @@
</build>
<modules>
<module>build</module>
- <!--
<module>documentation</module>
- -->
</modules>
</profile>
</profiles>
14 years, 10 months