Title: [833] trunk/tooling/jboss-deployer: Updated to ServiceMix 2.0

Diff

Modified: trunk/tooling/jboss-deployer/project.properties (832 => 833)

--- trunk/tooling/jboss-deployer/project.properties	2005-11-14 10:17:38 UTC (rev 832)
+++ trunk/tooling/jboss-deployer/project.properties	2005-11-14 19:45:23 UTC (rev 833)
@@ -26,4 +26,131 @@
 
 maven.javadoc.links=http://java.sun.com/j2se/1.4.1/docs/api/,http://java.sun.com/j2ee/1.4/docs/api/ 
 maven.javadoc.source=1.4
-maven.javadoc.additionalparam = -linksource
\ No newline at end of file
+maven.javadoc.additionalparam = -linksource
+
+# -------------------------------------------------------------------
+# dependency versions
+# -------------------------------------------------------------------
+activecluster_version=1.1-SNAPSHOT
+activeio_version=2.1
+activemq_version=3.2
+activesoap_version=1.0-SNAPSHOT
+annogen_version=0.1.0
+ant_version=1.6
+antlr_version=2.7.5
+apacheds_version=0.9.2
+asn1_version=0.3.2
+axion_version=1.0-M3-dev
+axis_version=1.3
+backport_util_concurrent_version=2.0_01_pd
+berkeleydb_version=1.5.1
+berkeleydb_native_version=4.2
+cglib_version=2.1_3
+cglib_full_version=2.0
+commons_beanutils_version=1.7.0
+commons_betwixt_version=0.7
+commons_codec_version=1.3
+commons_collections_version=3.1
+commons_dbcp_version=1.2
+commons_digester_version=1.7
+commons_discovery_version=0.2
+commons_httpclient_version=3.0-rc2
+commons_io_version=1.0
+commons_jelly_tags_velocity_version=SNAPSHOT
+commons_lang_version=2.0
+commons_logging_version=1.0.4
+commons_net_version=1.4.0
+commons_pool_version=1.2
+commons_primitives_version=1.0
+commons_vfs_version=20050307052300
+concurrent_version=1.3.4
+derby_version=10.1.1.0
+derbynet_version=10.1.1.0
+drools_core_version=2.1
+drools_version=2.1
+howl_logger_version=0.1.8
+easymock_version=1.2_Java1.5
+emberio_version=0.3-alpha
+geronimo_kernel_version=1.0-SNAPSHOT
+geronimo_system_version=1.0-SNAPSHOT
+geronimo_remoting_version=1.0-SNAPSHOT
+geronimo_network_version=1.0-SNAPSHOT
+geronimo_common_version=1.0-SNAPSHOT
+geronimo_connector_version=1.0-SNAPSHOT
+geronimo_core_version=1.0-SNAPSHOT
+geronimo_deployment_version=1.0-SNAPSHOT
+geronimo_deployment_plugin_version=1.0-SNAPSHOT
+geronimo_j2ee_version=1.0-SNAPSHOT
+geronimo_security_version=1.0-SNAPSHOT
+geronimo_spec_activation_version=1.0.2-rc4
+geronimo_spec_ejb_version=2.1-rc4
+geronimo_spec_j2ee_management_version=1.0-rc4
+geronimo_spec_j2ee_jacc_version=1.0-rc4
+geronimo_spec_j2ee_jaxrpc_version=1.1-rc4
+geronimo_spec_j2ee_connector_version=1.5-rc4
+geronimo_spec_j2ee_version=1.4-rc4
+geronimo_spec_javamail_version=1.3.1-rc5
+geronimo_spec_jms_version=1.1-rc4
+geronimo_spec_jta_version=1.0.1B-rc4
+geronimo_spec_jsp_version=2.0-rc4
+geronimo_spec_servlet_version=2.4-rc4
+geronimo_transaction_version=1.0-SNAPSHOT
+groovy_version=1.0-jsr-03
+hsqldb_version=1.7.3.3
+janino_version=2.3.2
+jasper_compiler_version=4.2.20RC0
+jasper_runtime_version=4.2.20RC0
+javacc_version=2.1
+jaxen_version=1.1-beta-8
+jaxp_version=1.3
+jdbm_version=0.20-dev
+jdom_version=1.0
+jencks_version=1.1
+jgroups_version=2.2.5
+jmdns_version=1.0-RC2
+jmock_version=1.0.1
+jmock_cglib_version=1.0.1
+jsr_223_version=1.0-pr
+jrms_version=1.1
+junit_version=3.8.1
+jxta_version=2.0
+kerberos_common_version=0.5
+kerberos_protocols_version=0.5
+ldap_protocols_version=0.9.2
+lingo_version=1.0
+log4j_version=1.2.12
+maven_itest_plugin_version=1.0
+mina_version=0.7.3
+mule_version=1.0
+mx4j_version=2.1.1
+mx4j_remote_version=2.1.1
+mx4j_tools_version=2.1.1
+openejb_core_version=2.0-SNAPSHOT
+org.mortbay.jetty_version=4.2.20RC0
+oro_version=2.0.8
+p2psockets_core_version=1.1.2
+qdox_version=1.5
+quartz_version=1.4.5
+regexp_version=1.3
+rome_version=0.5
+simple_jndi_version=0.11.1
+slf4j_version=1.0-beta7
+spring_version=1.2.5
+stax_api_version=1.0
+stax_utils_version=snapshot-20040917
+tomcat_version=5.0.28
+velocity_version=1.4-rc1
+woodstox_version=2.0.3
+wsdl4j_version=1.5.1
+wsif_version=2.0.1_IB3
+xalan_version=2.7.0
+xerces_version=2.6.2
+xercesImpl_version=2.7.1
+xbean_version=2.0
+xfire_version=1.0-20051107.201226
+xml_apis_version=1.3.02
+xmlbeans_version=2.0.0
+xml_parser_apis_version=2.2.1
+xmlpull_version=1.1.3.4d_b4_min
+xstream_version=1.1.2
+yom_version=1.0-alpha-2

