You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by sp...@apache.org on 2006/05/02 22:03:31 UTC
svn commit: r399026 - in /geronimo/branches/1.1/modules:
deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/
deployment/src/java/org/apache/geronimo/deployment/
Author: sppatel
Date: Tue May 2 13:03:28 2006
New Revision: 399026
URL: http://svn.apache.org/viewcvs?rev=399026&view=rev
Log:
push targets to deployer gbean
Modified:
geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java
geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/DistributeCommand.java
geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
Modified: geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java?rev=399026&r1=399025&r2=399026&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java (original)
+++ geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java Tue May 2 13:03:28 2006
@@ -30,6 +30,7 @@
import javax.enterprise.deploy.spi.Target;
import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.deployment.Deployer;
import org.apache.geronimo.deployment.plugin.TargetModuleIDImpl;
import org.apache.geronimo.gbean.AbstractName;
import org.apache.geronimo.gbean.AbstractNameQuery;
@@ -40,7 +41,7 @@
*/
public abstract class AbstractDeployCommand extends CommandSupport {
protected final Kernel kernel;
- private static final String[] DEPLOY_SIG = {boolean.class.getName(), File.class.getName(), File.class.getName()};
+ private static final String[] DEPLOY_SIG = {boolean.class.getName(), File.class.getName(), File.class.getName(), String.class.getName()};
protected final boolean spool;
protected File moduleArchive;
protected File deploymentPlan;
@@ -101,7 +102,7 @@
protected void doDeploy(Target target, boolean finished) throws Exception {
File[] args = {moduleArchive, deploymentPlan};
massageFileNames(args);
- Object deployParams[] = new Object[] {Boolean.valueOf(commandContext.isInPlace()), args[0], args[1]};
+ Object deployParams[] = new Object[] {Boolean.valueOf(commandContext.isInPlace()), args[0], args[1], target.getName()};
List objectNames = (List) kernel.invoke(deployer, "deploy", deployParams, DEPLOY_SIG);
if (objectNames == null || objectNames.isEmpty()) {
throw new DeploymentException("Server didn't deploy anything");
Modified: geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/DistributeCommand.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/DistributeCommand.java?rev=399026&r1=399025&r2=399026&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/DistributeCommand.java (original)
+++ geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/DistributeCommand.java Tue May 2 13:03:28 2006
@@ -56,7 +56,9 @@
if (deployer == null) {
return;
}
- doDeploy(targetList[0], true);
+ for(int i = 0; i < targetList.length; i++) {
+ doDeploy(targetList[i], true);
+ }
} catch (Exception e) {
doFail(e);
} finally {
Modified: geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java?rev=399026&r1=399025&r2=399026&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java (original)
+++ geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java Tue May 2 13:03:28 2006
@@ -90,8 +90,12 @@
t.setDaemon(true);
t.start();
}
-
+
public List deploy(boolean inPlace, File moduleFile, File planFile) throws DeploymentException {
+ return deploy(inPlace, moduleFile, planFile, null);
+ }
+
+ public List deploy(boolean inPlace, File moduleFile, File planFile, String targetConfigStore) throws DeploymentException {
File originalModuleFile = moduleFile;
File tmpDir = null;
if (moduleFile != null && !moduleFile.isDirectory()) {
@@ -112,7 +116,7 @@
}
try {
- return deploy(inPlace, planFile, moduleFile, null, true, null, null, null, null, null);
+ return deploy(inPlace, planFile, moduleFile, null, true, null, null, null, null, targetConfigStore);
} catch (DeploymentException e) {
log.debug("Deployment failed: plan=" + planFile + ", module=" + originalModuleFile, e);
throw e.cleanse();
@@ -277,6 +281,7 @@
} else {
store = (ConfigurationStore) stores.iterator().next();
}
+
// It's our responsibility to close this context, once we're done with it...
DeploymentContext context = builder.buildConfiguration(inPlace, configID, plan, module, stores, artifactResolver, store);
List configurations = new ArrayList();
@@ -419,6 +424,7 @@
infoFactory.addAttribute("kernel", Kernel.class, false);
infoFactory.addAttribute("remoteDeployUploadURL", String.class, false);
infoFactory.addOperation("deploy", new Class[]{boolean.class, File.class, File.class});
+ infoFactory.addOperation("deploy", new Class[]{boolean.class, File.class, File.class, String.class});
infoFactory.addOperation("deploy", new Class[]{boolean.class, File.class, File.class, File.class, boolean.class, String.class, String.class, String.class, String.class, String.class});
infoFactory.addReference("Builders", ConfigurationBuilder.class, "ConfigBuilder");