Commit in servicemix/tooling/jboss-deployer/src/main/java/org/servicemix/jboss/deployment on MAIN
JBIDeployer.java+25-61.2 -> 1.3
Corrected deployer to pick up zip and jar files

servicemix/tooling/jboss-deployer/src/main/java/org/servicemix/jboss/deployment
JBIDeployer.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- JBIDeployer.java	2 Aug 2005 23:03:26 -0000	1.2
+++ JBIDeployer.java	8 Aug 2005 12:45:03 -0000	1.3
@@ -35,8 +35,10 @@
  * @jmx.mbean name="jboss.system:service=ServiceMixDeployer"
  *            extends="org.jboss.deployment.SubDeployerMBean"
  */
-public class JBIDeployer extends SubDeployerSupport implements
-		SubDeployer, JBIDeployerMBean {
+public class JBIDeployer extends SubDeployerSupport implements SubDeployer,
+		JBIDeployerMBean {
+
+	private ObjectName deploymentService = null;
 
 	private ObjectName jbiContainerMBean = null;
 
@@ -49,10 +51,9 @@
 	 * @jmx.managed-operation
 	 */
 	public boolean accepts(DeploymentInfo di) {
-		// To be accepted the deployment's root name must end in jar
-		// TODO Should we be picking up ZIP files?
+		// To be accepted the deployment's root name must end in jar or zip
 		String urlStr = di.url.getFile();
-		if (!urlStr.endsWith(".jar") && !urlStr.endsWith(".jar/")) {
+		if (!urlStr.endsWith(".jar") && !urlStr.endsWith(".zip")) {
 			return false;
 		}
 
@@ -115,6 +116,15 @@
 	}
 
 	/**
+	 * Gets the JBI deployment service object name
+	 * 
+	 * @return The JBI deployment service object name
+	 */
+	public ObjectName getDeploymentService() {
+		return deploymentService;
+	}
+
+	/**
 	 * Gets the ObjectName of the JBI Container's MBean
 	 * 
 	 * @return The ObjectName of the JBI Container MBean
@@ -156,13 +166,22 @@
 			} else {
 				// just watch the original URL
 				di.watch = di.url;
-			}			
+			}
 		} catch (Exception e) {
 			throw new DeploymentException(e);
 		}
 
 		// invoke super-class initialization
 		super.init(di);
+	}
+
+	/**
+	 * Sets the JBI deployment service object name
+	 * 
+	 * @param deploymentService
+	 */
+	public void setDeploymentService(ObjectName deploymentService) {
+		this.deploymentService = deploymentService;
 	}
 
 	/**
CVSspam 0.2.8



Reply via email to