Modified: trunk/tooling/jboss-deployer/project.xml (832 => 833)

--- trunk/tooling/jboss-deployer/project.xml	2005-11-14 10:17:38 UTC (rev 832)
+++ trunk/tooling/jboss-deployer/project.xml	2005-11-14 19:45:23 UTC (rev 833)
@@ -5,7 +5,7 @@
 	<name>ServiceMix JBoss Deployer</name>
 	<id>jboss-deployer</id>
 	<groupId>servicemix</groupId>
-	<currentVersion>1.0</currentVersion>
+	<currentVersion>2.0</currentVersion>
 
 	<organization>
 		<name>ServiceMix.</name>
@@ -40,14 +40,6 @@
 	<contributors></contributors>
 
 	<dependencies>
-		<dependency>
-			<groupId>servicemix</groupId>
-			<artifactId>servicemix</artifactId>
-			<version>1.0</version>
-			<properties>
-				<sar.bundle>true</sar.bundle>
-			</properties>
-		</dependency>
 
 		<!--  JBoss 4.0.2 libs -->
 		<dependency>
@@ -66,6 +58,16 @@
 			<version>4.0.2</version>
 		</dependency>
 
+		<!-- JCA container and transaction manaqer -->
+		<dependency>
+			<id>jencks+all</id>
+			<version>${jencks_version}</version>
+			<properties>
+				<lib>true</lib>
+				<sar.bundle>true</sar.bundle>
+			</properties>
+		</dependency>
+
 		<!--  Required to support XDoclet gen -->
 		<dependency>
 			<id>xjavadoc</id>
@@ -93,126 +95,93 @@
 
 		<!--  Pulled over from ServiceMix  -->
 		<dependency>
-			<groupId>mx4j</groupId>
-			<artifactId>mx4j</artifactId>
-			<version>2.1.1</version>
+			<id>servicemix+jbi</id>
+			<version>${pom.currentVersion}</version>
+			<properties>
+				<sar.bundle>true</sar.bundle>
+			</properties>
 		</dependency>
-		<dependency>
-			<groupId>mx4j</groupId>
-			<artifactId>mx4j-jmx</artifactId>
-			<version>2.1.1</version>
-		</dependency>
 
 		<dependency>
-			<groupId>mx4j</groupId>
-			<artifactId>mx4j-remote</artifactId>
-			<version>2.1.1</version>
+			<id>servicemix</id>
+			<version>${pom.currentVersion}</version>
+			<properties>
+				<sar.bundle>true</sar.bundle>
+			</properties>
 		</dependency>
 
 		<dependency>
