teiid SVN: r3596 - in branches/as7: jboss-integration/src/main/java/org/teiid/jboss and 7 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2011-10-31 16:16:17 -0400 (Mon, 31 Oct 2011)
New Revision: 3596
Added:
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorDependencyDeployer.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorDeployer.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorStructureDeployer.java
branches/as7/test-integration/common/src/test/java/org/teiid/arquillian/
branches/as7/test-integration/common/src/test/java/org/teiid/arquillian/SampleExecutionFactory.java
branches/as7/test-integration/common/src/test/java/org/teiid/arquillian/TestDeployment.java
branches/as7/test-integration/common/src/test/resources/arquillian.xml
Modified:
branches/as7/admin/src/main/java/org/teiid/adminapi/AdminFactory.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorRemove.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorService.java
branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidOperations.java
branches/as7/runtime/src/main/java/org/teiid/deployers/TeiidAttachments.java
branches/as7/runtime/src/main/java/org/teiid/deployers/TranslatorUtil.java
branches/as7/test-integration/common/pom.xml
Log:
TEIID-1720: Added jar based deployer for translators. Added arquillian based test (this needs to be improved upon further)
Modified: branches/as7/admin/src/main/java/org/teiid/adminapi/AdminFactory.java
===================================================================
--- branches/as7/admin/src/main/java/org/teiid/adminapi/AdminFactory.java 2011-10-31 19:57:54 UTC (rev 3595)
+++ branches/as7/admin/src/main/java/org/teiid/adminapi/AdminFactory.java 2011-10-31 20:16:17 UTC (rev 3596)
@@ -32,7 +32,11 @@
import java.net.UnknownHostException;
import java.util.*;
-import javax.security.auth.callback.*;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+import javax.security.auth.callback.UnsupportedCallbackException;
import javax.security.sasl.RealmCallback;
import javax.security.sasl.RealmChoiceCallback;
@@ -46,7 +50,9 @@
import org.jboss.dmr.ModelType;
import org.teiid.adminapi.PropertyDefinition.RestartType;
import org.teiid.adminapi.VDB.ConnectionType;
-import org.teiid.adminapi.impl.*;
+import org.teiid.adminapi.impl.MetadataMapper;
+import org.teiid.adminapi.impl.PropertyDefinitionMetadata;
+import org.teiid.adminapi.impl.VDBMetadataMapper;
import org.teiid.adminapi.impl.VDBMetadataMapper.RequestMetadataMapper;
import org.teiid.adminapi.impl.VDBMetadataMapper.SessionMetadataMapper;
import org.teiid.adminapi.impl.VDBMetadataMapper.TransactionMetadataMapper;
@@ -142,7 +148,8 @@
}
private class AdminImpl implements Admin{
- private ModelControllerClient connection;
+ private static final String JAVA_CONTEXT = "java:/";
+ private ModelControllerClient connection;
private boolean domainMode = false;
public AdminImpl (ModelControllerClient connection) {
@@ -206,7 +213,7 @@
builder.addNode("resource-adapter", templateName); //$NON-NLS-1$ //$NON-NLS-2$
builder.addNode("connection-definitions", deploymentName); //$NON-NLS-1$ //$NON-NLS-2$
builder.setOperationName("add");
- builder.addProperty("jndi-name", "java:/"+deploymentName);
+ builder.addProperty("jndi-name", addJavaContext(deploymentName));
builder.addProperty("pool-name", deploymentName);
request = builder.buildRequest();
} catch (OperationFormatException e) {
@@ -332,9 +339,10 @@
@Override
public void createDataSource(String deploymentName, String templateName, Properties properties) throws AdminException {
+ deploymentName = removeJavaContext(deploymentName);
Collection<String> dsNames = getDataSourceNames();
- if (dsNames.contains(deploymentName) || (deploymentName.startsWith("java:/") && dsNames.contains(deploymentName.substring(6)))) {
+ if (dsNames.contains(deploymentName)) {
throw new AdminProcessingException(AdminPlugin.Util.getString("datasource_exists", deploymentName));
}
@@ -357,7 +365,7 @@
builder.setOperationName("add");
- builder.addProperty("jndi-name", deploymentName.startsWith("java:/")?deploymentName:"java:/"+deploymentName);
+ builder.addProperty("jndi-name", addJavaContext(deploymentName));
builder.addProperty("driver-name", templateName);
builder.addProperty("pool-name", deploymentName);
@@ -398,8 +406,10 @@
@Override
public void deleteDataSource(String deployedName) throws AdminException {
+ deployedName = removeJavaContext(deployedName);
+
Collection<String> dsNames = getDataSourceNames();
- if (!dsNames.contains(deployedName) || (deployedName.startsWith("java:/") && !dsNames.contains(deployedName.substring(6)))) {
+ if (!dsNames.contains(deployedName)) {
throw new AdminProcessingException(AdminPlugin.Util.getString("datasource_doesnot_exists", deployedName));
}
@@ -420,6 +430,20 @@
}
}
+ private String removeJavaContext(String deployedName) {
+ if (deployedName.startsWith(JAVA_CONTEXT)) {
+ deployedName = deployedName.substring(6);
+ }
+ return deployedName;
+ }
+
+ private String addJavaContext(String deployedName) {
+ if (!deployedName.startsWith(JAVA_CONTEXT)) {
+ deployedName = JAVA_CONTEXT+deployedName;
+ }
+ return deployedName;
+ }
+
private boolean deleteDS(String deployedName, boolean connFactory, String... subsystem) throws AdminProcessingException {
DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
final ModelNode request;
@@ -618,9 +642,18 @@
Set<String> datasourceNames = new HashSet<String>();
datasourceNames.addAll(getChildNodeNames("datasources", "data-source"));
datasourceNames.addAll(getChildNodeNames("datasources", "xa-data-source"));
-
datasourceNames.addAll(getResourceAdapterDataSources().keySet());
- return datasourceNames;
+
+ Set<String> dsNames = new HashSet<String>();
+ for (String s:datasourceNames) {
+ if (s.startsWith(JAVA_CONTEXT)) {
+ dsNames.add(s.substring(6));
+ }
+ else {
+ dsNames.add(s);
+ }
+ }
+ return dsNames;
}
private Map<String, String> getResourceAdapterDataSources() throws AdminException {
@@ -1042,7 +1075,7 @@
return list;
}
- public <T> Set<T> getSet(ModelNode operationResult, MetadataMapper<T> mapper) {
+ private <T> Set<T> getSet(ModelNode operationResult, MetadataMapper<T> mapper) {
if(!operationResult.hasDefined("result")) //$NON-NLS-1$
return Collections.emptySet();
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java 2011-10-31 19:57:54 UTC (rev 3595)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java 2011-10-31 20:16:17 UTC (rev 3596)
@@ -317,11 +317,17 @@
context.addStep(new AbstractDeploymentChainStep() {
@Override
public void execute(DeploymentProcessorTarget processorTarget) {
+ // vdb deployers
processorTarget.addDeploymentProcessor(Phase.STRUCTURE, Phase.STRUCTURE_WAR_DEPLOYMENT_INIT,new DynamicVDBRootMountDeployer());
processorTarget.addDeploymentProcessor(Phase.STRUCTURE, Phase.STRUCTURE_WAR_DEPLOYMENT_INIT|0x0001,new VDBStructureDeployer());
processorTarget.addDeploymentProcessor(Phase.PARSE, Phase.PARSE_WEB_DEPLOYMENT|0x0001, new VDBParserDeployer());
processorTarget.addDeploymentProcessor(Phase.DEPENDENCIES, Phase.DEPENDENCIES_WAR_MODULE|0x0001, new VDBDependencyDeployer());
- processorTarget.addDeploymentProcessor(Phase.INSTALL, Phase.INSTALL_WAR_DEPLOYMENT|0x0001, new VDBDeployer(translatorRepo, asyncThreadPoolName, statusChecker));
+ processorTarget.addDeploymentProcessor(Phase.INSTALL, Phase.INSTALL_WAR_DEPLOYMENT|0x0001, new VDBDeployer(translatorRepo, asyncThreadPoolName, statusChecker));
+
+ // translator deployers
+ processorTarget.addDeploymentProcessor(Phase.STRUCTURE, Phase.STRUCTURE_JDBC_DRIVER|0x0001,new TranslatorStructureDeployer());
+ processorTarget.addDeploymentProcessor(Phase.DEPENDENCIES, Phase.DEPENDENCIES_MODULE|0x0001, new TranslatorDependencyDeployer());
+ processorTarget.addDeploymentProcessor(Phase.INSTALL, Phase.INSTALL_JDBC_DRIVER|0x0001, new TranslatorDeployer());
}
}, OperationContext.Stage.RUNTIME);
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java 2011-10-31 19:57:54 UTC (rev 3595)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorAdd.java 2011-10-31 20:16:17 UTC (rev 3596)
@@ -120,6 +120,7 @@
builder.addDependency(TeiidServiceNames.VDB_STATUS_CHECKER, VDBStatusChecker.class, translatorService.statusCheckerInjector);
newControllers.add(builder.setInitialMode(ServiceController.Mode.ACTIVE).install());
added = true;
+ break;
}
}
}
Added: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorDependencyDeployer.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorDependencyDeployer.java (rev 0)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorDependencyDeployer.java 2011-10-31 20:16:17 UTC (rev 3596)
@@ -0,0 +1,59 @@
+/*
+ * 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 org.jboss.as.server.deployment.Attachments;
+import org.jboss.as.server.deployment.DeploymentPhaseContext;
+import org.jboss.as.server.deployment.DeploymentUnit;
+import org.jboss.as.server.deployment.DeploymentUnitProcessingException;
+import org.jboss.as.server.deployment.DeploymentUnitProcessor;
+import org.jboss.as.server.deployment.module.ModuleDependency;
+import org.jboss.as.server.deployment.module.ModuleSpecification;
+import org.jboss.modules.Module;
+import org.jboss.modules.ModuleIdentifier;
+import org.jboss.modules.ModuleLoadException;
+import org.jboss.modules.ModuleLoader;
+
+public class TranslatorDependencyDeployer implements DeploymentUnitProcessor {
+
+ @Override
+ public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
+ DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
+ try {
+ final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
+ final ModuleLoader moduleLoader = Module.getCallerModule().getModule(ModuleIdentifier.create("org.jboss.teiid")).getModuleLoader(); //$NON-NLS-1$
+ moduleSpecification.addLocalDependency(new ModuleDependency(moduleLoader, ModuleIdentifier.create("org.jboss.teiid.api"), false, false, false)); //$NON-NLS-1$
+ moduleSpecification.addLocalDependency(new ModuleDependency(moduleLoader, ModuleIdentifier.create("org.jboss.teiid.common-core"), false, false, false)); //$NON-NLS-1$
+ moduleSpecification.addLocalDependency(new ModuleDependency(moduleLoader, ModuleIdentifier.create("javax.api"), false, false, false)); //$NON-NLS-1$
+ moduleSpecification.addLocalDependency(new ModuleDependency(moduleLoader, ModuleIdentifier.create("javax.resource.api"), false, false, false)); //$NON-NLS-1$
+ moduleSpecification.addLocalDependency(new ModuleDependency(moduleLoader, ModuleIdentifier.create("org.apache.commons.logging"), false, false, false)); //$NON-NLS-1$
+ moduleSpecification.addLocalDependency(new ModuleDependency(moduleLoader, ModuleIdentifier.create("org.apache.log4j"), false, false, false)); //$NON-NLS-1$
+ } catch (ModuleLoadException e) {
+ throw new DeploymentUnitProcessingException(e);
+ }
+ }
+
+ @Override
+ public void undeploy(DeploymentUnit context) {
+ }
+
+}
Property changes on: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorDependencyDeployer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorDeployer.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorDeployer.java (rev 0)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorDeployer.java 2011-10-31 20:16:17 UTC (rev 3596)
@@ -0,0 +1,85 @@
+/*
+ * 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.ServiceLoader;
+
+import org.jboss.as.server.deployment.Attachments;
+import org.jboss.as.server.deployment.DeploymentPhaseContext;
+import org.jboss.as.server.deployment.DeploymentUnit;
+import org.jboss.as.server.deployment.DeploymentUnitProcessingException;
+import org.jboss.as.server.deployment.DeploymentUnitProcessor;
+import org.jboss.modules.Module;
+import org.jboss.msc.service.ServiceBuilder;
+import org.jboss.msc.service.ServiceController;
+import org.jboss.msc.service.ServiceTarget;
+import org.teiid.adminapi.impl.VDBTranslatorMetaData;
+import org.teiid.deployers.TeiidAttachments;
+import org.teiid.deployers.TranslatorUtil;
+import org.teiid.deployers.VDBStatusChecker;
+import org.teiid.dqp.internal.datamgr.TranslatorRepository;
+import org.teiid.logging.LogConstants;
+import org.teiid.logging.LogManager;
+import org.teiid.translator.ExecutionFactory;
+
+/**
+ * Deploy Translator from a JAR file
+ */
+public final class TranslatorDeployer implements DeploymentUnitProcessor {
+
+ @Override
+ public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
+ final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
+ final ServiceTarget target = phaseContext.getServiceTarget();
+
+ if (!TeiidAttachments.isTranslator(deploymentUnit)) {
+ return;
+ }
+
+ String moduleName = deploymentUnit.getName();
+ final Module module = deploymentUnit.getAttachment(Attachments.MODULE);
+ ClassLoader translatorLoader = module.getClassLoader();
+
+ final ServiceLoader<ExecutionFactory> serviceLoader = ServiceLoader.load(ExecutionFactory.class, translatorLoader);
+ if (serviceLoader != null) {
+ for (ExecutionFactory ef:serviceLoader) {
+ VDBTranslatorMetaData metadata = TranslatorUtil.buildTranslatorMetadata(ef, moduleName);
+ if (metadata == null) {
+ throw new DeploymentUnitProcessingException(IntegrationPlugin.Util.getString("error_adding_translator_deployment", moduleName)); //$NON-NLS-1$
+ }
+
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("translator.added", metadata.getName())); //$NON-NLS-1$
+
+ TranslatorService translatorService = new TranslatorService(metadata);
+ ServiceBuilder<VDBTranslatorMetaData> builder = target.addService(TeiidServiceNames.translatorServiceName(metadata.getName()), translatorService);
+ builder.addDependency(TeiidServiceNames.TRANSLATOR_REPO, TranslatorRepository.class, translatorService.repositoryInjector);
+ builder.addDependency(TeiidServiceNames.VDB_STATUS_CHECKER, VDBStatusChecker.class, translatorService.statusCheckerInjector);
+ builder.setInitialMode(ServiceController.Mode.ACTIVE).install();
+ }
+ }
+ }
+
+ @Override
+ public void undeploy(final DeploymentUnit context) {
+ }
+}
Property changes on: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorDeployer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorRemove.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorRemove.java 2011-10-31 19:57:54 UTC (rev 3595)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorRemove.java 2011-10-31 20:16:17 UTC (rev 3596)
@@ -37,8 +37,6 @@
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.ServiceName;
import org.jboss.msc.service.ServiceRegistry;
-import org.teiid.logging.LogConstants;
-import org.teiid.logging.LogManager;
class TranslatorRemove extends AbstractRemoveStepHandler implements DescriptionProvider {
@@ -63,7 +61,6 @@
final ServiceName serviceName = TeiidServiceNames.translatorServiceName(translatorName);
final ServiceController<?> controller = registry.getService(serviceName);
if (controller != null) {
- LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("translator.removed", translatorName)); //$NON-NLS-1$
context.removeService(serviceName);
}
}
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorService.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorService.java 2011-10-31 19:57:54 UTC (rev 3595)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorService.java 2011-10-31 20:16:17 UTC (rev 3596)
@@ -30,6 +30,8 @@
import org.teiid.adminapi.impl.VDBTranslatorMetaData;
import org.teiid.deployers.VDBStatusChecker;
import org.teiid.dqp.internal.datamgr.TranslatorRepository;
+import org.teiid.logging.LogConstants;
+import org.teiid.logging.LogManager;
class TranslatorService implements Service<VDBTranslatorMetaData> {
private VDBTranslatorMetaData translator;
@@ -51,6 +53,7 @@
public void stop(StopContext context) {
this.repositoryInjector.getValue().removeTranslatorMetadata(this.translator.getName());
this.statusCheckerInjector.getValue().translatorRemoved(this.translator.getName());
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("translator.removed", this.translator.getName())); //$NON-NLS-1$
}
@Override
Added: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorStructureDeployer.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorStructureDeployer.java (rev 0)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorStructureDeployer.java 2011-10-31 20:16:17 UTC (rev 3596)
@@ -0,0 +1,63 @@
+/*
+ * 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.List;
+
+import org.jboss.as.server.deployment.Attachments;
+import org.jboss.as.server.deployment.DeploymentPhaseContext;
+import org.jboss.as.server.deployment.DeploymentUnit;
+import org.jboss.as.server.deployment.DeploymentUnitProcessingException;
+import org.jboss.as.server.deployment.DeploymentUnitProcessor;
+import org.jboss.as.server.deployment.DeploymentUtils;
+import org.jboss.as.server.deployment.module.ResourceRoot;
+import org.jboss.vfs.VirtualFile;
+import org.teiid.deployers.TeiidAttachments;
+
+/**
+ * Detects a Translator jar and sets flags for deployment.
+ */
+public final class TranslatorStructureDeployer implements DeploymentUnitProcessor {
+
+ @Override
+ public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
+ final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
+ if (TeiidAttachments.isTranslator(deploymentUnit)) {
+ return;
+ }
+
+ List<ResourceRoot> resourceRoots = DeploymentUtils.allResourceRoots(deploymentUnit);
+ for (ResourceRoot resourceRoot : resourceRoots) {
+ final VirtualFile deploymentRoot = resourceRoot.getRoot();
+
+ if (deploymentRoot.getChild("META-INF/services/org.teiid.translator.ExecutionFactory").exists()) { //$NON-NLS-1$
+ TeiidAttachments.setAsTranslatorDeployment(deploymentUnit);
+ deploymentUnit.putAttachment(Attachments.IGNORE_OSGI, Boolean.TRUE);
+ break;
+ }
+ }
+ }
+
+ @Override
+ public void undeploy(final DeploymentUnit context) {
+ }
+}
Property changes on: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TranslatorStructureDeployer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
===================================================================
--- branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2011-10-31 19:57:54 UTC (rev 3595)
+++ branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2011-10-31 20:16:17 UTC (rev 3596)
@@ -35,6 +35,8 @@
sourcename_not_found=No source name {0} found in the model: {1}.{2}.{3}
vdb_file_not_found = VDB file {0} not found at the location specified.
socket_not_enabled=Socket based remote JDBC protocol is not enabled.
+source_not_found=Source with name {0} not found in the Model {1} in VDB {2}.{3}
+model_not_found=Model with name {0} not found in the VDB {1}.{2}
no_operation=No operation found with given name = {0}
failed_to_remove=Failed to remove the deployment
@@ -63,6 +65,7 @@
socket_binding_not_defined=Socket binding not specified for transport {0}; only embedded access is granted.
embedded_enabled=Teiid Embedded transport enabled.
vdb-undeploy-failed=error during the undeploy of vdb {0}.{1}
+error_adding_translator_deployment=Error adding translator from deployment {0}
# subsystem description
teiid.add = Add the Teiid Subsystem
Modified: branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidOperations.java
===================================================================
--- branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidOperations.java 2011-10-31 19:57:54 UTC (rev 3595)
+++ branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidOperations.java 2011-10-31 20:16:17 UTC (rev 3596)
@@ -1,11 +1,18 @@
package org.teiid.jboss;
import static junit.framework.Assert.assertEquals;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.*;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ATTRIBUTES;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.CHILD_TYPE;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIBE;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP_ADDR;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OUTCOME;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUBSYSTEM;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUCCESS;
import static org.junit.Assert.fail;
import java.io.ByteArrayInputStream;
-import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
@@ -24,20 +31,15 @@
import junit.framework.Assert;
import org.jboss.as.cli.Util;
-import org.jboss.as.cli.operation.impl.DefaultOperationRequestAddress;
-import org.jboss.as.cli.operation.impl.DefaultOperationRequestBuilder;
import org.jboss.as.controller.OperationContext.Type;
-import org.jboss.as.controller.client.OperationBuilder;
import org.jboss.as.controller.PathAddress;
import org.jboss.as.controller.PathElement;
import org.jboss.as.subsystem.test.AbstractSubsystemTest;
import org.jboss.as.subsystem.test.AdditionalInitialization;
import org.jboss.as.subsystem.test.KernelServices;
import org.jboss.dmr.ModelNode;
-import org.junit.Ignore;
import org.junit.Test;
import org.teiid.core.util.ObjectConverterUtil;
-import org.teiid.core.util.UnitTestUtil;
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
@@ -230,13 +232,14 @@
Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
List<String> opNames = getList(result);
- assertEquals(36, opNames.size());
+ assertEquals(37, opNames.size());
String[] ops = { "add", "add-anyauthenticated-role", "add-data-role",
"assign-datasource", "cache-statistics", "cache-types",
"cancel-request", "change-vdb-connection-type", "clear-cache",
"describe", "execute-query", "get-translator", "get-vdb",
"list-requests", "list-sessions", "list-transactions",
"list-translators", "list-vdbs", "long-running-queries",
+ "mark-datasource-available",
"merge-vdbs", "read-attribute", "read-children-names",
"read-children-resources", "read-children-types",
"read-operation-description", "read-operation-names",
@@ -324,12 +327,12 @@
return list;
}
- private ModelNode buildProperty(String name, String value) {
- ModelNode node = new ModelNode();
- node.get("property-name").set(name);
- node.get("property-value").set(value);
- return node;
- }
+// private ModelNode buildProperty(String name, String value) {
+// ModelNode node = new ModelNode();
+// node.get("property-name").set(name);
+// node.get("property-value").set(value);
+// return node;
+// }
@Test
public void testTranslator() throws Exception {
@@ -340,80 +343,49 @@
ModelNode addOp = new ModelNode();
addOp.get(OP).set("add");
addOp.get(OP_ADDR).set(addr.toModelNode().add("translator", "oracle"));
- services.executeOperation(addOp);
-
- ModelNode listOp = new ModelNode();
- listOp.get(OP).set("list-translators");
- listOp.get(OP_ADDR).set(addr.toModelNode());
-
- ModelNode result = services.executeOperation(listOp);
+ ModelNode result = services.executeOperation(addOp);
Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
- List<ModelNode> translators = result.get("result").asList();
+ ModelNode read = new ModelNode();
+ read.get(OP).set("read-children-names");
+ read.get(OP_ADDR).set(addr.toModelNode());
+ read.get(CHILD_TYPE).set("translator");
- ModelNode oracle = new ModelNode();
- oracle.get("translator-name").set("oracle");
- oracle.get("description").set("A translator for Oracle 9i Database or later");
- oracle.get("children", "properties").add(buildProperty("execution-factory-class","org.teiid.translator.jdbc.oracle.OracleExecutionFactory"));
- oracle.get("children", "properties").add(buildProperty("TrimStrings","false"));
- oracle.get("children", "properties").add(buildProperty("SupportedJoinCriteria","ANY"));
- oracle.get("children", "properties").add(buildProperty("requiresCriteria","false"));
- oracle.get("children", "properties").add(buildProperty("supportsOuterJoins","true"));
- oracle.get("children", "properties").add(buildProperty("useCommentsInSourceQuery","false"));
- oracle.get("children", "properties").add(buildProperty("useBindVariables","true"));
- oracle.get("children", "properties").add(buildProperty("MaxPreparedInsertBatchSize","2048"));
- oracle.get("children", "properties").add(buildProperty("supportsInnerJoins","true"));
- oracle.get("children", "properties").add(buildProperty("MaxInCriteriaSize","1000"));
- oracle.get("children", "properties").add(buildProperty("supportsSelectDistinct","true"));
- oracle.get("children", "properties").add(buildProperty("supportsOrderBy","true"));
- oracle.get("children", "properties").add(buildProperty("supportsFullOuterJoins","true"));
- oracle.get("children", "properties").add(buildProperty("Immutable","false"));
- oracle.get("children", "properties").add(buildProperty("MaxDependentInPredicates","50"));
-
- super.compare(translators.get(0), oracle);
- }
-
- @Ignore
- public void testVDBOperations() throws Exception {
- KernelServices services = buildSubsystem();
- String fileName = "bqt.vdb";
-
- byte[] bytes = ObjectConverterUtil.convertToByteArray(new FileInputStream(UnitTestUtil.getTestDataFile(fileName)));
- PathAddress addr = PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, TeiidExtension.TEIID_SUBSYSTEM));
-
- // add
- ModelNode composite = new ModelNode();
- composite.get("operation").set("composite");
- composite.get("address").setEmptyList();
- ModelNode steps = composite.get("steps");
-
- DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
- builder.setOperationName("add");
- builder.addNode("deployment", fileName);
+ result = services.executeOperation(read);
+ Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
- builder.getModelNode().get("content").get(0).get("bytes").set(bytes);
- steps.add(builder.buildRequest());
-
- // deploy
- builder = new DefaultOperationRequestBuilder();
- builder.setOperationName("deploy");
- builder.addNode("deployment", fileName);
- steps.add(builder.buildRequest());
-
- ModelNode result = services.executeOperation(composite);
+ List<String> translators = Util.getList(result);
+ Assert.assertTrue(translators.contains("oracle"));
- Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
-
- ModelNode addOp = new ModelNode();
- addOp.get(OP).set("list-vdbs");
- addOp.get(OP_ADDR).set(addr.toModelNode());
+ ModelNode resourceRead = new ModelNode();
+ resourceRead.get(OP).set("read-resource");
+ resourceRead.get(OP_ADDR).set(addr.toModelNode());
+ resourceRead.get("translator").set("oracle");
- result = services.executeOperation(addOp);
+ result = services.executeOperation(resourceRead);
Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
- List<String> opNames = getList(result);
- assertEquals(2, opNames.size());
- String [] ops3 = {"newbie", "odbc"};
- assertEquals(Arrays.asList(ops3), opNames);
- }
+// ModelNode oracleNode = result.get("result");
+//
+// ModelNode oracle = new ModelNode();
+// oracle.get("translator-name").set("oracle");
+// oracle.get("description").set("A translator for Oracle 9i Database or later");
+// oracle.get("children", "properties").add(buildProperty("execution-factory-class","org.teiid.translator.jdbc.oracle.OracleExecutionFactory"));
+// oracle.get("children", "properties").add(buildProperty("TrimStrings","false"));
+// oracle.get("children", "properties").add(buildProperty("SupportedJoinCriteria","ANY"));
+// oracle.get("children", "properties").add(buildProperty("requiresCriteria","false"));
+// oracle.get("children", "properties").add(buildProperty("supportsOuterJoins","true"));
+// oracle.get("children", "properties").add(buildProperty("useCommentsInSourceQuery","false"));
+// oracle.get("children", "properties").add(buildProperty("useBindVariables","true"));
+// oracle.get("children", "properties").add(buildProperty("MaxPreparedInsertBatchSize","2048"));
+// oracle.get("children", "properties").add(buildProperty("supportsInnerJoins","true"));
+// oracle.get("children", "properties").add(buildProperty("MaxInCriteriaSize","1000"));
+// oracle.get("children", "properties").add(buildProperty("supportsSelectDistinct","true"));
+// oracle.get("children", "properties").add(buildProperty("supportsOrderBy","true"));
+// oracle.get("children", "properties").add(buildProperty("supportsFullOuterJoins","true"));
+// oracle.get("children", "properties").add(buildProperty("Immutable","false"));
+// oracle.get("children", "properties").add(buildProperty("MaxDependentInPredicates","50"));
+//
+// super.compare(oracleNode, oracle);
+ }
}
Modified: branches/as7/runtime/src/main/java/org/teiid/deployers/TeiidAttachments.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/deployers/TeiidAttachments.java 2011-10-31 19:57:54 UTC (rev 3595)
+++ branches/as7/runtime/src/main/java/org/teiid/deployers/TeiidAttachments.java 2011-10-31 20:16:17 UTC (rev 3596)
@@ -29,7 +29,7 @@
public final class TeiidAttachments {
- enum DeploymentType{VDB, DYNAMIC_VDB};
+ enum DeploymentType{VDB, DYNAMIC_VDB, TRANSLATOR};
public static final AttachmentKey<VDBMetaData> VDB_METADATA = AttachmentKey.create(VDBMetaData.class);
public static final AttachmentKey<UDFMetaData> UDF_METADATA = AttachmentKey.create(UDFMetaData.class);
@@ -52,4 +52,12 @@
public static void setAsDynamicVDBDeployment(final DeploymentUnit deploymentUnit) {
deploymentUnit.putAttachment(DEPLOYMENT_TYPE, DeploymentType.DYNAMIC_VDB);
}
+
+ public static void setAsTranslatorDeployment(final DeploymentUnit deploymentUnit) {
+ deploymentUnit.putAttachment(DEPLOYMENT_TYPE, DeploymentType.TRANSLATOR);
+ }
+
+ public static boolean isTranslator(final DeploymentUnit deploymentUnit) {
+ return DeploymentType.TRANSLATOR == deploymentUnit.getAttachment(DEPLOYMENT_TYPE);
+ }
}
Modified: branches/as7/runtime/src/main/java/org/teiid/deployers/TranslatorUtil.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/deployers/TranslatorUtil.java 2011-10-31 19:57:54 UTC (rev 3595)
+++ branches/as7/runtime/src/main/java/org/teiid/deployers/TranslatorUtil.java 2011-10-31 20:16:17 UTC (rev 3596)
@@ -188,6 +188,14 @@
}
return value;
}
+
+ public static String getTranslatorName(ExecutionFactory factory) {
+ org.teiid.translator.Translator translator = factory.getClass().getAnnotation(org.teiid.translator.Translator.class);
+ if (translator == null) {
+ return null;
+ }
+ return translator.name();
+ }
public static VDBTranslatorMetaData buildTranslatorMetadata(ExecutionFactory factory, String moduleName) {
Modified: branches/as7/test-integration/common/pom.xml
===================================================================
--- branches/as7/test-integration/common/pom.xml 2011-10-31 19:57:54 UTC (rev 3595)
+++ branches/as7/test-integration/common/pom.xml 2011-10-31 20:16:17 UTC (rev 3596)
@@ -29,6 +29,41 @@
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian.junit</groupId>
+ <artifactId>arquillian-junit-container</artifactId>
+ <version>1.0.0.CR5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ <version>1.0</version>
+ </dependency>
</dependencies>
-
+ <profiles>
+ <profile>
+ <id>jbossas-managed-7</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.spec</groupId>
+ <artifactId>jboss-javaee-6.0</artifactId>
+ <version>1.0.0.Final</version>
+ <type>pom</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-arquillian-container-managed</artifactId>
+ <version>7.0.2.Final</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
</project>
\ No newline at end of file
Added: branches/as7/test-integration/common/src/test/java/org/teiid/arquillian/SampleExecutionFactory.java
===================================================================
--- branches/as7/test-integration/common/src/test/java/org/teiid/arquillian/SampleExecutionFactory.java (rev 0)
+++ branches/as7/test-integration/common/src/test/java/org/teiid/arquillian/SampleExecutionFactory.java 2011-10-31 20:16:17 UTC (rev 3596)
@@ -0,0 +1,10 @@
+package org.teiid.arquillian;
+
+import org.teiid.translator.ExecutionFactory;
+
+(a)org.teiid.translator.Translator(name = "orcl")
+public class SampleExecutionFactory extends ExecutionFactory<Object, Object> {
+ public SampleExecutionFactory() {
+ setSupportsSelectDistinct(true);
+ }
+}
\ No newline at end of file
Property changes on: branches/as7/test-integration/common/src/test/java/org/teiid/arquillian/SampleExecutionFactory.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: branches/as7/test-integration/common/src/test/java/org/teiid/arquillian/TestDeployment.java
===================================================================
--- branches/as7/test-integration/common/src/test/java/org/teiid/arquillian/TestDeployment.java (rev 0)
+++ branches/as7/test-integration/common/src/test/java/org/teiid/arquillian/TestDeployment.java 2011-10-31 20:16:17 UTC (rev 3596)
@@ -0,0 +1,139 @@
+package org.teiid.arquillian;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.FileInputStream;
+import java.util.Collection;
+import java.util.Properties;
+import java.util.Set;
+
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ArchivePaths;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.ByteArrayAsset;
+import org.jboss.shrinkwrap.api.exporter.ZipExporter;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.teiid.adminapi.Admin;
+import org.teiid.adminapi.AdminFactory;
+import org.teiid.adminapi.Model;
+import org.teiid.adminapi.Translator;
+import org.teiid.adminapi.VDB;
+import org.teiid.adminapi.VDB.ConnectionType;
+import org.teiid.adminapi.VDB.Status;
+import org.teiid.adminapi.impl.VDBTranslatorMetaData;
+import org.teiid.core.util.UnitTestUtil;
+
+(a)RunWith(Arquillian.class)
+@SuppressWarnings("nls")
+public class TestDeployment {
+
+ @Test
+ public void testVDBDeployment() throws Exception {
+ boolean deployed = false;
+ Admin admin = AdminFactory.getInstance().createAdmin("localhost", 9999, null, null);
+ try {
+ Set<?> vdbs = admin.getVDBs();
+ assertTrue(vdbs.isEmpty());
+
+ Collection<String> dsNames = admin.getDataSourceNames();
+ if (dsNames.contains("Oracle11_PushDS")) {
+ admin.deleteDataSource("Oracle11_PushDS");
+ }
+
+ admin.deploy("bqt.vdb",new FileInputStream(UnitTestUtil.getTestDataFile("bqt.vdb")));
+ deployed = true;
+
+ vdbs = admin.getVDBs();
+ assertFalse(vdbs.isEmpty());
+
+ VDB vdb = admin.getVDB("bqt", 1);
+ assertFalse(vdb.isValid());
+ assertTrue(vdb.getStatus().equals(Status.INACTIVE));
+
+ Properties props = new Properties();
+ props.setProperty("connection-url","jdbc:h2:mem:test;DB_CLOSE_DELAY=-1");
+ props.setProperty("user-name", "sa");
+ props.setProperty("password", "sa");
+
+ admin.createDataSource("Oracle11_PushDS", "h2", props);
+ Thread.sleep(2000);
+ vdb = admin.getVDB("bqt", 1);
+ assertTrue(vdb.isValid());
+ assertTrue(vdb.getStatus().equals(Status.ACTIVE));
+
+ dsNames = admin.getDataSourceNames();
+ assertTrue(dsNames.contains("Oracle11_PushDS"));
+
+ admin.deleteDataSource("Oracle11_PushDS");
+ vdb = admin.getVDB("bqt", 1);
+ assertFalse(vdb.isValid());
+ assertTrue(vdb.getStatus().equals(Status.INACTIVE));
+ } finally {
+ if (deployed) {
+ admin.undeploy("bqt.vdb");
+ }
+ }
+
+ admin.close();
+ }
+
+ @Test
+ public void testTraslators() throws Exception {
+ Admin admin = AdminFactory.getInstance().createAdmin("localhost", 9999, null, null);
+
+ Collection<? extends Translator> translators = admin.getTranslators();
+
+ assertEquals(27, translators.size());
+
+ JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "orcl.jar")
+ .addClasses(SampleExecutionFactory.class)
+ .addAsManifestResource(new ByteArrayAsset(SampleExecutionFactory.class.getName().getBytes()),
+ ArchivePaths.create("services/org.teiid.translator.ExecutionFactory"));
+ try {
+ admin.deploy("orcl.jar", jar.as(ZipExporter.class).exportAsInputStream());
+
+ VDBTranslatorMetaData t = (VDBTranslatorMetaData)admin.getTranslator("orcl");
+ assertNotNull(t);
+ assertEquals("ANY", t.getPropertyValue("SupportedJoinCriteria"));
+ assertEquals("true", t.getPropertyValue("supportsSelectDistinct"));
+ } finally {
+ admin.undeploy("orcl.jar");
+ }
+
+ VDBTranslatorMetaData t = (VDBTranslatorMetaData)admin.getTranslator("orcl");
+ assertNull(t);
+
+ admin.close();
+ }
+
+ @Test
+ public void testVDBOperations() throws Exception {
+ Admin admin = AdminFactory.getInstance().createAdmin("localhost", 9999, null, null);
+ try {
+ admin.deploy("bqt.vdb",new FileInputStream(UnitTestUtil.getTestDataFile("bqt.vdb")));
+
+ VDB vdb = admin.getVDB("bqt", 1);
+ Model model = vdb.getModels().get(0);
+ assertEquals(ConnectionType.BY_VERSION, vdb.getConnectionType());
+
+ admin.assignToModel("bqt", 1, model.getName(), "Source", "h2", "java:jboss/datasources/ExampleDS");
+ admin.changeVDBConnectionType("bqt", 1, ConnectionType.ANY);
+
+ vdb = admin.getVDB("bqt", 1);
+ model = vdb.getModels().get(0);
+ assertEquals(model.getSourceConnectionJndiName("Source"), "java:jboss/datasources/ExampleDS");
+ assertEquals(model.getSourceTranslatorName("Source"), "h2");
+ assertEquals(ConnectionType.ANY, vdb.getConnectionType());
+
+ } finally {
+ admin.undeploy("bqt.vdb");
+ }
+ admin.close();
+ }
+}
Property changes on: branches/as7/test-integration/common/src/test/java/org/teiid/arquillian/TestDeployment.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: branches/as7/test-integration/common/src/test/resources/arquillian.xml
===================================================================
--- branches/as7/test-integration/common/src/test/resources/arquillian.xml (rev 0)
+++ branches/as7/test-integration/common/src/test/resources/arquillian.xml 2011-10-31 20:16:17 UTC (rev 3596)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://jboss.org/schema/arquillian"
+ xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
+
+ <container qualifier="jboss7" default="true">
+ <protocol type="jmx-as7">
+ <property name="executionType">REMOTE</property>
+ </protocol>
+ <configuration>
+ <property name="jbossHome">/home/rareddy/testing/jboss-as-7.1.0.Alpha2-SNAPSHOT</property>
+ <property name="serverConfig">standalone-teiid.xml</property>
+ <property name="managementAddress">127.0.0.1</property>
+ <property name="managementPort">9999</property>
+ </configuration>
+ </container>
+</arquillian>
\ No newline at end of file
Property changes on: branches/as7/test-integration/common/src/test/resources/arquillian.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 2 months
teiid SVN: r3595 - in trunk: build/kits/jboss-container and 3 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-10-31 15:57:54 -0400 (Mon, 31 Oct 2011)
New Revision: 3595
Modified:
trunk/api/src/main/java/org/teiid/language/visitor/SQLStringVisitor.java
trunk/build/kits/jboss-container/teiid-releasenotes.html
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java
trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java
trunk/documentation/reference/src/main/docbook/en-US/content/translators.xml
Log:
TEIID-669 adding support for JDBC native queries in metadata
Modified: trunk/api/src/main/java/org/teiid/language/visitor/SQLStringVisitor.java
===================================================================
--- trunk/api/src/main/java/org/teiid/language/visitor/SQLStringVisitor.java 2011-10-28 20:43:18 UTC (rev 3594)
+++ trunk/api/src/main/java/org/teiid/language/visitor/SQLStringVisitor.java 2011-10-31 19:57:54 UTC (rev 3595)
@@ -81,6 +81,7 @@
import org.teiid.language.SQLConstants.Tokens;
import org.teiid.language.SortSpecification.Ordering;
import org.teiid.metadata.AbstractMetadataRecord;
+import org.teiid.metadata.Table;
/**
@@ -434,13 +435,7 @@
}
public void visit(NamedTable obj) {
- AbstractMetadataRecord groupID = obj.getMetadataObject();
- if(groupID != null) {
- buffer.append(getName(groupID));
- } else {
- buffer.append(obj.getName());
- }
-
+ appendBaseName(obj);
if (obj.getCorrelationName() != null) {
buffer.append(Tokens.SPACE);
if (useAsInGroupAlias()){
@@ -450,6 +445,15 @@
buffer.append(obj.getCorrelationName());
}
}
+
+ protected void appendBaseName(NamedTable obj) {
+ Table groupID = obj.getMetadataObject();
+ if(groupID != null) {
+ buffer.append(getName(groupID));
+ } else {
+ buffer.append(obj.getName());
+ }
+ }
/**
* Indicates whether group alias should be of the form
Modified: trunk/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-10-28 20:43:18 UTC (rev 3594)
+++ trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-10-31 19:57:54 UTC (rev 3595)
@@ -34,6 +34,7 @@
The memory buffer may be optional be configured as off-heap for better large memory performance - see the Admin Guide for more. Overhead is now tracked to help prevent memory errors when dealing with 10s of millions or more of batches/pages. Serialization and disk utilization were also improved.
<LI><B>GSSAPI</B> - both the Teiid JDBC client/server and the ODBC pg backend can now support GSSAPI for single sign-on.
<LI><B>Server-side Query Timeouts</B> - default query timeouts can be configured at both the VDB (via the query-timeout VDB property) and entire server (via the teiid-jboss-beans.xml queryTimeout property).
+ <LI><B>Native Queries</B> - added the ability to specify native query SQL for JDBC physical tables and stored procedures via extension metadata.
</UL>
<h2><a name="Compatibility">Compatibility Issues</a></h2>
Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java 2011-10-28 20:43:18 UTC (rev 3594)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java 2011-10-31 19:57:54 UTC (rev 3595)
@@ -24,15 +24,20 @@
*/
package org.teiid.translator.jdbc;
+import static org.teiid.language.SQLConstants.Reserved.*;
+
import java.sql.Time;
import java.sql.Timestamp;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.IdentityHashMap;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.teiid.language.Argument;
import org.teiid.language.Call;
@@ -45,6 +50,7 @@
import org.teiid.language.LanguageObject;
import org.teiid.language.Like;
import org.teiid.language.Literal;
+import org.teiid.language.NamedTable;
import org.teiid.language.SearchedCase;
import org.teiid.language.SetClause;
import org.teiid.language.Argument.Direction;
@@ -52,6 +58,7 @@
import org.teiid.language.SQLConstants.Tokens;
import org.teiid.language.SetQuery.Operation;
import org.teiid.language.visitor.SQLStringVisitor;
+import org.teiid.metadata.Procedure;
import org.teiid.translator.ExecutionContext;
import org.teiid.translator.TypeFacility;
@@ -61,6 +68,9 @@
* to produce a SQL String. This class is expected to be subclassed.
*/
public class SQLConversionVisitor extends SQLStringVisitor{
+
+ public static final String TEIID_NATIVE_QUERY = "teiid:native-query"; //$NON-NLS-1$
+ public static final String TEIID_NON_PREPARED = "teiid:non-prepared"; //$NON-NLS-1$
private static DecimalFormat DECIMAL_FORMAT =
new DecimalFormat("#############################0.0#############################"); //$NON-NLS-1$
@@ -181,14 +191,71 @@
* @see org.teiid.language.visitor.SQLStringVisitor#visit(org.teiid.language.Call)
*/
public void visit(Call obj) {
- this.prepared = true;
- /*
+ Procedure p = obj.getMetadataObject();
+ if (p != null) {
+ String nativeQuery = p.getProperties().get(TEIID_NATIVE_QUERY);
+ if (nativeQuery != null) {
+ List<Object> parts = parseNativeQueryParts(nativeQuery);
+ this.prepared = !Boolean.valueOf(p.getProperties().get(TEIID_NON_PREPARED));
+ if (this.prepared) {
+ this.preparedValues = new ArrayList<Object>();
+ }
+ for (Object o : parts) {
+ if (o instanceof String) {
+ buffer.append(o);
+ } else {
+ Integer i = (Integer)o;
+ if (obj.getArguments().size() <= i) {
+ throw new IllegalArgumentException("Invalid parameter {0}. Must be less than or equal to {1}.");
+ }
+ if (obj.getArguments().get(i).getDirection() != Direction.IN) {
+ throw new IllegalArgumentException("Native query procedures cannot use non IN parameters.");
+ }
+ visit(obj.getArguments().get(i));
+ if (this.prepared) {
+ this.preparedValues.add(obj.getArguments());
+ }
+ }
+ }
+ return;
+ }
+ }
+ this.prepared = true;
+ /*
* preparedValues is now a list of procedure params instead of just values
*/
this.preparedValues = obj.getArguments();
buffer.append(generateSqlForStoredProcedure(obj));
}
+ private List<Object> parseNativeQueryParts(String nativeQuery) {
+ Pattern pattern = Pattern.compile("\\$(\\$\\$)*\\d+"); //$NON-NLS-1$
+ List<Object> parts = new LinkedList<Object>();
+ Matcher m = pattern.matcher(nativeQuery);
+ for (int i = 0; i < nativeQuery.length(); i++) {
+ if (!m.find(i)) {
+ parts.add(nativeQuery.substring(i).replaceAll("\\$\\$", "\\$")); //$NON-NLS-1$ //$NON-NLS-2$
+ break;
+ }
+ if (m.start() != i) {
+ parts.add(nativeQuery.substring(i, m.start()).replaceAll("\\$\\$", "\\$")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ String match = m.group();
+ int end = match.lastIndexOf('$');
+ if ((end&0x1) == 1) {
+ //escaped
+ parts.add(match.replaceAll("\\$\\$", "\\$")); //$NON-NLS-1$ //$NON-NLS-2$
+ } else {
+ if (end != 0) {
+ parts.add(match.substring(0, end/2));
+ }
+ parts.add(Integer.parseInt(match.substring(end + 1))-1);
+ }
+ i = m.end();
+ }
+ return parts;
+ }
+
/**
* @see org.teiid.language.visitor.SQLStringVisitor#visit(org.teiid.language.Literal)
*/
@@ -355,4 +422,22 @@
return executionFactory.getLikeRegexString();
}
+ @Override
+ protected void appendBaseName(NamedTable obj) {
+ if (obj.getMetadataObject() != null) {
+ String nativeQuery = obj.getMetadataObject().getProperties().get(TEIID_NATIVE_QUERY);
+ if (nativeQuery != null) {
+ buffer.append(Tokens.LPAREN).append(nativeQuery).append(Tokens.RPAREN);
+ if (obj.getCorrelationName() == null) {
+ buffer.append(Tokens.SPACE);
+ if (useAsInGroupAlias()){
+ buffer.append(AS).append(Tokens.SPACE);
+ }
+ }
+ }
+ }
+ super.appendBaseName(obj);
+ }
+
+
}
Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java 2011-10-28 20:43:18 UTC (rev 3594)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java 2011-10-31 19:57:54 UTC (rev 3595)
@@ -41,20 +41,25 @@
import org.teiid.dqp.internal.datamgr.FakeExecutionContextImpl;
import org.teiid.language.Command;
import org.teiid.metadata.Column;
+import org.teiid.metadata.ColumnSet;
import org.teiid.metadata.MetadataStore;
+import org.teiid.metadata.Procedure;
+import org.teiid.metadata.ProcedureParameter;
import org.teiid.metadata.Schema;
import org.teiid.metadata.Table;
import org.teiid.query.metadata.CompositeMetadataStore;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.TransformationMetadata;
+import org.teiid.query.sql.lang.SPParameter;
import org.teiid.query.unittest.RealMetadataFactory;
import org.teiid.translator.ExecutionContext;
import org.teiid.translator.TranslatorException;
import org.teiid.translator.jdbc.JDBCProcedureExecution;
+import org.teiid.translator.jdbc.SQLConversionVisitor;
import org.teiid.translator.jdbc.TranslatedCommand;
import org.teiid.translator.jdbc.TranslationHelper;
-
+@SuppressWarnings("nls")
public class TestOracleTranslator {
private OracleExecutionFactory TRANSLATOR;
@@ -716,6 +721,8 @@
MetadataStore metadataStore = new MetadataStore();
Schema foo = RealMetadataFactory.createPhysicalModel("BQT1", metadataStore); //$NON-NLS-1$
Table table = RealMetadataFactory.createPhysicalGroup("SmallA", foo); //$NON-NLS-1$
+ Table x = RealMetadataFactory.createPhysicalGroup("x", foo); //$NON-NLS-1$
+ x.setProperty(SQLConversionVisitor.TEIID_NATIVE_QUERY, "select c from d");
Table dual = RealMetadataFactory.createPhysicalGroup("DUAL", foo); //$NON-NLS-1$
table.setNameInSource("SmallishA");//$NON-NLS-1$
String[] elemNames = new String[] {
@@ -728,12 +735,19 @@
DataTypeManager.DefaultDataTypes.INTEGER,
DataTypeManager.DefaultDataTypes.TIMESTAMP,
};
+ RealMetadataFactory.createElements(x, elemNames, elemTypes);
List<Column> cols = RealMetadataFactory.createElements(table, elemNames, elemTypes);
cols.get(1).setAutoIncremented(true);
cols.get(1).setNameInSource("ID:SEQUENCE=MYSEQUENCE.nextVal"); //$NON-NLS-1$
cols.get(2).setNativeType("date"); //$NON-NLS-1$
RealMetadataFactory.createElements(dual, new String[] {"something"}, new String[] {DataTypeManager.DefaultDataTypes.STRING}); //$NON-NLS-1$
+ ProcedureParameter in1 = RealMetadataFactory.createParameter("in1", SPParameter.IN, DataTypeManager.DefaultDataTypes.INTEGER); //$NON-NLS-1$
+ ColumnSet<Procedure> rs3 = RealMetadataFactory.createResultSet("proc.rs1", new String[] { "e1" }, new String[] { DataTypeManager.DefaultDataTypes.INTEGER }); //$NON-NLS-1$ //$NON-NLS-2$
+ Procedure p = RealMetadataFactory.createStoredProcedure("proc", foo, Arrays.asList(in1));
+ p.setResultSet(rs3);
+ p.setProperty(SQLConversionVisitor.TEIID_NATIVE_QUERY, "select x from y where z = $1");
+
CompositeMetadataStore store = new CompositeMetadataStore(metadataStore);
return new TransformationMetadata(null, store, null, RealMetadataFactory.SFM.getSystemFunctions(), null);
}
@@ -822,5 +836,23 @@
Mockito.verify(cs, Mockito.times(1)).registerOutParameter(1, OracleExecutionFactory.CURSOR_TYPE);
Mockito.verify(cs, Mockito.times(1)).getObject(1);
}
+
+ @Test public void testNativeQuery() throws Exception {
+ String input = "SELECT (DoubleNum * 1.0) FROM x"; //$NON-NLS-1$
+ String output = "SELECT (x.DoubleNum * 1.0) FROM (select c from d) x"; //$NON-NLS-1$
+ QueryMetadataInterface metadata = getOracleSpecificMetadata();
+
+ helpTestVisitor(metadata, input, EMPTY_CONTEXT, null, output);
+ }
+
+ @Test public void testNativeQueryProc() throws Exception {
+ String input = "call proc(2)"; //$NON-NLS-1$
+ String output = "select x from y where z = 2"; //$NON-NLS-1$
+
+ QueryMetadataInterface metadata = getOracleSpecificMetadata();
+
+ helpTestVisitor(metadata, input, EMPTY_CONTEXT, null, output);
+ }
+
}
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/translators.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/translators.xml 2011-10-28 20:43:18 UTC (rev 3594)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/translators.xml 2011-10-31 19:57:54 UTC (rev 3595)
@@ -520,6 +520,22 @@
</section>
<section>
+ <title>Native Queries</title>
+ <para>Both physical tables and procedures may optionally have native queries associated with them. No validation of the native query is performed, it is simply used in a straight-forward manner to generate the source SQL.
+ For a physical table setting the teiid:native-query extension metadata to the desired query string will have Teiid execute the native query as an inline view in the source query.
+ This feature should only be used against sources that support inline views. For example on a physical table y with nameInSource=x and teiid:native-query=select c from g, the Teiid source query
+ "SELECT c FROM y" would generate the SQL query "SELECT c FROM (select c from g) as x". Note that the column names in the native query must match the nameInSource of the physical table columns for the resulting SQL
+ to be valid.</para>
+ <para>For physical procedures you may also set the teiid:native-query extension metadata to a desired query string with the added ability to positionally reference IN parameters. A parameter reference has the form
+ $integer, e.g. $1. Note that 1 based indexing is used and that only IN parameters may be referenced. Dollar-sign ($) is reserved in physical procedure native queries. To use a $ directly, it must be escaped with another $, e.g. $$.
+ By default bind values will be used for parameter values. In some situations you may wish to bind values directly into the resulting SQL. The teiid:non-prepared extension metadata property may be set to false to turn off
+ parameter binding. Note this option should be used with caution as inbound may allow for SQL injection attacks if not properly validated. The native query does not need to call a stored procedure. Any SQL that returns
+ a result set positionally matching the result set expected by the physical stored procedure metadata will work. For example on a stored procedure x with teiid:native-query=select c from g where c1 = $1 and c2 = '$$', the Teiid source query
+ "CALL x(?)" would generate the SQL query "select c from g where c1 = ? and c2 = '$'". Note that ? in this example will be replaced with the actual value bound to parameter 1.
+ </para>
+ </section>
+
+ <section>
<title>JCA Resource Adapter</title>
<para>The resource adapter for this translator provided through data source in JBoss AS,
Refer to Admin Guide for "JDBC Data Sources" configuration section.</para>
13 years, 2 months
teiid SVN: r3594 - in trunk/engine/src: main/java/org/teiid/query/optimizer/relational and 6 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-10-28 16:43:18 -0400 (Fri, 28 Oct 2011)
New Revision: 3594
Added:
trunk/engine/src/test/java/org/teiid/query/processor/TestFunctionPushdown.java
Modified:
trunk/engine/src/main/java/org/teiid/query/analysis/AnalysisRecord.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAssignOutputElements.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleConstants.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleMergeVirtual.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/GroupingNode.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/NestedTableJoinStrategy.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/RelationalNode.java
trunk/engine/src/main/resources/org/teiid/query/i18n.properties
trunk/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java
trunk/engine/src/test/java/org/teiid/query/optimizer/relational/TestRuleStack.java
Log:
TEIID-964 adding support for pushing must pushdown functions in the select clause
Modified: trunk/engine/src/main/java/org/teiid/query/analysis/AnalysisRecord.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/analysis/AnalysisRecord.java 2011-10-27 19:31:00 UTC (rev 3593)
+++ trunk/engine/src/main/java/org/teiid/query/analysis/AnalysisRecord.java 2011-10-28 20:43:18 UTC (rev 3594)
@@ -23,7 +23,6 @@
package org.teiid.query.analysis;
import java.io.PrintWriter;
-import java.io.Serializable;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Collection;
@@ -209,7 +208,7 @@
* @param projectedSymbols The list of SingleElementSymbol projected from a plan or node
* @return List of output columns for sending to the client as part of the plan
*/
- public static List<String> getOutputColumnProperties(List<SingleElementSymbol> projectedSymbols) {
+ public static List<String> getOutputColumnProperties(List<? extends SingleElementSymbol> projectedSymbols) {
if(projectedSymbols != null) {
List<String> outputCols = new ArrayList<String>(projectedSymbols.size());
for(int i=0; i<projectedSymbols.size() ; i++) {
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2011-10-27 19:31:00 UTC (rev 3593)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2011-10-28 20:43:18 UTC (rev 3594)
@@ -64,6 +64,7 @@
import org.teiid.query.optimizer.relational.plantree.NodeConstants.Info;
import org.teiid.query.optimizer.relational.rules.CapabilitiesUtil;
import org.teiid.query.optimizer.relational.rules.CriteriaCapabilityValidatorVisitor;
+import org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements;
import org.teiid.query.optimizer.relational.rules.RuleCollapseSource;
import org.teiid.query.optimizer.relational.rules.RuleConstants;
import org.teiid.query.optimizer.relational.rules.RuleMergeCriteria;
@@ -406,7 +407,7 @@
rules.push(RuleConstants.CALCULATE_COST);
- rules.push(RuleConstants.ASSIGN_OUTPUT_ELEMENTS);
+ rules.push(new RuleAssignOutputElements(true));
if (hints.hasLimit) {
rules.push(RuleConstants.PUSH_LIMIT);
@@ -454,7 +455,7 @@
}
if (hints.hasVirtualGroups || (hints.hasJoin && hints.hasOptionalJoin)) {
//do initial filtering to make merging and optional join logic easier
- rules.push(RuleConstants.ASSIGN_OUTPUT_ELEMENTS);
+ rules.push(new RuleAssignOutputElements(false));
}
rules.push(RuleConstants.PLACE_ACCESS);
return rules;
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAssignOutputElements.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAssignOutputElements.java 2011-10-27 19:31:00 UTC (rev 3593)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAssignOutputElements.java 2011-10-28 20:43:18 UTC (rev 3594)
@@ -35,6 +35,8 @@
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.api.exception.query.QueryPlannerException;
import org.teiid.core.TeiidComponentException;
+import org.teiid.metadata.FunctionMethod.PushDown;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.optimizer.capabilities.CapabilitiesFinder;
@@ -58,12 +60,16 @@
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.symbol.ExpressionSymbol;
+import org.teiid.query.sql.symbol.Function;
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.symbol.SingleElementSymbol;
import org.teiid.query.sql.symbol.WindowFunction;
import org.teiid.query.sql.util.SymbolMap;
import org.teiid.query.sql.visitor.AggregateSymbolCollectorVisitor;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
+import org.teiid.query.sql.visitor.EvaluatableVisitor;
+import org.teiid.query.sql.visitor.ExpressionMappingVisitor;
+import org.teiid.query.sql.visitor.FunctionCollectorVisitor;
import org.teiid.query.sql.visitor.GroupsUsedByElementsVisitor;
import org.teiid.query.util.CommandContext;
@@ -76,6 +82,13 @@
* from the children nodes. </p>
*/
public final class RuleAssignOutputElements implements OptimizerRule {
+
+ private boolean finalRun;
+ private boolean checkSymbols;
+
+ public RuleAssignOutputElements(boolean finalRun) {
+ this.finalRun = finalRun;
+ }
/**
* Execute the rule. This rule is executed exactly once during every planning
@@ -141,6 +154,13 @@
if (command instanceof StoredProcedure) {
//if the access node represents a stored procedure, then we can't actually change the output symbols
root.setProperty(NodeConstants.Info.OUTPUT_COLS, command.getProjectedSymbols());
+ } else if (checkSymbols) {
+ Object modelId = RuleRaiseAccess.getModelIDFromAccess(root, metadata);
+ for (SingleElementSymbol symbol : outputElements) {
+ if(!RuleRaiseAccess.canPushSymbol(symbol, true, modelId, metadata, capFinder, analysisRecord)) {
+ throw new QueryPlannerException(QueryPlugin.Util.getString("RuleAssignOutputElements.couldnt_push_expression", symbol, modelId)); //$NON-NLS-1$
+ }
+ }
}
case NodeConstants.Types.TUPLE_LIMIT:
case NodeConstants.Types.DUP_REMOVE:
@@ -195,7 +215,7 @@
PlanNode sortNode = NodeEditor.findParent(root, NodeConstants.Types.SORT, NodeConstants.Types.SOURCE);
if (sortNode != null && sortNode.hasBooleanProperty(NodeConstants.Info.UNRELATED_SORT)) {
//if this is the initial rule run, remove unrelated order before changing the project cols
- if (rules.contains(RuleConstants.ASSIGN_OUTPUT_ELEMENTS)) {
+ if (!finalRun) {
OrderBy elements = (OrderBy) sortNode.getProperty(NodeConstants.Info.SORT_ORDER);
projectCols = new ArrayList<SingleElementSymbol>(projectCols);
for (OrderByItem item : elements.getOrderByItems()) {
@@ -298,16 +318,21 @@
* virtual elements - so just reset it and proceed as before
* @throws TeiidComponentException
* @throws QueryMetadataException
+ * @throws QueryPlannerException
*/
static List<? extends SingleElementSymbol> determineSourceOutput(PlanNode root,
List<SingleElementSymbol> outputElements,
QueryMetadataInterface metadata,
- CapabilitiesFinder capFinder) throws QueryMetadataException, TeiidComponentException {
+ CapabilitiesFinder capFinder) throws QueryMetadataException, TeiidComponentException, QueryPlannerException {
PlanNode virtualRoot = root.getLastChild();
if(hasDupRemoval(virtualRoot)) {
// Reset the outputColumns for this source node to be all columns for the virtual group
SymbolMap symbolMap = (SymbolMap) root.getProperty(NodeConstants.Info.SYMBOL_MAP);
+ if (!symbolMap.asMap().keySet().containsAll(outputElements)) {
+ outputElements.removeAll(symbolMap.asMap().keySet());
+ throw new QueryPlannerException(QueryPlugin.Util.getString("RuleAssignOutputElements.cannot_introduce_expressions", outputElements)); //$NON-NLS-1$
+ }
return symbolMap.getKeys();
}
PlanNode limit = NodeEditor.findNodePreOrder(root, NodeConstants.Types.TUPLE_LIMIT, NodeConstants.Types.PROJECT);
@@ -359,8 +384,9 @@
* @param sourceNode Node to filter
* @param metadata Metadata implementation
* @return The filtered list of columns for this node (used in recursing tree)
+ * @throws QueryPlannerException
*/
- static List<SingleElementSymbol> filterVirtualElements(PlanNode sourceNode, List<SingleElementSymbol> outputColumns, QueryMetadataInterface metadata) {
+ static List<SingleElementSymbol> filterVirtualElements(PlanNode sourceNode, List<SingleElementSymbol> outputColumns, QueryMetadataInterface metadata) throws QueryPlannerException {
PlanNode virtualRoot = sourceNode.getLastChild();
@@ -379,10 +405,16 @@
boolean updateGroups = outputColumns.size() != originalOrder.size();
boolean[] seenIndex = new boolean[outputColumns.size()];
+ boolean newSymbols = false;
for (int i = 0; i < outputColumns.size(); i++) {
Expression expr = outputColumns.get(i);
filteredIndex[i] = originalOrder.indexOf(expr);
+ if (filteredIndex[i] == -1) {
+ updateGroups = true;
+ //we're adding this symbol, which needs to be updated against respective symbol maps
+ newSymbols = true;
+ }
if (!updateGroups) {
seenIndex[filteredIndex[i]] = true;
}
@@ -402,8 +434,21 @@
PlanNode projectNode = allProjects.get(i);
List<SingleElementSymbol> projectCols = (List<SingleElementSymbol>) projectNode.getProperty(NodeConstants.Info.PROJECT_COLS);
- newCols = RelationalNode.projectTuple(filteredIndex, projectCols);
+ newCols = RelationalNode.projectTuple(filteredIndex, projectCols, true);
+ if (newSymbols) {
+ SymbolMap childMap = SymbolMap.createSymbolMap(symbolMap.getKeys(), (List) projectNode.getProperty(NodeConstants.Info.PROJECT_COLS));
+ for (int j = 0; j < filteredIndex.length; j++) {
+ if (filteredIndex[j] != -1) {
+ continue;
+ }
+ SingleElementSymbol ex = (SingleElementSymbol) outputColumns.get(j).clone();
+ ExpressionMappingVisitor.mapExpressions(ex, childMap.asMap());
+ newCols.set(j, ex);
+ filteredIndex[j] = j;
+ }
+ }
+
projectNode.setProperty(NodeConstants.Info.PROJECT_COLS, newCols);
if (updateGroups) {
projectNode.getGroups().clear();
@@ -428,25 +473,6 @@
for (int i = 0; i < filteredIndex.length; i++) {
newMap.addMapping(originalOrder.get(filteredIndex[i]), originalExpressionOrder.get(filteredIndex[i]));
}
- PlanNode sortNode = NodeEditor.findNodePreOrder(sourceNode, NodeConstants.Types.SORT, NodeConstants.Types.PROJECT);
- if (sortNode != null) {
- OrderBy elements = (OrderBy) sortNode.getProperty(NodeConstants.Info.SORT_ORDER);
- for (OrderByItem item : elements.getOrderByItems()) {
- if (item.getExpressionPosition() == -1) {
- continue;
- }
- item.setExpressionPosition(-1);
- for (int i = 0; i < filteredIndex.length; i++) {
- if (item.getExpressionPosition() == filteredIndex[i]) {
- item.setExpressionPosition(i);
- break;
- }
- }
- if (item.getExpressionPosition() == -1) {
- sortNode.setProperty(NodeConstants.Info.UNRELATED_SORT, true);
- }
- }
- }
sourceNode.setProperty(NodeConstants.Info.SYMBOL_MAP, newMap);
}
@@ -501,7 +527,23 @@
if (ss instanceof WindowFunction || (ss instanceof ExpressionSymbol && !(ss instanceof AggregateSymbol))) {
createdSymbols.add(ss);
}
- ElementCollectorVisitor.getElements(ss, requiredSymbols);
+ boolean symbolRequired = false;
+ if (finalRun && !(ss instanceof ElementSymbol) && NodeEditor.findParent(node, NodeConstants.Types.ACCESS) == null) {
+ Collection<Function> functions = FunctionCollectorVisitor.getFunctions(ss, false);
+ for (Function function : functions) {
+ if (function.getFunctionDescriptor().getPushdown() != PushDown.MUST_PUSHDOWN || EvaluatableVisitor.willBecomeConstant(function)) {
+ continue;
+ }
+ //assume we need the whole thing
+ requiredSymbols.add(ss);
+ symbolRequired = true;
+ checkSymbols = true;
+ break;
+ }
+ }
+ if (!symbolRequired) {
+ ElementCollectorVisitor.getElements(ss, requiredSymbols);
+ }
}
break;
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleConstants.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleConstants.java 2011-10-27 19:31:00 UTC (rev 3593)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleConstants.java 2011-10-28 20:43:18 UTC (rev 3594)
@@ -36,7 +36,6 @@
public static final OptimizerRule RAISE_ACCESS = new RuleRaiseAccess();
public static final OptimizerRule CHOOSE_DEPENDENT = new RuleChooseDependent();
public static final OptimizerRule COLLAPSE_SOURCE = new RuleCollapseSource();
- public static final OptimizerRule ASSIGN_OUTPUT_ELEMENTS = new RuleAssignOutputElements();
public static final OptimizerRule COPY_CRITERIA = new RuleCopyCriteria();
public static final OptimizerRule CLEAN_CRITERIA = new RuleCleanCriteria();
public static final OptimizerRule VALIDATE_WHERE_ALL = new RuleValidateWhereAll();
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleMergeVirtual.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleMergeVirtual.java 2011-10-27 19:31:00 UTC (rev 3593)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleMergeVirtual.java 2011-10-28 20:43:18 UTC (rev 3594)
@@ -202,11 +202,12 @@
* Removes source layers that only do a simple projection of the elements below.
* @throws TeiidComponentException
* @throws QueryMetadataException
+ * @throws QueryPlannerException
*/
private static PlanNode checkForSimpleProjection(PlanNode frame,
PlanNode root,
PlanNode parentProject,
- QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException {
+ QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException, QueryPlannerException {
// check that the parent only performs projection
PlanNode nodeToCheck = parentProject.getFirstChild();
while (nodeToCheck != frame) {
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java 2011-10-27 19:31:00 UTC (rev 3593)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java 2011-10-28 20:43:18 UTC (rev 3594)
@@ -452,7 +452,7 @@
* @throws QueryMetadataException
* @since 4.1.2
*/
- private static boolean canPushSymbol(Expression symbol, boolean inSelectClause, Object modelID,
+ static boolean canPushSymbol(Expression symbol, boolean inSelectClause, Object modelID,
QueryMetadataInterface metadata, CapabilitiesFinder capFinder, AnalysisRecord record)
throws TeiidComponentException, QueryMetadataException {
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/GroupingNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/GroupingNode.java 2011-10-27 19:31:00 UTC (rev 3593)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/GroupingNode.java 2011-10-28 20:43:18 UTC (rev 3594)
@@ -167,7 +167,7 @@
}
// Incoming elements and lookup map for evaluating expressions
- List<SingleElementSymbol> sourceElements = this.getChildren()[0].getElements();
+ List<? extends SingleElementSymbol> sourceElements = this.getChildren()[0].getElements();
this.elementMap = createLookupMap(sourceElements);
// List should contain all grouping columns / expressions as we need those for sorting
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/NestedTableJoinStrategy.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/NestedTableJoinStrategy.java 2011-10-27 19:31:00 UTC (rev 3593)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/NestedTableJoinStrategy.java 2011-10-28 20:43:18 UTC (rev 3594)
@@ -164,7 +164,7 @@
}
private void updateContext(List<?> tuple,
- List<SingleElementSymbol> elements) {
+ List<? extends SingleElementSymbol> elements) {
for (int i = 0; i < elements.size(); i++) {
SingleElementSymbol element = elements.get(i);
if (element instanceof ElementSymbol) {
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/RelationalNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/RelationalNode.java 2011-10-27 19:31:00 UTC (rev 3593)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/RelationalNode.java 2011-10-28 20:43:18 UTC (rev 3594)
@@ -46,6 +46,7 @@
import org.teiid.query.processor.BatchCollector.BatchProducer;
import org.teiid.query.sql.symbol.AliasSymbol;
import org.teiid.query.sql.symbol.Expression;
+import org.teiid.query.sql.symbol.SingleElementSymbol;
import org.teiid.query.util.CommandContext;
@@ -53,7 +54,7 @@
static class NodeData {
int nodeID;
- List elements;
+ List<? extends SingleElementSymbol> elements;
Number estimateNodeCardinality;
Number setSizeEstimate;
Number depAccessEstimate;
@@ -165,16 +166,16 @@
}
}
- public void setElements(List elements) {
+ public void setElements(List<? extends SingleElementSymbol> elements) {
this.data.elements = elements;
}
@Override
- public List getOutputElements() {
+ public List<? extends SingleElementSymbol> getOutputElements() {
return getElements();
}
- public List getElements() {
+ public List<? extends SingleElementSymbol> getElements() {
return this.data.elements;
}
@@ -373,13 +374,21 @@
return result;
}
-
+
public static <T> List<T> projectTuple(int[] indexes, List<T> tupleValues) {
+ return projectTuple(indexes, tupleValues, false);
+ }
+ public static <T> List<T> projectTuple(int[] indexes, List<T> tupleValues, boolean omitMissing) {
+
List<T> projectedTuple = new ArrayList<T>(indexes.length);
for (int index : indexes) {
- projectedTuple.add(tupleValues.get(index));
+ if (omitMissing && index == -1) {
+ projectedTuple.add(null);
+ } else {
+ projectedTuple.add(tupleValues.get(index));
+ }
}
return projectedTuple;
Modified: trunk/engine/src/main/resources/org/teiid/query/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2011-10-27 19:31:00 UTC (rev 3593)
+++ trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2011-10-28 20:43:18 UTC (rev 3594)
@@ -941,4 +941,7 @@
DdlPlan.event_already_exists={0} already has an INSTEAD OF trigger defined for {1}.
error_refresh=error occurred during refreshing the materialized view entries for view {0}
-support_required=Without required support property {0}, pushdown will not be enabled for {1} on translator {2}.
\ No newline at end of file
+support_required=Without required support property {0}, pushdown will not be enabled for {1} on translator {2}.
+
+RuleAssignOutputElements.couldnt_push_expression=Expression(s) {0} cannot be pushed to source.
+RuleAssignOutputElements.cannot_introduce_expressions=Cannot introduce new expressions {1} in duplicate removal.
\ No newline at end of file
Modified: trunk/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java 2011-10-27 19:31:00 UTC (rev 3593)
+++ trunk/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java 2011-10-28 20:43:18 UTC (rev 3594)
@@ -6471,77 +6471,9 @@
/**
* Test the query optimizer's ability to properly plan and optimize a query
- * that uses ambiguous alias names in the top level query and its sub-query.
- * <p>
- * No source table is being used. For example, <code>SELECT A.e2 FROM
- * (SELECT e2 FROM (SELECT 1 AS e2) AS A) AS A</code>
- * <p>
- * The test is to ensure that A.e2 from the top level is not confused with
- * e2 in the second level.
- * <p>
- * Related Defects: JBEDSP-1137
- */
- @Test public void testAmbiguousAliasInSubQueryNoSource() {
- // Create query
- String sql = "SELECT A.e2 AS e2 FROM (" + //$NON-NLS-1$
- " SELECT e2 AS e2 FROM (" + //$NON-NLS-1$
- " SELECT 5 AS e2" + //$NON-NLS-1$
- " ) AS A" + //$NON-NLS-1$
- ") AS A"; //$NON-NLS-1$
-
- helpPlan(sql, RealMetadataFactory.example1Cached(), new String[] {});
- }
-
- /**
- * Test the query optimizer's ability to properly plan and optimize a query
* that uses ambiguous alias names in the top level query and its sub-query
* and uses columns belonging to the alias as a parameter to a function.
* <p>
- * No source table is being used. For example, <code>SELECT CONVERT(A.e2,
- * biginteger) AS e2 FROM (SELECT CONVERT(e2, long) AS e2 FROM (SELECT 1 AS
- * e2) AS A) AS A</code>
- * <p>
- * The test is to ensure that A.e2 from the top level is not confused with
- * e2 in the second level.
- * <p>
- * Related Defects: JBEDSP-1137
- */
- @Test public void testAmbiguousAliasFunctionInSubQueryNoSource() {
- // Create query
- String sql = "SELECT CONVERT(A.e2, biginteger) AS e2 FROM (" + //$NON-NLS-1$
- " SELECT CONVERT(e2, long) AS e2 FROM (" + //$NON-NLS-1$
- " SELECT 5 AS e2" + //$NON-NLS-1$
- " ) AS A" + //$NON-NLS-1$
- ") AS A"; //$NON-NLS-1$
-
- helpPlan(sql, RealMetadataFactory.example1Cached(), new String[] {});
- }
-
- /**
- * Test the query optimizer's ability to properly plan and optimize a query
- * that uses ambiguous alias names in the top level query and its sub-query.
- * <p>
- * For example, <code>SELECT A.e2 FROM (SELECT e12FROM pm1.g1 AS A) AS A</code>
- * <p>
- * The test is to ensure that A.e2 from the top level is not confused with
- * e2 in the second level.
- * <p>
- * Related Defects: JBEDSP-1137
- */
- @Test public void testAmbiguousAliasInSubQuerySource() {
- // Create query
- String sql = "SELECT A.e2 AS e2 FROM (" + //$NON-NLS-1$
- " SELECT e2 AS e2 FROM pm1.g1 AS A" + //$NON-NLS-1$
- ") AS A"; //$NON-NLS-1$
-
- helpPlan(sql, RealMetadataFactory.example1Cached(), new String[] {"SELECT e2 FROM pm1.g1 AS A"}); //$NON-NLS-1$
- }
-
- /**
- * Test the query optimizer's ability to properly plan and optimize a query
- * that uses ambiguous alias names in the top level query and its sub-query
- * and uses columns belonging to the alias as a parameter to a function.
- * <p>
* For example, <code>SELECT CONVERT(A.e2, biginteger) AS e2 FROM (SELECT
* CONVERT(e2, long) AS e2 FROM pm1.g1 AS A) AS A</code>
* <p>
Modified: trunk/engine/src/test/java/org/teiid/query/optimizer/relational/TestRuleStack.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/optimizer/relational/TestRuleStack.java 2011-10-27 19:31:00 UTC (rev 3593)
+++ trunk/engine/src/test/java/org/teiid/query/optimizer/relational/TestRuleStack.java 2011-10-28 20:43:18 UTC (rev 3594)
@@ -22,14 +22,12 @@
package org.teiid.query.optimizer.relational;
-import org.teiid.query.optimizer.relational.OptimizerRule;
-import org.teiid.query.optimizer.relational.RuleStack;
+import junit.framework.TestCase;
+
import org.teiid.query.optimizer.relational.rules.RuleConstants;
import org.teiid.query.optimizer.relational.rules.RulePushSelectCriteria;
-import junit.framework.TestCase;
-
/**
*/
public class TestRuleStack extends TestCase {
@@ -76,12 +74,12 @@
public void testRemove() {
// Set up
RuleStack stack = new RuleStack();
- stack.push(RuleConstants.ASSIGN_OUTPUT_ELEMENTS);
+ stack.push(RuleConstants.ACCESS_PATTERN_VALIDATION);
stack.push(RuleConstants.COLLAPSE_SOURCE);
- stack.push(RuleConstants.ASSIGN_OUTPUT_ELEMENTS);
+ stack.push(RuleConstants.ACCESS_PATTERN_VALIDATION);
// Remove all instances of ASSIGN_OUTPUT_ELEMENTS
- stack.remove(RuleConstants.ASSIGN_OUTPUT_ELEMENTS);
+ stack.remove(RuleConstants.ACCESS_PATTERN_VALIDATION);
// Verify size and pop'ed values
assertEquals(1, stack.size());
@@ -92,10 +90,10 @@
public void testContains() {
// Set up
RuleStack stack = new RuleStack();
- stack.push(RuleConstants.ASSIGN_OUTPUT_ELEMENTS);
+ stack.push(RuleConstants.ACCESS_PATTERN_VALIDATION);
stack.push(RuleConstants.COLLAPSE_SOURCE);
- assertEquals(true, stack.contains(RuleConstants.ASSIGN_OUTPUT_ELEMENTS));
+ assertEquals(true, stack.contains(RuleConstants.ACCESS_PATTERN_VALIDATION));
assertEquals(false, stack.contains(RuleConstants.PLACE_ACCESS));
}
Added: trunk/engine/src/test/java/org/teiid/query/processor/TestFunctionPushdown.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/TestFunctionPushdown.java (rev 0)
+++ trunk/engine/src/test/java/org/teiid/query/processor/TestFunctionPushdown.java 2011-10-28 20:43:18 UTC (rev 3594)
@@ -0,0 +1,114 @@
+/*
+ * 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.query.processor;
+
+import static org.teiid.query.optimizer.TestOptimizer.*;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.junit.Test;
+import org.teiid.query.function.FunctionTree;
+import org.teiid.query.metadata.QueryMetadataInterface;
+import org.teiid.query.optimizer.FakeFunctionMetadataSource;
+import org.teiid.query.optimizer.TestOptimizer;
+import org.teiid.query.optimizer.TestOptimizer.ComparisonMode;
+import org.teiid.query.optimizer.capabilities.BasicSourceCapabilities;
+import org.teiid.query.optimizer.capabilities.FakeCapabilitiesFinder;
+import org.teiid.query.unittest.RealMetadataFactory;
+
+@SuppressWarnings({"nls", "unchecked"})
+public class TestFunctionPushdown {
+
+ @Test public void testMustPushdownOverMultipleSourcesWithoutSupport() throws Exception {
+ QueryMetadataInterface metadata = RealMetadataFactory.createTransformationMetadata(RealMetadataFactory.example1Cached().getMetadataStore(), "example1", new FunctionTree("foo", new FakeFunctionMetadataSource()));
+
+ FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
+ BasicSourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
+ capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
+ capFinder.addCapabilities("pm2", caps); //$NON-NLS-1$
+
+ String sql = "select func(x.e1) from pm1.g1 as x, pm2.g1 as y where x.e2 = y.e2"; //$NON-NLS-1$
+
+ helpPlan(sql, metadata, null, capFinder,
+ new String[] {}, ComparisonMode.FAILED_PLANNING); //$NON-NLS-1$
+ }
+
+ @Test public void testMustPushdownOverMultipleSources() throws Exception {
+ QueryMetadataInterface metadata = RealMetadataFactory.createTransformationMetadata(RealMetadataFactory.example1Cached().getMetadataStore(), "example1", new FunctionTree("foo", new FakeFunctionMetadataSource()));
+
+ FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
+ BasicSourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
+ caps.setFunctionSupport("misc.namespace.func", true);
+ capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
+ capFinder.addCapabilities("pm2", caps); //$NON-NLS-1$
+
+ String sql = "select func(x.e1) from pm1.g1 as x, pm2.g1 as y where x.e2 = y.e2"; //$NON-NLS-1$
+
+ ProcessorPlan plan = helpPlan(sql, metadata, null, capFinder,
+ new String[] {"SELECT g_0.e2 AS c_0, func(g_0.e1) AS c_1 FROM pm1.g1 AS g_0 ORDER BY c_0", "SELECT g_0.e2 AS c_0 FROM pm2.g1 AS g_0 ORDER BY c_0"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$
+
+ HardcodedDataManager dataManager = new HardcodedDataManager();
+ dataManager.addData("SELECT g_0.e2 AS c_0, func(g_0.e1) AS c_1 FROM pm1.g1 AS g_0 ORDER BY c_0", new List[] {Arrays.asList(1, "a")});
+ dataManager.addData("SELECT g_0.e2 AS c_0 FROM pm2.g1 AS g_0 ORDER BY c_0", new List[] {Arrays.asList(1), Arrays.asList(2)});
+
+ TestProcessor.helpProcess(plan, dataManager, new List[] {Arrays.asList("a")});
+ }
+
+ @Test public void testMustPushdownOverMultipleSourcesWithView() throws Exception {
+ QueryMetadataInterface metadata = RealMetadataFactory.createTransformationMetadata(RealMetadataFactory.example1Cached().getMetadataStore(), "example1", new FunctionTree("foo", new FakeFunctionMetadataSource()));
+
+ FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
+ BasicSourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
+ caps.setFunctionSupport("misc.namespace.func", true);
+ capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
+ capFinder.addCapabilities("pm2", caps); //$NON-NLS-1$
+
+ String sql = "select func(x.e1) from (select x.* from pm1.g1 as x, pm2.g1 as y where x.e2 = y.e2 order by e1 limit 10) as x"; //$NON-NLS-1$
+
+ ProcessorPlan plan = helpPlan(sql, metadata, null, capFinder,
+ new String[] {"SELECT g_0.e2 AS c_0 FROM pm2.g1 AS g_0 ORDER BY c_0", "SELECT g_0.e2 AS c_0, func(g_0.e1) AS c_1, g_0.e1 AS c_2 FROM pm1.g1 AS g_0 ORDER BY c_0"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$
+
+ HardcodedDataManager dataManager = new HardcodedDataManager();
+ dataManager.addData("SELECT g_0.e2 AS c_0 FROM pm2.g1 AS g_0 ORDER BY c_0", new List[] {Arrays.asList(1)});
+ dataManager.addData("SELECT g_0.e2 AS c_0, func(g_0.e1) AS c_1, g_0.e1 AS c_2 FROM pm1.g1 AS g_0 ORDER BY c_0", new List[] {Arrays.asList(1, "aa", "a"), Arrays.asList(2, "bb", "b")});
+
+ TestProcessor.helpProcess(plan, dataManager, new List[] {Arrays.asList("aa")});
+ }
+
+ @Test public void testMustPushdownOverMultipleSourcesWithViewDupRemoval() throws Exception {
+ QueryMetadataInterface metadata = RealMetadataFactory.createTransformationMetadata(RealMetadataFactory.example1Cached().getMetadataStore(), "example1", new FunctionTree("foo", new FakeFunctionMetadataSource()));
+
+ FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
+ BasicSourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
+ caps.setFunctionSupport("misc.namespace.func", true);
+ capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
+ capFinder.addCapabilities("pm2", caps); //$NON-NLS-1$
+
+ String sql = "select func(x.e1) from (select distinct x.* from pm1.g1 as x, pm2.g1 as y where x.e2 = y.e2 order by e1 limit 10) as x"; //$NON-NLS-1$
+
+ helpPlan(sql, metadata, null, capFinder,
+ new String[] {}, ComparisonMode.FAILED_PLANNING); //$NON-NLS-1$
+ }
+
+}
Property changes on: trunk/engine/src/test/java/org/teiid/query/processor/TestFunctionPushdown.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 2 months
teiid SVN: r3593 - trunk/build/kits/jboss-container.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-10-27 15:31:00 -0400 (Thu, 27 Oct 2011)
New Revision: 3593
Modified:
trunk/build/kits/jboss-container/teiid-releasenotes.html
Log:
release note updates
Modified: trunk/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-10-27 19:27:00 UTC (rev 3592)
+++ trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-10-27 19:31:00 UTC (rev 3593)
@@ -47,6 +47,7 @@
<ul>
<li>Leave was added as a reserved word.
<li>Lob inlining is incompatible with clients older than 7.6. If a 7.6 server will have older clients that use lobs connect to it, then the BufferService property inlineLobs should be set to false in the teiid-jboss-beans.xml file.
+ <li>Oracle translators assume they are using Oracle supplied drivers. If that is not the case, set the Oracle translator execution property oracleSuppliedDriver to false.
</ul>
<h4>from 7.4</h4>
@@ -119,7 +120,8 @@
<h4>from 7.4</h4>
<ul>
- <li>The configuration for the buffer service now defaults to 256/512 for processor and connector batch sizes respectively. The buffer service also has 4 new properties inlineLobs, memoryBufferSpace, memoryBufferOffHeap, and maxStorageObjectSize.
+ <li>The configuration for the buffer service now defaults to 256/512 for processor and connector batch sizes respectively. The buffer service also has 4 new properties inlineLobs, memoryBufferSpace, memoryBufferOffHeap, and maxStorageObjectSize.
+ If you were explicitly setting the value for maxReserveKb, you should consider lowering that value to account for the memory buffer and/or explicitly set the memoryBufferSpace.
</ul>
<h4>from 7.4</h4>
13 years, 2 months
teiid SVN: r3592 - in trunk: connectors/translator-ldap/src/main/java/org/teiid/translator/ldap and 1 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-10-27 15:27:00 -0400 (Thu, 27 Oct 2011)
New Revision: 3592
Modified:
trunk/connectors/connector-ldap/src/test/java/org/teiid/resource/adapter/ldap/TestLDAPConnection.java
trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPExecutionFactory.java
trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java
trunk/documentation/reference/src/main/docbook/en-US/content/translators.xml
Log:
TEIID-1797 refining the handling of sizelimitexceededexceptions
Modified: trunk/connectors/connector-ldap/src/test/java/org/teiid/resource/adapter/ldap/TestLDAPConnection.java
===================================================================
--- trunk/connectors/connector-ldap/src/test/java/org/teiid/resource/adapter/ldap/TestLDAPConnection.java 2011-10-27 17:05:18 UTC (rev 3591)
+++ trunk/connectors/connector-ldap/src/test/java/org/teiid/resource/adapter/ldap/TestLDAPConnection.java 2011-10-27 19:27:00 UTC (rev 3592)
@@ -30,10 +30,8 @@
import org.junit.Test;
import org.mockito.Mockito;
-import org.teiid.resource.adapter.ldap.LDAPConnectionImpl;
-import org.teiid.resource.adapter.ldap.LDAPManagedConnectionFactory;
-
+@SuppressWarnings("nls")
public class TestLDAPConnection {
public static class FakeFactory implements InitialContextFactory {
Modified: trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPExecutionFactory.java
===================================================================
--- trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPExecutionFactory.java 2011-10-27 17:05:18 UTC (rev 3591)
+++ trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPExecutionFactory.java 2011-10-27 19:27:00 UTC (rev 3592)
@@ -54,6 +54,7 @@
private boolean restrictToObjectClass;
private SearchDefaultScope searchDefaultScope = SearchDefaultScope.ONELEVEL_SCOPE;
private boolean usePagination;
+ private boolean exceptionOnSizeLimitExceeded;
public LDAPExecutionFactory() {
this.setMaxInCriteriaSize(1000);
@@ -154,4 +155,14 @@
this.usePagination = usePagination;
}
+ @TranslatorProperty(display="Exception on Size Limit Exceeded", description="Set to true to throw an exception when a SizeLimitExceededException is received and a LIMIT is not properly enforced.")
+ public boolean isExceptionOnSizeLimitExceeded() {
+ return exceptionOnSizeLimitExceeded;
+ }
+
+ public void setExceptionOnSizeLimitExceeded(
+ boolean exceptionOnSizeLimitExceeded) {
+ this.exceptionOnSizeLimitExceeded = exceptionOnSizeLimitExceeded;
+ }
+
}
Modified: trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java
===================================================================
--- trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java 2011-10-27 17:05:18 UTC (rev 3591)
+++ trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java 2011-10-27 19:27:00 UTC (rev 3592)
@@ -124,6 +124,7 @@
private LDAPExecutionFactory executionFactory;
private ExecutionContext executionContext;
private SearchControls ctrls;
+ private int resultCount;
/**
* Constructor
@@ -323,16 +324,21 @@
return next();
}
+ if (result != null) {
+ resultCount++;
+ }
return result;
} catch (SizeLimitExceededException e) {
- LogManager.logWarning(LogConstants.CTX_CONNECTOR, "Search results exceeded size limit. Results may be incomplete."); //$NON-NLS-1$
- searchEnumeration = null; // GHH 20080326 - NamingEnumartion's are no longer good after an exception so toss it
+ if (resultCount != searchDetails.getCountLimit()) {
+ String msg = "LDAP Search results exceeded size limit. Results may be incomplete."; //$NON-NLS-1$
+ if (executionFactory.isExceptionOnSizeLimitExceeded()) {
+ throw new TranslatorException(e, msg);
+ }
+ LogManager.logWarning(LogConstants.CTX_CONNECTOR, e, msg);
+ }
return null; // GHH 20080326 - if size limit exceeded don't try to read more results
} catch (NamingException ne) {
- final String msg = "Ldap error while processing next batch of results: " + ne.getExplanation(); //$NON-NLS-1$
- LogManager.logError(LogConstants.CTX_CONNECTOR, msg); // GHH 20080326 - changed to output explanation from LDAP server
- searchEnumeration = null; // GHH 20080326 - NamingEnumertion's are no longer good after an exception so toss it
- throw new TranslatorException(msg);
+ throw new TranslatorException(ne, "Ldap error while processing next batch of results"); //$NON-NLS-1$
}
}
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/translators.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/translators.xml 2011-10-27 17:05:18 UTC (rev 3591)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/translators.xml 2011-10-27 19:27:00 UTC (rev 3592)
@@ -566,6 +566,11 @@
<entry>Use a PagedResultsControl to page through large results. This is not supported by all directory servers.</entry>
<entry>false</entry>
</row>
+ <row>
+ <entry>ExceptionOnSizeLimitExceeded</entry>
+ <entry>Set to true to throw an exception when a SizeLimitExceededException is received and a LIMIT is not properly enforced.</entry>
+ <entry>false</entry>
+ </row>
</tbody>
</tgroup>
</table>
13 years, 2 months
teiid SVN: r3591 - in trunk: connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc and 3 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-10-27 13:05:18 -0400 (Thu, 27 Oct 2011)
New Revision: 3591
Modified:
trunk/api/src/main/java/org/teiid/language/Call.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCProcedureExecution.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java
trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java
trunk/documentation/reference/src/main/docbook/en-US/content/translators.xml
Log:
TEIID-832 added support for calling oracle stored procedures returning cursor/resultsets
Modified: trunk/api/src/main/java/org/teiid/language/Call.java
===================================================================
--- trunk/api/src/main/java/org/teiid/language/Call.java 2011-10-27 14:44:07 UTC (rev 3590)
+++ trunk/api/src/main/java/org/teiid/language/Call.java 2011-10-27 17:05:18 UTC (rev 3591)
@@ -93,6 +93,9 @@
return null;
}
+ /**
+ * @return the result set types or a zero length array if no result set is returned
+ */
public Class<?>[] getResultSetColumnTypes() {
ColumnSet<Procedure> resultSet = this.metadataObject.getResultSet();
if (resultSet == null) {
Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCProcedureExecution.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCProcedureExecution.java 2011-10-27 14:44:07 UTC (rev 3590)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCProcedureExecution.java 2011-10-27 17:05:18 UTC (rev 3591)
@@ -31,10 +31,10 @@
import org.teiid.language.Argument;
import org.teiid.language.Call;
import org.teiid.language.Command;
-import org.teiid.translator.TranslatorException;
import org.teiid.translator.DataNotAvailableException;
import org.teiid.translator.ExecutionContext;
import org.teiid.translator.ProcedureExecution;
+import org.teiid.translator.TranslatorException;
/**
*/
@@ -87,7 +87,10 @@
List<Object> result = new ArrayList<Object>();
int paramIndex = 1;
if (proc.getReturnType() != null) {
- addParameterValue(result, paramIndex++, proc.getReturnType());
+ if (proc.getReturnParameter() != null) {
+ addParameterValue(result, paramIndex, proc.getReturnType());
+ }
+ paramIndex++;
}
for (Argument parameter : proc.getArguments()) {
switch (parameter.getDirection()) {
Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java 2011-10-27 14:44:07 UTC (rev 3590)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java 2011-10-27 17:05:18 UTC (rev 3591)
@@ -26,7 +26,9 @@
import static org.teiid.translator.TypeFacility.RUNTIME_NAMES.*;
+import java.sql.CallableStatement;
import java.sql.PreparedStatement;
+import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.sql.Types;
@@ -35,6 +37,7 @@
import java.util.Collection;
import java.util.List;
+import org.teiid.language.Call;
import org.teiid.language.ColumnReference;
import org.teiid.language.Command;
import org.teiid.language.DerivedColumn;
@@ -42,6 +45,7 @@
import org.teiid.language.ExpressionValueSource;
import org.teiid.language.Function;
import org.teiid.language.Insert;
+import org.teiid.language.LanguageObject;
import org.teiid.language.Limit;
import org.teiid.language.Literal;
import org.teiid.language.NamedTable;
@@ -55,6 +59,7 @@
import org.teiid.translator.SourceSystemFunctions;
import org.teiid.translator.Translator;
import org.teiid.translator.TranslatorException;
+import org.teiid.translator.TranslatorProperty;
import org.teiid.translator.TypeFacility;
import org.teiid.translator.jdbc.AliasModifier;
import org.teiid.translator.jdbc.ConvertModifier;
@@ -62,6 +67,7 @@
import org.teiid.translator.jdbc.FunctionModifier;
import org.teiid.translator.jdbc.JDBCExecutionFactory;
import org.teiid.translator.jdbc.LocateFunctionModifier;
+import org.teiid.translator.jdbc.TranslatedCommand;
@Translator(name="oracle", description="A translator for Oracle 9i Database or later")
@@ -85,6 +91,14 @@
public static final String WITHIN_DISTANCE = "sdo_within_distance"; //$NON-NLS-1$
public static final String NEAREST_NEIGHBOR_DISTANCE = "sdo_nn_distance"; //$NON-NLS-1$
public static final String ORACLE_SDO = "Oracle-SDO"; //$NON-NLS-1$
+
+ /*
+ * Handling for cursor return values
+ */
+ static final class RefCursorType {}
+ static int CURSOR_TYPE = -10;
+
+ private boolean oracleSuppliedDriver = true;
public void start() throws TranslatorException {
super.start();
@@ -548,4 +562,46 @@
return "REGEXP_LIKE"; //$NON-NLS-1$
}
+ public void setOracleSuppliedDriver(boolean oracleNative) {
+ this.oracleSuppliedDriver = oracleNative;
+ }
+
+ @TranslatorProperty(display="Oracle Native Driver", description="True if the driver is an Oracle supplied driver",advanced=true)
+ public boolean isOracleSuppliedDriver() {
+ return oracleSuppliedDriver;
+ }
+
+ @Override
+ public List<?> translate(LanguageObject obj, ExecutionContext context) {
+ if (oracleSuppliedDriver && obj instanceof Call) {
+ Call call = (Call)obj;
+ //oracle returns the resultset as a parameter
+ if (call.getReturnType() == null) {
+ call.setReturnType(RefCursorType.class);
+ }
+ }
+ return super.translate(obj, context);
+ }
+
+ @Override
+ protected void registerSpecificTypeOfOutParameter(
+ CallableStatement statement, Class<?> runtimeType, int index)
+ throws SQLException {
+ if (oracleSuppliedDriver && index == 1 && runtimeType == RefCursorType.class) {
+ statement.registerOutParameter(1, CURSOR_TYPE);
+ } else {
+ super.registerSpecificTypeOfOutParameter(statement, runtimeType, index);
+ }
+ }
+
+ @Override
+ public ResultSet executeStoredProcedure(CallableStatement statement,
+ TranslatedCommand command, Class<?> returnType) throws SQLException {
+ ResultSet rs = super.executeStoredProcedure(statement, command, returnType);
+ if (!oracleSuppliedDriver || returnType != RefCursorType.class) {
+ return rs;
+ }
+ return (ResultSet)statement.getObject(1);
+ }
+
}
Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java 2011-10-27 14:44:07 UTC (rev 3590)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java 2011-10-27 17:05:18 UTC (rev 3591)
@@ -24,10 +24,15 @@
import static org.junit.Assert.*;
+import java.sql.CallableStatement;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.util.Arrays;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
+import org.mockito.Mockito;
import org.teiid.cdk.CommandBuilder;
import org.teiid.cdk.api.TranslationUtility;
import org.teiid.core.types.DataTypeManager;
@@ -45,6 +50,7 @@
import org.teiid.query.unittest.RealMetadataFactory;
import org.teiid.translator.ExecutionContext;
import org.teiid.translator.TranslatorException;
+import org.teiid.translator.jdbc.JDBCProcedureExecution;
import org.teiid.translator.jdbc.TranslatedCommand;
import org.teiid.translator.jdbc.TranslationHelper;
@@ -789,5 +795,32 @@
input, output,
TRANSLATOR);
}
+
+ @Test public void testCallWithResultSet() throws Exception {
+ String input = "call spTest5(1)"; //$NON-NLS-1$
+ String output = "{ ?= call spTest5(?)}"; //$NON-NLS-1$
+ TranslationHelper.helpTestVisitor(TranslationHelper.BQT_VDB,
+ input, output,
+ TRANSLATOR);
+ }
+
+ @Test public void testProcedureExecution() throws Exception {
+ Command command = TranslationHelper.helpTranslate(TranslationHelper.BQT_VDB, "call spTest8(1)"); //$NON-NLS-1$
+ Connection connection = Mockito.mock(Connection.class);
+ CallableStatement cs = Mockito.mock(CallableStatement.class);
+ Mockito.stub(cs.getUpdateCount()).toReturn(-1);
+ ResultSet rs = Mockito.mock(ResultSet.class);
+ Mockito.stub(cs.getObject(1)).toReturn(rs);
+ Mockito.stub(cs.getInt(3)).toReturn(4);
+ Mockito.stub(connection.prepareCall("{ ?= call spTest8(?,?)}")).toReturn(cs); //$NON-NLS-1$
+ OracleExecutionFactory ef = new OracleExecutionFactory();
+
+ JDBCProcedureExecution procedureExecution = new JDBCProcedureExecution(command, connection, Mockito.mock(ExecutionContext.class), ef);
+ procedureExecution.execute();
+ assertEquals(Arrays.asList(4), procedureExecution.getOutputParameterValues());
+ Mockito.verify(cs, Mockito.times(1)).registerOutParameter(1, OracleExecutionFactory.CURSOR_TYPE);
+ Mockito.verify(cs, Mockito.times(1)).getObject(1);
+ }
+
}
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/translators.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/translators.xml 2011-10-27 14:44:07 UTC (rev 3590)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/translators.xml 2011-10-27 17:05:18 UTC (rev 3591)
@@ -322,6 +322,12 @@
A rownum colum should have a name in source of <code>rownum</code>. These rownum columns do not
have the same semantics as the Oracle rownum construct so care must be taken in their usage.
</para>
+ <para>Oracle specific execution properties:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>OracleSuppliedDriver</emphasis> - indicates that the Oracle supplied driver (typically prefixed by ojdbc) is being used. Defaults to true. Set to false when using DataDirect or other Oracle JDBC drivers.</para>
+ </listitem>
+ </itemizedlist>
</listitem>
<listitem>
<para>
13 years, 2 months
teiid SVN: r3590 - in branches/as7: admin/src/main/java/org/teiid/adminapi and 4 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2011-10-27 10:44:07 -0400 (Thu, 27 Oct 2011)
New Revision: 3590
Modified:
branches/as7/admin/src/main/java/org/teiid/adminapi/Admin.java
branches/as7/admin/src/main/java/org/teiid/adminapi/AdminFactory.java
branches/as7/admin/src/main/resources/org/teiid/adminapi/i18n.properties
branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java
branches/as7/pom.xml
branches/as7/runtime/pom.xml
Log:
TEIID-1720: Upgrade 7.1.0Alpha2, Admin implementation of data sources
Modified: branches/as7/admin/src/main/java/org/teiid/adminapi/Admin.java
===================================================================
--- branches/as7/admin/src/main/java/org/teiid/adminapi/Admin.java 2011-10-26 20:02:37 UTC (rev 3589)
+++ branches/as7/admin/src/main/java/org/teiid/adminapi/Admin.java 2011-10-27 14:44:07 UTC (rev 3590)
@@ -287,4 +287,11 @@
* @throws AdminException
*/
Set<String> getDataSourceTemplateNames() throws AdminException;
+
+ /**
+ * Tell the engine that the given source is available. Pending dynamic vdb metadata loads will be resumed.
+ * @param jndiName
+ * @throws AdminException
+ */
+ void markDataSourceAvailable(String jndiName) throws AdminException;
}
Modified: branches/as7/admin/src/main/java/org/teiid/adminapi/AdminFactory.java
===================================================================
--- branches/as7/admin/src/main/java/org/teiid/adminapi/AdminFactory.java 2011-10-26 20:02:37 UTC (rev 3589)
+++ branches/as7/admin/src/main/java/org/teiid/adminapi/AdminFactory.java 2011-10-27 14:44:07 UTC (rev 3590)
@@ -191,41 +191,197 @@
}
}
- private void createConnectionFactoryRequest(String deploymentName, String templateName, Properties properties, DefaultOperationRequestBuilder builder) throws AdminException {
- builder.addProperty("archive", templateName);
- builder.addProperty("transaction-support", properties.getProperty("transaction-support", "NoTransaction"));
- properties.remove("transaction-support");
+ private void createConnectionFactory(String deploymentName, String templateName, Properties properties) throws AdminException {
+ Set<String> resourceAdapters = getDeployedResourceAdapterNames();
+ if (!resourceAdapters.contains(templateName)) {
+ addResourceAdapter(templateName);
+ }
+
+ ///subsystem=resource-adapters/resource-adapter=teiid-connector-file.rar/connection-definitions=fooDS:add(class-name=org.teiid.resource.adapter.file.FileManagedConnectionFactory, jndi-name=java\:\/fooDS, pool-name=foo-pool)
+ DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
+ final ModelNode request;
+
+ try {
+ builder.addNode("subsystem", "resource-adapters"); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.addNode("resource-adapter", templateName); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.addNode("connection-definitions", deploymentName); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.setOperationName("add");
+ builder.addProperty("jndi-name", "java:/"+deploymentName);
+ builder.addProperty("pool-name", deploymentName);
+ request = builder.buildRequest();
+ } catch (OperationFormatException e) {
+ throw new IllegalStateException("Failed to build operation", e); //$NON-NLS-1$
+ }
+
+ try {
+ ModelNode outcome = this.connection.execute(request);
+ if (!Util.isSuccess(outcome)) {
+ throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ }
+ } catch (IOException e) {
+ throw new AdminProcessingException(e);
+ }
+
+ // add all the config properties
+ Enumeration keys = properties.propertyNames();
+ while (keys.hasMoreElements()) {
+ String key = (String)keys.nextElement();
+ addConfigProperty(templateName, deploymentName, key, properties.getProperty(key));
+ }
}
+ // /subsystem=resource-adapters/resource-adapter=teiid-connector-file.rar/connection-definitions=fooDS/config-properties=ParentDirectory2:add(value=/home/rareddy/testing)
+ private void addConfigProperty(String templateName, String deploymentName, String key, String value) throws AdminProcessingException {
+ DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
+ final ModelNode request;
+ try {
+ builder.addNode("subsystem", "resource-adapters"); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.addNode("resource-adapter", templateName); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.addNode("connection-definitions", deploymentName); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.addNode("config-properties", key); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.setOperationName("add");
+ builder.addProperty("value", value);
+ request = builder.buildRequest();
+ } catch (OperationFormatException e) {
+ throw new IllegalStateException("Failed to build operation", e); //$NON-NLS-1$
+ }
+
+ try {
+ ModelNode outcome = this.connection.execute(request);
+ if (!Util.isSuccess(outcome)) {
+ throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ }
+ } catch (IOException e) {
+ throw new AdminProcessingException(e);
+ }
+ }
+
+ // /subsystem=resource-adapters/resource-adapter=teiid-connector-ws.rar:add(archive=teiid-connector-ws.rar, transaction-support=NoTransaction)
+ private void addResourceAdapter(String rarName) throws AdminProcessingException {
+ DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
+ final ModelNode request;
+
+ try {
+ builder.addNode("subsystem", "resource-adapters"); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.addNode("resource-adapter", rarName); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.setOperationName("add");
+ request = builder.buildRequest();
+ request.get("archive").set(rarName);
+ request.get("transaction-support").set("NoTransaction");
+ } catch (OperationFormatException e) {
+ throw new IllegalStateException("Failed to build operation", e); //$NON-NLS-1$
+ }
+
+ try {
+ ModelNode outcome = this.connection.execute(request);
+ if (!Util.isSuccess(outcome)) {
+ throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ }
+ } catch (IOException e) {
+ throw new AdminProcessingException(e);
+ }
+ }
+
+ class AbstractMetadatMapper implements MetadataMapper<String>{
+ @Override
+ public ModelNode wrap(String obj, ModelNode node) {
+ return null;
+ }
+ @Override
+ public String unwrap(ModelNode node) {
+ return null;
+ }
+ @Override
+ public ModelNode describe(ModelNode node) {
+ return null;
+ }
+ }
+
+ public List<String> getInstalledJDBCDrivers() throws AdminException {
+ DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
+ final ModelNode request;
+
+ try {
+ builder.addNode("subsystem", "datasources"); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.setOperationName("installed-drivers-list");
+ request = builder.buildRequest();
+
+ } catch (OperationFormatException e) {
+ throw new IllegalStateException("Failed to build operation", e); //$NON-NLS-1$
+ }
+
+ try {
+ ModelNode outcome = this.connection.execute(request);
+ if (!Util.isSuccess(outcome)) {
+ throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ }
+ List<String> drivers = getList(outcome, new AbstractMetadatMapper() {
+ @Override
+ public String unwrap(ModelNode node) {
+ if (node.hasDefined("driver-name")) {
+ return node.get("driver-name").asString();
+ }
+ return null;
+ }
+ });
+ return drivers;
+ } catch (IOException e) {
+ throw new AdminProcessingException(e);
+ }
+ }
+
@Override
public void createDataSource(String deploymentName, String templateName, Properties properties) throws AdminException {
+
+ Collection<String> dsNames = getDataSourceNames();
+ if (dsNames.contains(deploymentName) || (deploymentName.startsWith("java:/") && dsNames.contains(deploymentName.substring(6)))) {
+ throw new AdminProcessingException(AdminPlugin.Util.getString("datasource_exists", deploymentName));
+ }
+
+ Set<String> resourceAdapters = getAvailableResourceAdapterNames();
+ if (resourceAdapters.contains(templateName)) {
+ createConnectionFactory(deploymentName, templateName, properties);
+ return;
+ }
+
+ List<String> drivers = getInstalledJDBCDrivers();
+ if (!drivers.contains(templateName)) {
+ throw new AdminProcessingException(AdminPlugin.Util.getString("driver_not_defined", templateName));
+ }
+
DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
final ModelNode request;
try {
- // data-source jdbc-driver xa-data-source resource-adapters
- if (templateName.equals("data-source")) {
- builder.addNode("subsystem", "datasources"); //$NON-NLS-1$ //$NON-NLS-2$
- builder.addNode("data-source", deploymentName); //$NON-NLS-1$
- }
- else if (templateName.equals("xa-data-source")) {
- builder.addNode("subsystem", "datasources"); //$NON-NLS-1$ //$NON-NLS-2$
- builder.addNode("xa-data-source", deploymentName); //$NON-NLS-1$
- }
- else if (templateName.equals("resource-adapters")) {
- builder.addNode("subsystem", "resource-adapters"); //$NON-NLS-1$ //$NON-NLS-2$
- builder.addNode("resource-adapter", deploymentName); //$NON-NLS-1$
- createConnectionFactoryRequest(deploymentName, templateName, properties, builder);
- }
+ builder.addNode("subsystem", "datasources"); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.addNode("data-source", deploymentName); //$NON-NLS-1$
builder.setOperationName("add");
- request = builder.buildRequest();
- builder.addProperty("jndi-name", "java:/"+deploymentName);
- Enumeration keys = properties.propertyNames();
- while (keys.hasMoreElements()) {
- String key = (String)keys.nextElement();
- builder.addProperty(key, properties.getProperty(key));
+ builder.addProperty("jndi-name", deploymentName.startsWith("java:/")?deploymentName:"java:/"+deploymentName);
+ builder.addProperty("driver-name", templateName);
+
+ builder.addProperty("pool-name", deploymentName);
+ builder.addProperty("pool-prefill", "false");
+ builder.addProperty("max-pool-size", "20");
+ builder.addProperty("min-pool-size", "10");
+
+ if (properties != null) {
+ builder.addProperty("connection-url", properties.getProperty("connection-url"));
+ if (properties.getProperty("user-name") != null) {
+ builder.addProperty("user-name", properties.getProperty("user-name"));
+ }
+ if (properties.getProperty("password") != null) {
+ builder.addProperty("password", properties.getProperty("password"));
+ }
+ if (properties.getProperty("check-valid-connection-sql") != null) {
+ builder.addProperty("check-valid-connection-sql", properties.getProperty("check-valid-connection-sql"));
+ }
}
+ else {
+ throw new AdminProcessingException(AdminPlugin.Util.getString("connection_url_required"));
+ }
+
+ request = builder.buildRequest();
} catch (OperationFormatException e) {
throw new IllegalStateException("Failed to build operation", e); //$NON-NLS-1$
}
@@ -235,17 +391,62 @@
if (!Util.isSuccess(outcome)) {
throw new AdminProcessingException(Util.getFailureDescription(outcome));
}
- } catch (Exception e) {
+ } catch (IOException e) {
throw new AdminProcessingException(e);
}
}
@Override
public void deleteDataSource(String deployedName) throws AdminException {
- // rameshTODO Auto-generated method stub
+ Collection<String> dsNames = getDataSourceNames();
+ if (!dsNames.contains(deployedName) || (deployedName.startsWith("java:/") && !dsNames.contains(deployedName.substring(6)))) {
+ throw new AdminProcessingException(AdminPlugin.Util.getString("datasource_doesnot_exists", deployedName));
+ }
+ boolean deleted = deleteDS(deployedName, false, "datasources", "data-source");
+
+ // check xa connections
+ if (!deleted) {
+ deleted = deleteDS(deployedName, false, "datasources", "xa-data-source");
+ }
+
+ // check connection factories
+ if (!deleted) {
+ Map<String, String> raDSMap = getResourceAdapterDataSources();
+ String rarName = raDSMap.get(deployedName);
+ if (rarName != null) {
+ deleted = deleteDS(rarName, true, "resource-adapters", "resource-adapter", deployedName);
+ }
+ }
}
+ private boolean deleteDS(String deployedName, boolean connFactory, String... subsystem) throws AdminProcessingException {
+ DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
+ final ModelNode request;
+
+ try {
+ builder.addNode("subsystem", subsystem[0]); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.addNode(subsystem[1], deployedName);
+ if (connFactory) {
+ builder.addNode("connection-definitions", subsystem[2]);
+ }
+ builder.setOperationName("remove");
+ request = builder.buildRequest();
+ } catch (OperationFormatException e) {
+ throw new IllegalStateException("Failed to build operation", e); //$NON-NLS-1$
+ }
+
+ try {
+ ModelNode outcome = this.connection.execute(request);
+ if (!Util.isSuccess(outcome)) {
+ return false;
+ }
+ return true;
+ } catch (IOException e) {
+ throw new AdminProcessingException(e);
+ }
+ }
+
@Override
public void undeploy(String deployedName) throws AdminException {
try {
@@ -418,35 +619,43 @@
datasourceNames.addAll(getChildNodeNames("datasources", "data-source"));
datasourceNames.addAll(getChildNodeNames("datasources", "xa-data-source"));
- Set<String> resourceAdapters = getResourceAdapterNames();
+ datasourceNames.addAll(getResourceAdapterDataSources().keySet());
+ return datasourceNames;
+ }
+
+ private Map<String, String> getResourceAdapterDataSources() throws AdminException {
+ HashMap<String, String> datasourceNames = new HashMap<String, String>();
+ Set<String> resourceAdapters = getDeployedResourceAdapterNames();
for (String resource:resourceAdapters) {
-
DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
- try {
- builder.addNode("subsystem", "resource-adapters"); //$NON-NLS-1$ //$NON-NLS-2$
- builder.addNode("resource-adapter", resource); //$NON-NLS-1$ //$NON-NLS-2$
- builder.setOperationName("read-resource");
- ModelNode request = builder.buildRequest();
-
- ModelNode outcome = this.connection.execute(request);
- if (Util.isSuccess(outcome)) {
- if (outcome.hasDefined("result")) {
- ModelNode result = outcome.get("result");
- if (result.hasDefined("connection-definitions")) {
- List<ModelNode> connDefs = result.get("connection-definitions").asList();
- for (ModelNode conn:connDefs) {
- datasourceNames.add(conn.get("jndi-name").asString());
- }
- }
- }
- }
- } catch (OperationFormatException e) {
- throw new AdminProcessingException("Failed to build operation", e); //$NON-NLS-1$
- } catch (IOException e) {
- throw new AdminProcessingException("Failed to build operation", e); //$NON-NLS-1$
- }
+ try {
+ builder.addNode("subsystem", "resource-adapters"); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.addNode("resource-adapter", resource); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.setOperationName("read-resource");
+ ModelNode request = builder.buildRequest();
+
+ ModelNode outcome = this.connection.execute(request);
+ if (Util.isSuccess(outcome)) {
+ if (outcome.hasDefined("result")) {
+ ModelNode result = outcome.get("result");
+ if (result.hasDefined("connection-definitions")) {
+ List<ModelNode> connDefs = result.get("connection-definitions").asList();
+ for (ModelNode conn:connDefs) {
+ Iterator<String> it = conn.keys().iterator();
+ if (it.hasNext()) {
+ datasourceNames.put(it.next(), resource);
+ }
+ }
+ }
+ }
+ }
+ } catch (OperationFormatException e) {
+ throw new AdminProcessingException("Failed to build operation", e); //$NON-NLS-1$
+ } catch (IOException e) {
+ throw new AdminProcessingException("Failed to build operation", e); //$NON-NLS-1$
+ }
}
- return datasourceNames;
+ return datasourceNames;
}
/**
@@ -455,7 +664,7 @@
* @return
* @throws AdminException
*/
- private Set<String> getResourceAdapterNames() throws AdminException {
+ private Set<String> getDeployedResourceAdapterNames() throws AdminException {
Set<String> templates = new HashSet<String>();
final ModelNode request = buildRequest("resource-adapters", "read-children-names", "child-type", "resource-adapter");//$NON-NLS-1$
try {
@@ -469,14 +678,39 @@
}
return Collections.emptySet();
}
-
+ // :read-children-names(child-type=deployment)
+ private Set<String> getAvailableResourceAdapterNames() throws AdminException {
+ Set<String> templates = new HashSet<String>();
+ DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
+ final ModelNode request;
+ try {
+ builder.setOperationName("read-children-names");
+ builder.addProperty("child-type", "deployment");
+ request = builder.buildRequest();
+ } catch (OperationFormatException e) {
+ throw new IllegalStateException("Failed to build operation", e); //$NON-NLS-1$
+ }
+
+ try {
+ ModelNode outcome = this.connection.execute(request);
+ List<String> deployments = Util.getList(outcome);
+ for (String deployment:deployments) {
+ if (deployment.endsWith(".rar")) {
+ templates.add(deployment);
+ }
+ }
+ } catch (IOException e) {
+ throw new AdminProcessingException(e);
+ }
+ return templates;
+ }
+
@Override
public Set<String> getDataSourceTemplateNames() throws AdminException {
Set<String> templates = new HashSet<String>();
- templates.add("data-source");
- templates.add("xa-data-source");
- templates.addAll(getResourceAdapterNames());
+ templates.addAll(getInstalledJDBCDrivers());
+ templates.addAll(getAvailableResourceAdapterNames());
return templates;
}
@@ -570,24 +804,27 @@
*/
@Override
public Collection<PropertyDefinition> getTemplatePropertyDefinitions(String templateName) throws AdminException {
+
+ boolean connectionFactory = false;
+ Set<String> resourceAdapters = getAvailableResourceAdapterNames();
+ if (resourceAdapters.contains(templateName)) {
+ connectionFactory = true;
+ }
+
DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
ModelNode request = null;
try {
- // data-source,xa-data-source,resource-adapters
- if (templateName.equals("data-source")) {
+ if (connectionFactory) {
+ builder.addNode("subsystem", "resource-adapters"); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.addNode("resource-adapter", templateName); //$NON-NLS-1$
+ builder.addNode("connection-definitions", "any"); //$NON-NLS-1$
+ }
+ else {
builder.addNode("subsystem", "datasources"); //$NON-NLS-1$ //$NON-NLS-2$
builder.addNode("data-source", "any"); //$NON-NLS-1$
- }
- else if (templateName.equals("xa-data-source")) {
- builder.addNode("subsystem", "datasources"); //$NON-NLS-1$ //$NON-NLS-2$
- builder.addNode("xa-data-source", "any"); //$NON-NLS-1$
- }
- else {
- builder.addNode("subsystem", "resource-adapters"); //$NON-NLS-1$ //$NON-NLS-2$
- builder.addNode("resource-adapter", templateName); //$NON-NLS-1$
- }
+ }
- builder.setOperationName("read-resource-description");
+ builder.setOperationName("read-resource-description"); //$NON-NLS-1$
request = builder.buildRequest();
} catch (OperationFormatException e) {
throw new IllegalStateException("Failed to build operation", e); //$NON-NLS-1$
@@ -772,29 +1009,6 @@
return Collections.emptyList();
}
- public List<String> getTransports() {
- DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
- final ModelNode request;
- try {
- builder.addNode("subsystem", "teiid"); //$NON-NLS-1$ //$NON-NLS-2$
- builder.setOperationName("read-children-names");
- builder.addProperty("child-type", "transport");
- request = builder.buildRequest();
- } catch (OperationFormatException e) {
- throw new IllegalStateException("Failed to build operation", e);
- }
-
- try {
- ModelNode outcome = this.connection.execute(request);
- if (Util.isSuccess(outcome)) {
- return Util.getList(outcome);
- }
- } catch (Exception e) {
- }
-
- return Collections.emptyList();
- }
-
private ModelNode buildRequest(String subsystem, String operationName, String... params) {
DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
final ModelNode request;
@@ -823,13 +1037,7 @@
List<T> list = new ArrayList<T>(nodeList.size());
for(ModelNode node : nodeList) {
- Set<String> keys = node.keys();
- if (!keys.isEmpty()) {
- list.addAll(getList(node.get(0), mapper));
- }
- else {
- list.add(mapper.unwrap(node));
- }
+ list.add(mapper.unwrap(node));
}
return list;
}
@@ -994,7 +1202,19 @@
} catch (Exception e) {
throw new AdminProcessingException(e);
}
- }
+ }
+
+ @Override
+ public void markDataSourceAvailable(String jndiName) throws AdminException {
+ final ModelNode request = buildRequest("teiid", "mark-datasource-available","ds-name", jndiName);//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ try {
+ ModelNode outcome = this.connection.execute(request);
+ if (!Util.isSuccess(outcome)) {
+ throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ }
+ } catch (Exception e) {
+ throw new AdminProcessingException(e);
+ }
+ }
}
-
}
Modified: branches/as7/admin/src/main/resources/org/teiid/adminapi/i18n.properties
===================================================================
--- branches/as7/admin/src/main/resources/org/teiid/adminapi/i18n.properties 2011-10-26 20:02:37 UTC (rev 3589)
+++ branches/as7/admin/src/main/resources/org/teiid/adminapi/i18n.properties 2011-10-27 14:44:07 UTC (rev 3590)
@@ -69,4 +69,9 @@
allow-update.describe = update allowed
allow-delete.describe = delete allowed
allow-execute.describe = execute allowed
-allow-alter.describe = alter allowed
\ No newline at end of file
+allow-alter.describe = alter allowed
+
+driver_not_defined=Driver {0} is not configured in the system, install the JDBC driver first
+connection_url_required=connection-url is required property
+datasource_exists=Data source with name {0} already exists; choose a different deployment name
+datasource_doesnot_exists=Data Source with name {0} does not exists in the system. Check the deployment name.
\ No newline at end of file
Modified: branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml
===================================================================
--- branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml 2011-10-26 20:02:37 UTC (rev 3589)
+++ branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml 2011-10-27 14:44:07 UTC (rev 3590)
@@ -20,7 +20,7 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<server xmlns="urn:jboss:domain:1.0">
+<server xmlns="urn:jboss:domain:1.1">
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
@@ -28,21 +28,24 @@
<extension module="org.jboss.as.deployment-scanner"/>
<extension module="org.jboss.as.ee"/>
<extension module="org.jboss.as.ejb3"/>
+ <extension module="org.jboss.as.jacorb"/>
<extension module="org.jboss.as.jaxrs"/>
<extension module="org.jboss.as.jmx"/>
<extension module="org.jboss.as.jpa"/>
<extension module="org.jboss.as.logging"/>
+ <extension module="org.jboss.as.mail"/>
+ <extension module="org.jboss.as.messaging"/>
<extension module="org.jboss.as.naming"/>
<extension module="org.jboss.as.osgi"/>
- <extension module="org.jboss.as.pojo"/>
<extension module="org.jboss.as.remoting"/>
<extension module="org.jboss.as.sar"/>
<extension module="org.jboss.as.security"/>
<extension module="org.jboss.teiid"/>
<extension module="org.jboss.as.threads"/>
<extension module="org.jboss.as.transactions"/>
- <extension module="org.jboss.as.web" />
- <extension module="org.jboss.as.weld" />
+ <extension module="org.jboss.as.web"/>
+ <extension module="org.jboss.as.webservices"/>
+ <extension module="org.jboss.as.weld"/>
</extensions>
<management>
@@ -86,6 +89,13 @@
<logger category="sun.rmi">
<level name="WARN"/>
</logger>
+ <logger category="jacorb">
+ <level name="WARN"/>
+ </logger>
+ <!-- set jacorb.config to ERROR to avoid the "jacorb.properties not found" messages during startup -->
+ <logger category="jacorb.config">
+ <level name="ERROR"/>
+ </logger>
<root-logger>
<level name="INFO"/>
@@ -97,7 +107,8 @@
</subsystem>
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
- <datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true" pool-name="H2DS">
+ <datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true"
+ pool-name="H2DS">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
<driver>h2</driver>
<pool></pool>
@@ -148,25 +159,47 @@
</datasources>
</subsystem>
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">
- <deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments" />
+ <deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:ee:1.0" />
- <subsystem xmlns="urn:jboss:domain:ejb3:1.1" lite="true">
+ <subsystem xmlns="urn:jboss:domain:ejb3:1.2" >
+
+ <remote connector-ref="remoting-connector" thread-pool-name="default" />
+ <async thread-pool-name="default" />
+
+ <timer-service thread-pool-name="default" >
+ <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>
+ </timer-service>
+
<!-- EJB3 pools -->
<pools>
<bean-instance-pools>
<strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5"
instance-acquisition-timeout-unit="MINUTES"/>
+
+ <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5"
+ instance-acquisition-timeout-unit="MINUTES"/>
</bean-instance-pools>
</pools>
+ <!-- Default MDB configurations -->
+ <mdb>
+ <resource-adapter-ref resource-adapter-name="hornetq-ra"/>
+ <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
+ </mdb>
+
<!-- Session bean configurations -->
<session-bean>
<stateless>
<bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
</stateless>
+ <stateful default-access-timeout="5000"/>
+ <singleton default-access-timeout="5000"/>
</session-bean>
+ <thread-pools>
+ <thread-pool name="default" max-threads="10" keepalive-time="100" />
+ </thread-pools>
</subsystem>
<subsystem xmlns="urn:jboss:domain:infinispan:1.0" default-cache-container="hibernate">
<cache-container name="hibernate" default-cache="local-query">
@@ -189,96 +222,174 @@
</local-cache>
</cache-container>
</subsystem>
+ <subsystem xmlns="urn:jboss:domain:jacorb:1.0">
+ <orb name="JBoss" print-version="off" giop-minor-version="2">
+ <connection max-managed-buf-size="24" outbuf-cache-timeout="-1"/>
+ <naming root-context="JBoss/Naming/root" export-corbaloc="on"/>
+ </orb>
+ <poa monitoring="off" queue-wait="off">
+ <request-processors pool-size="2" max-threads="8"/>
+ </poa>
+ <interop sun="on" chunk-custom-rmi-valuetypes="on" strict-check-on-tc-creation="off"/>
+ </subsystem>
<subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
<subsystem xmlns="urn:jboss:domain:jca:1.0">
- <archive-validation enabled="false" />
- <bean-validation enabled="false" />
+ <archive-validation enabled="false"/>
+ <bean-validation enabled="false"/>
<default-workmanager>
<short-running-threads blocking="true">
- <core-threads count="10" per-cpu="20"/>
- <queue-length count="10" per-cpu="20"/>
- <max-threads count="10" per-cpu="20"/>
- <keepalive-time time="10" unit="seconds"/>
+ <core-threads count="10" per-cpu="20"/>
+ <queue-length count="10" per-cpu="20"/>
+ <max-threads count="10" per-cpu="20"/>
+ <keepalive-time time="10" unit="seconds"/>
</short-running-threads>
<long-running-threads blocking="true">
- <core-threads count="10" per-cpu="20"/>
- <queue-length count="10" per-cpu="20"/>
- <max-threads count="10" per-cpu="20"/>
- <keepalive-time time="10" unit="seconds"/>
+ <core-threads count="10" per-cpu="20"/>
+ <queue-length count="10" per-cpu="20"/>
+ <max-threads count="10" per-cpu="20"/>
+ <keepalive-time time="10" unit="seconds"/>
</long-running-threads>
</default-workmanager>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:jmx:1.0">
+ <subsystem xmlns="urn:jboss:domain:jmx:1.1" show-model="true">
<jmx-connector registry-binding="jmx-connector-registry" server-binding="jmx-connector-server" />
</subsystem>
<subsystem xmlns="urn:jboss:domain:jpa:1.0">
<jpa default-datasource=""/>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:naming:1.0" />
- <subsystem xmlns="urn:jboss:domain:pojo:1.0" />
- <subsystem xmlns="urn:jboss:domain:osgi:1.0" activation="lazy">
+ <subsystem xmlns="urn:jboss:domain:mail:1.0">
+ <mail-session jndi-name="java:jboss/mail/Default">
+ <smtp-server address="localhost" port="25"/>
+ </mail-session>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:messaging:1.1">
+ <hornetq-server>
+ <!-- Default journal file size is 10Mb, reduced here to 100k for faster first boot -->
+ <journal-file-size>102400</journal-file-size>
+ <journal-min-files>2</journal-min-files>
+ <journal-type>NIO</journal-type>
+ <!-- disable messaging persistence -->
+ <persistence-enabled>false</persistence-enabled>
+
+ <connectors>
+ <netty-connector name="netty" socket-binding="messaging"/>
+ <netty-connector name="netty-throughput" socket-binding="messaging-throughput">
+ <param key="batch-delay" value="50"/>
+ </netty-connector>
+ <in-vm-connector name="in-vm" server-id="0"/>
+ </connectors>
+
+ <acceptors>
+ <netty-acceptor name="netty" socket-binding="messaging"/>
+ <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">
+ <param key="batch-delay" value="50"/>
+ <param key="direct-deliver" value="false"/>
+ </netty-acceptor>
+ <in-vm-acceptor name="in-vm" server-id="0"/>
+ </acceptors>
+
+ <security-settings>
+ <security-setting match="#">
+ <permission type="createNonDurableQueue" roles="guest"/>
+ <permission type="deleteNonDurableQueue" roles="guest"/>
+ <permission type="consume" roles="guest"/>
+ <permission type="send" roles="guest"/>
+ </security-setting>
+ </security-settings>
+
+ <address-settings>
+ <!--default for catch all-->
+ <address-setting match="#">
+ <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+ <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <max-size-bytes>10485760</max-size-bytes>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ <address-full-policy>BLOCK</address-full-policy>
+ </address-setting>
+ </address-settings>
+
+ <!--JMS Stuff-->
+ <jms-connection-factories>
+ <connection-factory name="InVmConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="in-vm"/>
+ </connectors>
+ <entries>
+ <entry name="java:/ConnectionFactory"/>
+ </entries>
+ </connection-factory>
+ <connection-factory name="RemoteConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="netty"/>
+ </connectors>
+ <entries>
+ <entry name="RemoteConnectionFactory"/>
+ </entries>
+ </connection-factory>
+ <pooled-connection-factory name="hornetq-ra">
+ <transaction mode="xa"/>
+ <connectors>
+ <connector-ref connector-name="in-vm"/>
+ </connectors>
+ <entries>
+ <entry name="java:/JmsXA"/>
+ </entries>
+ </pooled-connection-factory>
+ </jms-connection-factories>
+
+ <jms-destinations>
+ <jms-queue name="testQueue">
+ <entry name="queue/test"/>
+ </jms-queue>
+ <jms-topic name="testTopic">
+ <entry name="topic/test"/>
+ </jms-topic>
+ </jms-destinations>
+ </hornetq-server>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:naming:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:osgi:1.1" activation="lazy">
<configuration pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">
- <property name="manager.root">jboss-osgi</property>
+ <property name="manager.root" value="jboss-osgi"/>
</configuration>
<properties>
- <!--
- A comma seperated list of module identifiers. Each system module
- is added as a dependency to the OSGi framework module. The packages
- from these system modules can be made visible as framework system packages.
- http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Constants.html#FRAME...
- -->
- <property name="org.jboss.osgi.system.modules">
- org.apache.commons.logging,
- org.apache.log4j,
- org.jboss.as.osgi,
- org.slf4j,
- </property>
- <!--
- Framework environment property identifying extra packages which the system bundle
- must export from the current execution environment
- -->
- <property name="org.osgi.framework.system.packages.extra">
- org.apache.commons.logging;version=1.1.1,
- org.apache.log4j;version=1.2,
- org.jboss.as.osgi.service;version=7.0,
- org.jboss.osgi.deployment.interceptor;version=1.0,
- org.jboss.osgi.spi.capability;version=1.0,
- org.jboss.osgi.spi.util;version=1.0,
- org.jboss.osgi.testing;version=1.0,
- org.jboss.osgi.vfs;version=1.0,
- org.slf4j;version=1.5.10,
- </property>
<!-- Specifies the beginning start level of the framework -->
<property name="org.osgi.framework.startlevel.beginning">1</property>
</properties>
- <modules>
+ <capabilities>
<!-- modules registered with the OSGi layer on startup -->
- <module identifier="javaee.api"/>
- <module identifier="org.jboss.logging"/>
+ <capability name="javax.api"/>
+ <capability name="javax.servlet.api"/>
+ <capability name="javax.transaction.api"/>
<!-- bundles installed on startup -->
- <module identifier="org.apache.aries.util"/>
- <module identifier="org.jboss.osgi.webconsole"/>
- <module identifier="org.osgi.compendium"/>
+ <capability name="org.apache.aries.util"/>
+ <capability name="org.jboss.osgi.webconsole"/>
+ <capability name="org.osgi.compendium"/>
<!-- bundles started in startlevel 1 -->
- <module identifier="org.apache.felix.log" startlevel="1"/>
- <module identifier="org.jboss.osgi.logging" startlevel="1"/>
- <module identifier="org.apache.felix.configadmin" startlevel="1"/>
- <module identifier="org.jboss.as.osgi.configadmin" startlevel="1"/>
+ <capability name="org.apache.felix.log" startlevel="1"/>
+ <capability name="org.jboss.osgi.logging" startlevel="1"/>
+ <capability name="org.apache.felix.configadmin" startlevel="1"/>
+ <capability name="org.jboss.as.osgi.configadmin" startlevel="1"/>
<!-- bundles started in startlevel 2 -->
- <module identifier="org.apache.aries.jmx" startlevel="2"/>
- <module identifier="org.apache.felix.eventadmin" startlevel="2"/>
- <module identifier="org.apache.felix.metatype" startlevel="2"/>
- <module identifier="org.apache.felix.scr" startlevel="2"/>
- <module identifier="org.apache.felix.webconsole" startlevel="2"/>
- <module identifier="org.jboss.osgi.jmx" startlevel="2"/>
- <module identifier="org.jboss.osgi.http" startlevel="2"/>
+ <capability name="org.apache.aries.jmx" startlevel="2"/>
+ <capability name="org.apache.felix.eventadmin" startlevel="2"/>
+ <capability name="org.apache.felix.metatype" startlevel="2"/>
+ <capability name="org.apache.felix.scr" startlevel="2"/>
+ <capability name="org.apache.felix.webconsole" startlevel="2"/>
+ <capability name="org.jboss.netty" startlevel="2"/>
+ <capability name="org.jboss.osgi.jmx" startlevel="2"/>
+ <capability name="org.jboss.osgi.http" startlevel="2"/>
+ <capability name="org.projectodd.stilts" startlevel="2"/>
<!-- bundles started in startlevel 3 -->
- <module identifier="org.jboss.osgi.blueprint" startlevel="3"/>
- <module identifier="org.jboss.osgi.webapp" startlevel="3"/>
- <module identifier="org.jboss.osgi.xerces" startlevel="3"/>
- </modules>
+ <capability name="org.jboss.osgi.blueprint" startlevel="3"/>
+ <capability name="org.jboss.osgi.webapp" startlevel="3"/>
+ <capability name="org.jboss.osgi.xerces" startlevel="3"/>
+ </capabilities>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:remoting:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:remoting:1.0">
+ <connector name="remoting-connector" socket-binding="remoting"/>
+ </subsystem>
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
<resource-adapters>
<resource-adapter>
@@ -302,9 +413,19 @@
<security-domains>
<security-domain name="other" cache-type="default">
<authentication>
- <login-module code="Disabled" flag="required"/>
+ <login-module code="UsersRoles" flag="required"/>
</authentication>
</security-domain>
+ <security-domain name="jboss-web-policy" cache-type="default">
+ <authorization>
+ <policy-module code="Delegating" flag="required"/>
+ </authorization>
+ </security-domain>
+ <security-domain name="jboss-ejb-policy" cache-type="default">
+ <authorization>
+ <policy-module code="Delegating" flag="required"/>
+ </authorization>
+ </security-domain>
<security-domain name="teiid-security" cache-type="default">
<authentication>
<login-module code="UsersRoles" flag="required">
@@ -365,7 +486,7 @@
<recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
<core-environment>
<process-id>
- <uuid />
+ <uuid/>
</process-id>
</core-environment>
<coordinator-environment default-timeout="300"/>
@@ -373,11 +494,35 @@
<subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">
<connector name="http" scheme="http" protocol="HTTP/1.1" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="true">
- <alias name="localhost" />
- <alias name="example.com" />
+ <alias name="localhost"/>
+ <alias name="example.com"/>
</virtual-server>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:weld:1.0" />
+ <subsystem xmlns="urn:jboss:domain:webservices:1.0">
+ <modify-wsdl-address>true</modify-wsdl-address>
+ <wsdl-host>localhost</wsdl-host>
+ <!--
+ <wsdl-port>8080</wsdl-port>
+ <wsdl-secure-port>8443</wsdl-secure-port>
+ -->
+ <endpoint-config xmlns:ws="urn:jboss:jbossws-jaxws-config:4.0">
+ <ws:config-name>Standard-Endpoint-Config</ws:config-name>
+ </endpoint-config>
+ <endpoint-config xmlns:ws="urn:jboss:jbossws-jaxws-config:4.0">
+ <ws:config-name>Recording-Endpoint-Config</ws:config-name>
+ <ws:pre-handler-chains>
+ <handler-chain xmlns="http://java.sun.com/xml/ns/javaee">
+ <protocol-bindings>##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM
+ </protocol-bindings>
+ <handler>
+ <handler-name>RecordingHandler</handler-name>
+ <handler-class>org.jboss.ws.common.invocation.RecordingServerHandler</handler-class>
+ </handler>
+ </handler-chain>
+ </ws:pre-handler-chains>
+ </endpoint-config>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:weld:1.0"/>
</profile>
<interfaces>
@@ -385,16 +530,20 @@
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="public">
- <inet-address value="${jboss.bind.address.public:127.0.0.1}"/>
+ <inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
</interfaces>
<socket-binding-group name="standard-sockets" default-interface="public">
<socket-binding name="http" port="8080"/>
<socket-binding name="https" port="8443"/>
+ <socket-binding name="jacorb" port="3528"/>
+ <socket-binding name="jacorb-ssl" port="3529"/>
<socket-binding name="jmx-connector-registry" interface="management" port="1090"/>
<socket-binding name="jmx-connector-server" interface="management" port="1091"/>
<socket-binding name="jndi" port="1099"/>
+ <socket-binding name="messaging" port="5445"/>
+ <socket-binding name="messaging-throughput" port="5455"/>
<socket-binding name="osgi-http" interface="management" port="8090"/>
<socket-binding name="remoting" port="4447"/>
<socket-binding name="txn-recovery-environment" port="4712"/>
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java 2011-10-26 20:02:37 UTC (rev 3589)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java 2011-10-27 14:44:07 UTC (rev 3590)
@@ -139,6 +139,7 @@
new ListTransactions().register(teiidSubsystem);
new TerminateTransaction().register(teiidSubsystem);
new ExecuteQuery().register(teiidSubsystem);
+ new MarkDataSourceAvailable().register(teiidSubsystem);
}
@Override
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2011-10-26 20:02:37 UTC (rev 3589)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2011-10-27 14:44:07 UTC (rev 3590)
@@ -64,6 +64,7 @@
import org.teiid.client.util.ResultsFuture;
import org.teiid.core.TeiidComponentException;
import org.teiid.deployers.VDBRepository;
+import org.teiid.deployers.VDBStatusChecker;
import org.teiid.dqp.internal.datamgr.TranslatorRepository;
import org.teiid.dqp.internal.process.DQPCore;
import org.teiid.dqp.internal.process.DQPWorkContext;
@@ -449,6 +450,29 @@
}
}
+class MarkDataSourceAvailable extends TeiidOperationHandler{
+ protected MarkDataSourceAvailable() {
+ super("mark-datasource-available"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void executeOperation(OperationContext context, DQPCore engine, ModelNode operation) throws OperationFailedException {
+ if (!operation.hasDefined(OperationsConstants.DS_NAME)) {
+ throw new OperationFailedException(new ModelNode().set(IntegrationPlugin.Util.getString(OperationsConstants.DS_NAME+MISSING)));
+ }
+ String dsName = operation.get(OperationsConstants.DS_NAME).asString();
+ ServiceController<?> sc = context.getServiceRegistry(false).getRequiredService(TeiidServiceNames.VDB_STATUS_CHECKER);
+ VDBStatusChecker vsc = VDBStatusChecker.class.cast(sc.getValue());
+ vsc.dataSourceAdded(dsName);
+ }
+
+ protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
+ operationNode.get(REQUEST_PROPERTIES, OperationsConstants.DS_NAME, TYPE).set(ModelType.STRING);
+ operationNode.get(REQUEST_PROPERTIES, OperationsConstants.DS_NAME, REQUIRED).set(true);
+ operationNode.get(REQUEST_PROPERTIES, OperationsConstants.DS_NAME, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.DS_NAME));
+ }
+}
+
class WorkerPoolStatistics extends TeiidOperationHandler{
protected WorkerPoolStatistics() {
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java 2011-10-26 20:02:37 UTC (rev 3589)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java 2011-10-27 14:44:07 UTC (rev 3590)
@@ -203,10 +203,8 @@
String dsName = model.getSourceConnectionJndiName(sourceName);
ServiceName svcName = ServiceName.JBOSS.append("data-source", getJndiName(dsName)); //$NON-NLS-1$
if (!jdbcSource) {
- // TODO: add service dependency on connection-factory (this is pending in AS7)
- svcName = ServiceName.JBOSS.append("resource-adaptor", getJndiName(dsName)); //$NON-NLS-1$
+ svcName = ServiceName.JBOSS.append("connector", "connection-factory", getJndiName(dsName)); //$NON-NLS-1$ //$NON-NLS-2$
}
-
svcListener.serviceFound(dsName, svcName);
}
}
Modified: branches/as7/pom.xml
===================================================================
--- branches/as7/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
+++ branches/as7/pom.xml 2011-10-27 14:44:07 UTC (rev 3590)
@@ -450,8 +450,13 @@
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.0.0.GA</version>
- </dependency>
+ </dependency>
<dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-generator</artifactId>
+ <version>1.0.0.CR1</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-clustering-jgroups</artifactId>
<version>${jbossas-version}</version>
Modified: branches/as7/runtime/pom.xml
===================================================================
--- branches/as7/runtime/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
+++ branches/as7/runtime/pom.xml 2011-10-27 14:44:07 UTC (rev 3590)
@@ -76,6 +76,11 @@
<artifactId>jboss-as-security</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-generator</artifactId>
+ <scope>provided</scope>
+ </dependency>
<!--
<dependency>
13 years, 2 months
teiid SVN: r3589 - in trunk: adminshell and 37 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-10-26 16:02:37 -0400 (Wed, 26 Oct 2011)
New Revision: 3589
Modified:
trunk/adminshell/pom.xml
trunk/api/pom.xml
trunk/build/pom.xml
trunk/cache-jbosscache/pom.xml
trunk/client-jdk15/pom.xml
trunk/client/pom.xml
trunk/common-core/pom.xml
trunk/connectors/connector-file/pom.xml
trunk/connectors/connector-ldap/pom.xml
trunk/connectors/connector-salesforce/pom.xml
trunk/connectors/connector-ws/pom.xml
trunk/connectors/pom.xml
trunk/connectors/salesforce-api/pom.xml
trunk/connectors/sandbox/pom.xml
trunk/connectors/sandbox/translator-yahoo/pom.xml
trunk/connectors/translator-file/pom.xml
trunk/connectors/translator-jdbc/pom.xml
trunk/connectors/translator-ldap/pom.xml
trunk/connectors/translator-loopback/pom.xml
trunk/connectors/translator-olap/pom.xml
trunk/connectors/translator-salesforce/pom.xml
trunk/connectors/translator-ws/pom.xml
trunk/console/pom.xml
trunk/documentation/admin-guide/pom.xml
trunk/documentation/caching-guide/pom.xml
trunk/documentation/client-developers-guide/pom.xml
trunk/documentation/developer-guide/pom.xml
trunk/documentation/pom.xml
trunk/documentation/quick-start-example/pom.xml
trunk/documentation/reference/pom.xml
trunk/engine/pom.xml
trunk/hibernate-dialect/pom.xml
trunk/jboss-integration/pom.xml
trunk/metadata/pom.xml
trunk/pom.xml
trunk/runtime/pom.xml
trunk/test-integration/common/pom.xml
trunk/test-integration/db/pom.xml
trunk/test-integration/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: trunk/adminshell/pom.xml
===================================================================
--- trunk/adminshell/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/adminshell/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-adminshell</artifactId>
Modified: trunk/api/pom.xml
===================================================================
--- trunk/api/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/api/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-api</artifactId>
Modified: trunk/build/pom.xml
===================================================================
--- trunk/build/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/build/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid</artifactId>
Modified: trunk/cache-jbosscache/pom.xml
===================================================================
--- trunk/cache-jbosscache/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/cache-jbosscache/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-cache-jbosscache</artifactId>
Modified: trunk/client/pom.xml
===================================================================
--- trunk/client/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/client/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-client</artifactId>
Modified: trunk/client-jdk15/pom.xml
===================================================================
--- trunk/client-jdk15/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/client-jdk15/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-client-jdk15</artifactId>
Modified: trunk/common-core/pom.xml
===================================================================
--- trunk/common-core/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/common-core/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-common-core</artifactId>
Modified: trunk/connectors/connector-file/pom.xml
===================================================================
--- trunk/connectors/connector-file/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/connectors/connector-file/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-file</artifactId>
Modified: trunk/connectors/connector-ldap/pom.xml
===================================================================
--- trunk/connectors/connector-ldap/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/connectors/connector-ldap/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -2,7 +2,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-ldap</artifactId>
Modified: trunk/connectors/connector-salesforce/pom.xml
===================================================================
--- trunk/connectors/connector-salesforce/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/connectors/connector-salesforce/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-salesforce</artifactId>
Modified: trunk/connectors/connector-ws/pom.xml
===================================================================
--- trunk/connectors/connector-ws/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/connectors/connector-ws/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-ws</artifactId>
Modified: trunk/connectors/pom.xml
===================================================================
--- trunk/connectors/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/connectors/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: trunk/connectors/salesforce-api/pom.xml
===================================================================
--- trunk/connectors/salesforce-api/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/connectors/salesforce-api/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -2,7 +2,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>salesforce-api</artifactId>
Modified: trunk/connectors/sandbox/pom.xml
===================================================================
--- trunk/connectors/sandbox/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/connectors/sandbox/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid.connectors</groupId>
Modified: trunk/connectors/sandbox/translator-yahoo/pom.xml
===================================================================
--- trunk/connectors/sandbox/translator-yahoo/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/connectors/sandbox/translator-yahoo/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>org.jboss.teiid.connectors</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-yahoo</artifactId>
Modified: trunk/connectors/translator-file/pom.xml
===================================================================
--- trunk/connectors/translator-file/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/connectors/translator-file/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-file</artifactId>
Modified: trunk/connectors/translator-jdbc/pom.xml
===================================================================
--- trunk/connectors/translator-jdbc/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/connectors/translator-jdbc/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-jdbc</artifactId>
Modified: trunk/connectors/translator-ldap/pom.xml
===================================================================
--- trunk/connectors/translator-ldap/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/connectors/translator-ldap/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -2,7 +2,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-ldap</artifactId>
Modified: trunk/connectors/translator-loopback/pom.xml
===================================================================
--- trunk/connectors/translator-loopback/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/connectors/translator-loopback/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-loopback</artifactId>
Modified: trunk/connectors/translator-olap/pom.xml
===================================================================
--- trunk/connectors/translator-olap/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/connectors/translator-olap/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-olap</artifactId>
Modified: trunk/connectors/translator-salesforce/pom.xml
===================================================================
--- trunk/connectors/translator-salesforce/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/connectors/translator-salesforce/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-salesforce</artifactId>
Modified: trunk/connectors/translator-ws/pom.xml
===================================================================
--- trunk/connectors/translator-ws/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/connectors/translator-ws/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-ws</artifactId>
Modified: trunk/console/pom.xml
===================================================================
--- trunk/console/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/console/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: trunk/documentation/admin-guide/pom.xml
===================================================================
--- trunk/documentation/admin-guide/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/documentation/admin-guide/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>admin-guide</artifactId>
Modified: trunk/documentation/caching-guide/pom.xml
===================================================================
--- trunk/documentation/caching-guide/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/documentation/caching-guide/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>caching-guide</artifactId>
Modified: trunk/documentation/client-developers-guide/pom.xml
===================================================================
--- trunk/documentation/client-developers-guide/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/documentation/client-developers-guide/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>client-developers-guide</artifactId>
Modified: trunk/documentation/developer-guide/pom.xml
===================================================================
--- trunk/documentation/developer-guide/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/documentation/developer-guide/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>developer-guide</artifactId>
Modified: trunk/documentation/pom.xml
===================================================================
--- trunk/documentation/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/documentation/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: trunk/documentation/quick-start-example/pom.xml
===================================================================
--- trunk/documentation/quick-start-example/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/documentation/quick-start-example/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>quick-start-example</artifactId>
Modified: trunk/documentation/reference/pom.xml
===================================================================
--- trunk/documentation/reference/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/documentation/reference/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>reference</artifactId>
Modified: trunk/engine/pom.xml
===================================================================
--- trunk/engine/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/engine/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-engine</artifactId>
Modified: trunk/hibernate-dialect/pom.xml
===================================================================
--- trunk/hibernate-dialect/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/hibernate-dialect/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-hibernate-dialect</artifactId>
Modified: trunk/jboss-integration/pom.xml
===================================================================
--- trunk/jboss-integration/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/jboss-integration/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: trunk/metadata/pom.xml
===================================================================
--- trunk/metadata/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/metadata/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-metadata</artifactId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -5,7 +5,7 @@
<artifactId>teiid-parent</artifactId>
<packaging>pom</packaging>
<name>Teiid</name>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
<description>Federated SQL and XML query engine.</description>
<properties>
<ant.version>1.7.0</ant.version>
Modified: trunk/runtime/pom.xml
===================================================================
--- trunk/runtime/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/runtime/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: trunk/test-integration/common/pom.xml
===================================================================
--- trunk/test-integration/common/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/test-integration/common/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-test-integration</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>test-integration-common</artifactId>
Modified: trunk/test-integration/db/pom.xml
===================================================================
--- trunk/test-integration/db/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/test-integration/db/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -9,7 +9,7 @@
<parent>
<artifactId>teiid-test-integration</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: trunk/test-integration/pom.xml
===================================================================
--- trunk/test-integration/pom.xml 2011-10-26 20:02:10 UTC (rev 3588)
+++ trunk/test-integration/pom.xml 2011-10-26 20:02:37 UTC (rev 3589)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Beta1</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-test-integration</artifactId>
13 years, 2 months
teiid SVN: r3588 - tags.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-10-26 16:02:10 -0400 (Wed, 26 Oct 2011)
New Revision: 3588
Added:
tags/teiid-parent-7.6.0.Beta1/
Log:
[maven-release-plugin] copy for tag teiid-parent-7.6.0.Beta1
13 years, 2 months