-			<groupId>mx4j</groupId>
-			<artifactId>mx4j-tools</artifactId>
-			<version>2.1.1</version>
+			<id>concurrent</id>
+			<version>${concurrent_version}</version>
+			<properties>
+				<lib>true</lib>
+				<sar.bundle>true</sar.bundle>
+			</properties>
 		</dependency>
 
 		<dependency>
-			<groupId>mx4j</groupId>
-			<artifactId>mx4j-impl</artifactId>
-			<version>2.1.1</version>
-		</dependency>
-
-		<dependency>
-			<id>jencks+all</id>
-			<version>1.0-M1</version>
+			<id>backport-util-concurrent</id>
+			<version>${backport_util_concurrent_version}</version>
 			<properties>
 				<lib>true</lib>
 				<sar.bundle>true</sar.bundle>
 			</properties>
 		</dependency>
 
-		<!--For remote management tasks-->
-
 		<dependency>
-			<id>ant</id>
-			<version>1.6</version>
+			<id>wsdl4j</id>
+			<version>${wsdl4j_version}</version>
+			<properties>
+				<optional>true</optional>
+				<sar.bundle>true</sar.bundle>
+			</properties>
 		</dependency>
 
 		<dependency>
-			<groupId>commons-logging</groupId>
-			<artifactId>commons-logging</artifactId>
-			<version>1.0.3</version>
-			<url>http://jakarta.apache.org/commons/logging/</url>
-		</dependency>
-
-		<dependency>
-			<id>concurrent</id>
-			<version>1.3.4</version>
-		</dependency>
-
-		<dependency>
 			<id>commons-beanutils</id>
-			<version>1.7.0</version>
+			<version>${commons_beanutils_version}</version>
 			<properties>
+				<lib>true</lib>
 				<sar.bundle>true</sar.bundle>
 			</properties>
 		</dependency>
 
-
-		<!-- for DOM, SAX, StAX and XPath support -->
-
 		<dependency>
 			<groupId>servicemix</groupId>
 			<artifactId>jaxp</artifactId>
 			<version>1.3</version>
 			<properties>
-				<sar.bundle>true</sar.bundle>
+				<lib>true</lib>
 			</properties>
 		</dependency>
 
 		<dependency>
 			<id>stax+api</id>
-			<version>1.0</version>
+			<version>${stax_api_version}</version>
 			<properties>
+				<lib>true</lib>
 				<sar.bundle>true</sar.bundle>
 			</properties>
 		</dependency>
 
-		<!-- possible StAX implementations: START -->
-
-		<!-- fast implementation of StAX -->
 		<dependency>
-			<groupId>woodstox</groupId>
-			<artifactId>wstx-asl</artifactId>
-			<version>2.0</version>
+			<id>jaxen</id>
+			<version>${jaxen_version}</version>
 			<properties>
+				<optional>true</optional>
 				<sar.bundle>true</sar.bundle>
 			</properties>
 		</dependency>
 
-
+		<!-- for spring integration -->
 		<dependency>
-			<groupId>xerces</groupId>
-			<artifactId>xercesImpl</artifactId>
-			<version>2.6.2</version>
-		</dependency>
-		<dependency>
-			<groupId>xerces</groupId>
-			<artifactId>xmlParserAPIs</artifactId>
-			<version>2.6.2</version>
-		</dependency>
-
-		<!-- mostly included for some DOM/SAX tools we could maybe replace with JAXP versions -->
-		<dependency>
-			<id>xalan</id>
-			<version>2.6.0</version>
-		</dependency>
-
-		<dependency>
-			<groupId>servicemix</groupId>
+			<groupId>springframework</groupId>
 			<artifactId>spring</artifactId>
-			<version>1.2.2-dev-2</version>
+			<version>${spring_version}</version>
 			<properties>
+				<lib>true</lib>
 				<sar.bundle>true</sar.bundle>
+				<sar.bundle>true</sar.bundle>
 			</properties>
 		</dependency>
 
@@ -220,38 +189,60 @@
 		<!-- utility library for adapting StAX to SAX and JAXP Source -->
 		<dependency>
 			<id>stax-utils</id>
-			<version>snapshot-20040917</version>
+			<version>${stax_utils_version}</version>
 			<properties>
-				<sar.bundle>true</sar.bundle>
+				<lib>true</lib>
 			</properties>
 		</dependency>
 
+		<!--  for custom XML parsing -->
 		<dependency>
-			<id>activemq</id>
-			<version>3.1-M6</version>
+			<groupId>org.xbean</groupId>
+			<artifactId>xbean-spring</artifactId>
+			<version>${xbean_version}</version>
+			<url>http://www.xbean.org</url>
 			<properties>
 				<sar.bundle>true</sar.bundle>
 			</properties>
 		</dependency>
+		<dependency>
+			<groupId>annogen</groupId>
+			<artifactId>annogen</artifactId>
+			<version>${annogen_version}</version>
+		</dependency>
+		<dependency>
+			<groupId>qdox</groupId>
+			<artifactId>qdox</artifactId>
+			<version>${qdox_version}</version>
+		</dependency>
 
-		<!-- JCA container -->
+		<!--  for ActiveMQ 3.x -->
 		<dependency>
-			<id>activemq+container</id>
-			<version>3.1-M6</version>
+			<id>activemq</id>
+			<version>${activemq_version}</version>
 			<properties>
+				<lib>true</lib>
 				<sar.bundle>true</sar.bundle>
 			</properties>
 		</dependency>
-
-		<!-- JCA RA for testing -->
 		<dependency>
 			<id>activemq+ra</id>
-			<version>3.1-M6</version>
+			<version>${activemq_version}</version>
 			<properties>
+				<lib>true</lib>
 				<sar.bundle>true</sar.bundle>
 			</properties>
 		</dependency>
 
+		<!-- For clustering services -->
+		<dependency>
+			<id>activecluster</id>
+			<version>${activecluster_version}</version>
+			<properties>
+				<optional>true</optional>
+				<sar.bundle>true</sar.bundle>
+			</properties>
+		</dependency>
 	</dependencies>
 
 	<build>

Modified: trunk/tooling/jboss-deployer/src/main/java/org/servicemix/jboss/deployment/JBIDeployer.java (832 => 833)

--- trunk/tooling/jboss-deployer/src/main/java/org/servicemix/jboss/deployment/JBIDeployer.java	2005-11-14 10:17:38 UTC (rev 832)
+++ trunk/tooling/jboss-deployer/src/main/java/org/servicemix/jboss/deployment/JBIDeployer.java	2005-11-14 19:45:23 UTC (rev 833)
@@ -60,7 +60,7 @@
 
 		boolean accepts = false;
 		if (urlStr.endsWith(".jar") || urlStr.endsWith(".zip")) {
-			// However the jar/zip must also contain an META-INF/jbi.xml			
+			// However the jar/zip must also contain an META-INF/jbi.xml
 			try {
 				URL dd = di.localCl.findResource("META-INF/jbi.xml");
 				if (dd != null) {
@@ -73,7 +73,7 @@
 			// If is ends with -sm.xml then we just accept it
 			accepts = true;
 		}
-		
+
 		return accepts;
 	}
 
@@ -89,7 +89,7 @@
 	public void create(DeploymentInfo di) throws DeploymentException {
 		try {
 			String urlStr = di.url.getFile();
-			
+
 			if (jbiContainerMBean == null) {
 				throw new DeploymentException(
 						"The ServiceMix JBI container is not defined in Deployer");
@@ -106,7 +106,7 @@
 						new Object[] { di.url.toExternalForm() },
 						new String[] { "java.lang.String" });
 			}
-			
+
 		} catch (Exception e) {
 			throw new DeploymentException(
 					"ServiceMix deployer unable to deploy: " + di, e);
@@ -127,7 +127,29 @@
 	 * @jmx.managed-operation
 	 */
 	public void destroy(DeploymentInfo di) {
+		try {
+			String urlStr = di.url.getFile();
 
+			if (jbiContainerMBean == null) {
+				throw new DeploymentException(
+						"The ServiceMix JBI container is not defined in Deployer");
+			}
+			log
+					.info("ServiceMix deployer passing deployment to JBI container ["
+							+ di.url.toExternalForm() + "]");
+			if (urlStr.endsWith(".jar") || urlStr.endsWith(".zip")) {
+				getServer().invoke(jbiContainerMBean, "uninstallArchive",
+						new Object[] { di.url.toExternalForm() },
+						new String[] { "java.lang.String" });
+			} else {
+				getServer().invoke(jbiContainerMBean, "uninstallServiceMixXml",
+						new Object[] { di.url.toExternalForm() },
+						new String[] { "java.lang.String" });
+			}
+		} catch (Exception e) {
+			log.error("Unable to destroy deployment [" + di.getCanonicalName()
+					+ "]");
+		}
 	}
 
 	/**

Modified: trunk/tooling/jboss-deployer/src/main/java/org/servicemix/jboss/deployment/JBIService.java (832 => 833)

--- trunk/tooling/jboss-deployer/src/main/java/org/servicemix/jboss/deployment/JBIService.java	2005-11-14 10:17:38 UTC (rev 832)
+++ trunk/tooling/jboss-deployer/src/main/java/org/servicemix/jboss/deployment/JBIService.java	2005-11-14 19:45:23 UTC (rev 833)
@@ -18,14 +18,19 @@
 package org.servicemix.jboss.deployment;
 
 import java.io.File;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 import javax.jbi.JBIException;
 import javax.jbi.management.DeploymentException;
 import javax.naming.InitialContext;
 
 import org.jboss.system.ServiceMBeanSupport;
+import org.servicemix.jbi.config.spring.XBeanProcessor;
 import org.servicemix.jbi.container.JBIContainer;
-import org.springframework.context.support.FileSystemXmlApplicationContext;
+import org.xbean.spring.context.ClassPathXmlApplicationContext;
 
 /**
  * This is the deployer that handles picking up and deploying a JBI package out
@@ -43,6 +48,8 @@
 
 	private String transactionManager = "java:/TransactionManager";
 
+	private Map containerMap = new HashMap();
+
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -115,6 +122,24 @@
 	}
 
 	/**
+	 * Request the JBI Container uninstall the given archive
+	 * 
+	 * @param archive
+	 *            The name of the archive to install
+	 * 
+	 * @jmx.managed-operation
+	 */
+	public void uninstallArchive(String archive) {
+		try {
+			jbiContainer.removeArchive(archive);
+		} catch (DeploymentException e) {
+			throw new RuntimeException(
+					"ServiceMix JBIContainer unable to uninstall archive ["
+							+ archive + "]", e);
+		}
+	}
+
+	/**
 	 * Request the JBI Container install the given ServiceMix XML
 	 * 
 	 * @param archive
@@ -128,12 +153,34 @@
 		log
 				.info("Creating ServiceMix JBI installer from XML [" + archive
 						+ "]");
-		FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext(
-				archive);
-		context.getBean("jbi");
+		List processors = Arrays.asList(new Object[] { new XBeanProcessor() });
+		containerMap.put(archive, new ClassPathXmlApplicationContext(archive,
+				processors));
 	}
 
 	/**
+	 * Request the JBI Container uninstall the given ServiceMix XML
+	 * 
+	 * @param archive
+	 *            The name of the archive to install
+	 * 
+	 * @jmx.managed-operation
+	 */
+	public void uninstallServiceMixXml(String archive) {
+		// Ok, we are going to use the spring infrastructure
+		// to create a container
+		log.info("Destroying ServiceMix JBI installer from XML [" + archive
+				+ "]");
+		ClassPathXmlApplicationContext context = (ClassPathXmlApplicationContext) containerMap
+				.get(archive);
+		if (context != null)
+			context.destroy();
+		else
+			log.warn("Unable to find deployed JBI container for XML ["
+					+ archive + "]");
+	}
+
+	/**
 	 * Sets the location of the transaction manager to use
 	 * 
 	 * @param transactionManager

Modified: trunk/tooling/jboss-deployer/src/sar/META-INF/jboss-service.xml (832 => 833)

--- trunk/tooling/jboss-deployer/src/sar/META-INF/jboss-service.xml	2005-11-14 10:17:38 UTC (rev 832)
+++ trunk/tooling/jboss-deployer/src/sar/META-INF/jboss-service.xml	2005-11-14 19:45:23 UTC (rev 833)
@@ -12,7 +12,7 @@
 
 	<mbean code="org.servicemix.jboss.deployment.JBIService"
 		name="org.servicemix:service=JBIService">
-		<depends>jboss:service=TransactionManager"</depends>
+		<depends>jboss:service=TransactionManager</depends>
 		<attribute name="TransactionManager">java:/TransactionManager</attribute>  -->
 	</mbean>
 </server>

Reply via email to