servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r415357 - in /incubator/servicemix/trunk: ./ servicemix-core/src/main/java/org/apache/servicemix/xbean/ servicemix-web/ servicemix-web/src/webapp/WEB-INF/
Date Mon, 19 Jun 2006 16:08:24 GMT
Author: gnodet
Date: Mon Jun 19 09:08:23 2006
New Revision: 415357

URL: http://svn.apache.org/viewvc?rev=415357&view=rev
Log:
Fix servicemix-web and add a workaround for http://issues.apache.org/jira/browse/XBEAN-21

Added:
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/xbean/
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/xbean/XmlWebApplicationContext.java
Modified:
    incubator/servicemix/trunk/pom.xml
    incubator/servicemix/trunk/servicemix-web/README.txt
    incubator/servicemix/trunk/servicemix-web/pom.xml
    incubator/servicemix/trunk/servicemix-web/src/webapp/WEB-INF/activemq.xml
    incubator/servicemix/trunk/servicemix-web/src/webapp/WEB-INF/applicationContext.xml
    incubator/servicemix/trunk/servicemix-web/src/webapp/WEB-INF/web.xml

Modified: incubator/servicemix/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/pom.xml?rev=415357&r1=415356&r2=415357&view=diff
==============================================================================
--- incubator/servicemix/trunk/pom.xml (original)
+++ incubator/servicemix/trunk/pom.xml Mon Jun 19 09:08:23 2006
@@ -1681,6 +1681,11 @@
           <artifactId>maven-xbean-plugin</artifactId>
           <version>2.3</version>
         </plugin>
+        <plugin>
+          <groupId>org.mortbay.jetty</groupId>
+          <artifactId>maven-jetty6-plugin</artifactId>
+          <version>6.0.0beta17</version>
+        </plugin>
       </plugins>
     </pluginManagement>
     <plugins>

Added: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/xbean/XmlWebApplicationContext.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/xbean/XmlWebApplicationContext.java?rev=415357&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/xbean/XmlWebApplicationContext.java
(added)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/xbean/XmlWebApplicationContext.java
Mon Jun 19 09:08:23 2006
@@ -0,0 +1,75 @@
+/**
+ * 
+ * Copyright 2005-2006 The Apache Software Foundation or its licensors,  as applicable.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License. 
+ * 
+ **/
+package org.apache.servicemix.xbean;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.xbean.spring.context.SpringApplicationContext;
+import org.apache.xbean.spring.context.impl.XBeanHelper;
+import org.springframework.beans.factory.support.DefaultListableBeanFactory;
+import org.springframework.beans.factory.xml.ResourceEntityResolver;
+import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
+
+/**
+ * An XBean version of the regular Spring class to provide improved XML
+ * handling.
+ * 
+ * @author James Strachan
+ * @author Dain Sundstrom
+ * @version $Id$
+ * @since 2.0
+ */
+public class XmlWebApplicationContext extends org.springframework.web.context.support.XmlWebApplicationContext
implements SpringApplicationContext {
+    private final List xmlPreprocessors;
+
+    /**
+     * Creates a XmlWebApplicationContext which loads the configuration from the a web application
context.
+     */
+    public XmlWebApplicationContext() {
+        this.xmlPreprocessors = Collections.EMPTY_LIST;
+    }
+
+    /**
+     * Creates a XmlWebApplicationContext which loads the configuration from the a web application
context.
+     * @param xmlPreprocessors the SpringXmlPreprocessors to apply before passing the xml
to Spring for processing
+     */
+    public XmlWebApplicationContext(List xmlPreprocessors) {
+        this.xmlPreprocessors = xmlPreprocessors;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException
{
+        // Create a new XmlBeanDefinitionReader for the given BeanFactory.
+        XmlBeanDefinitionReader beanDefinitionReader = XBeanHelper.createBeanDefinitionReader(this,
beanFactory, xmlPreprocessors);
+
+        // Configure the bean definition reader with this context's
+        // resource loading environment.
+        beanDefinitionReader.setResourceLoader(this);
+        beanDefinitionReader.setEntityResolver(new ResourceEntityResolver(this));
+
+        // Allow a subclass to provide custom initialization of the reader,
+        // then proceed with actually loading the bean definitions.
+        initBeanDefinitionReader(beanDefinitionReader);
+        loadBeanDefinitions(beanDefinitionReader);
+    }
+    
+}

Modified: incubator/servicemix/trunk/servicemix-web/README.txt
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web/README.txt?rev=415357&r1=415356&r2=415357&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-web/README.txt (original)
+++ incubator/servicemix/trunk/servicemix-web/README.txt Mon Jun 19 09:08:23 2006
@@ -1 +1,8 @@
-A WAR deployment unit for ServiceMix
+A WAR deployment unit for ServiceMix.
+
+To quickly run it, just launch
+   mvn jett6:run
+   
+and browse the application at
+   http://localhost:8080/
+

Modified: incubator/servicemix/trunk/servicemix-web/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web/pom.xml?rev=415357&r1=415356&r2=415357&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-web/pom.xml (original)
+++ incubator/servicemix/trunk/servicemix-web/pom.xml Mon Jun 19 09:08:23 2006
@@ -54,6 +54,28 @@
       <artifactId>derby</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.apache.xbean</groupId>
+      <artifactId>xbean-spring</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.xbean</groupId>
+          <artifactId>xbean-spring-common</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.xbean</groupId>
+          <artifactId>xbean-spring-v1</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.xbean</groupId>
+          <artifactId>xbean-spring-v2</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-servlet_2.4_spec</artifactId>
       <scope>provided</scope>

Modified: incubator/servicemix/trunk/servicemix-web/src/webapp/WEB-INF/activemq.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web/src/webapp/WEB-INF/activemq.xml?rev=415357&r1=415356&r2=415357&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-web/src/webapp/WEB-INF/activemq.xml (original)
+++ incubator/servicemix/trunk/servicemix-web/src/webapp/WEB-INF/activemq.xml Mon Jun 19 09:08:23
2006
@@ -1,29 +1,29 @@
 <!-- START SNIPPET: xbean -->
-<beans xmlns="http://activemq.org/config/1.0">
+<beans xmlns:amq="http://activemq.org/config/1.0">
   
-  <broker id="broker" useJmx="false">
+  <amq:broker id="broker" useJmx="false">
 
-    <persistenceAdapter>
-      <journaledJDBC journalLogFiles="5" dataDirectory="#dataDir"/>
+    <amq:persistenceAdapter>
+      <amq:journaledJDBC journalLogFiles="5" dataDirectory="#dataDir"/>
       <!-- To use a different datasource, use th following syntax : -->
       <!-- 
-      <journaledJDBC journalLogFiles="5" dataDirectory="../data" dataSource="#postgres-ds"/>
+      <amq:journaledJDBC journalLogFiles="5" dataDirectory="../data" dataSource="#postgres-ds"/>
        -->
-    </persistenceAdapter>
+    </amq:persistenceAdapter>
   
-    <transportConnectors>
-       <transportConnector uri="tcp://localhost:61636" discoveryUri="multicast://default"/>
-    </transportConnectors>
+    <amq:transportConnectors>
+       <amq:transportConnector uri="tcp://localhost:61636" discoveryUri="multicast://default"/>
+    </amq:transportConnectors>
     
-    <networkConnectors>
+    <amq:networkConnectors>
       <!-- by default just auto discover the other brokers -->
-      <networkConnector uri="multicast://default"/>
+      <amq:networkConnector uri="multicast://default"/>
       <!--  
-      <networkConnector uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
+      <amq:networkConnector uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
       -->
-    </networkConnectors>
+    </amq:networkConnectors>
     
-  </broker>
+  </amq:broker>
   
   <!--  This xbean configuration file supports all the standard spring xml configuration
options -->
   

Modified: incubator/servicemix/trunk/servicemix-web/src/webapp/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web/src/webapp/WEB-INF/applicationContext.xml?rev=415357&r1=415356&r2=415357&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-web/src/webapp/WEB-INF/applicationContext.xml (original)
+++ incubator/servicemix/trunk/servicemix-web/src/webapp/WEB-INF/applicationContext.xml Mon
Jun 19 09:08:23 2006
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://xbean.org/schemas/spring/1.0"
-	xmlns:sm="http://servicemix.apache.org/config/1.0"
-	xmlns:my="http://servicemix.apache.org/demo/"
-  xmlns:foo="http://servicemix.apache.org/demo/">
+<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
+	     xmlns:my="http://servicemix.apache.org/demo/"
+       xmlns:foo="http://servicemix.apache.org/demo/">
 
   <!-- the JBI container -->
   <sm:container id="jbi"
@@ -22,7 +21,9 @@
       <!--  an example HTTP binding for use by the SpringBindingServlet  -->
       <!-- START SNIPPET: http -->
       <sm:activationSpec componentName="httpBinding" service="foo:httpBinding" destinationService="foo:echo">
-        <sm:component><bean class="org.apache.servicemix.components.http.HttpInOutBinding"
/></sm:component>
+        <sm:component>
+          <bean class="org.apache.servicemix.components.http.HttpInOutBinding" />
+        </sm:component>
       </sm:activationSpec>
       <!-- END SNIPPET: http -->
 
@@ -39,22 +40,24 @@
       <sm:activationSpec componentName="timer" service="my:timer" destinationService="my:inputSender">
         <sm:component>
           <bean class="org.apache.servicemix.components.quartz.QuartzComponent">
-        <property name="triggers">
-          <map>
-            <entry>
-              <key>
-                <bean class="org.quartz.SimpleTrigger">
-                  <property name="repeatInterval" value="10000"/>
-                  <property name="repeatCount" value="-1"/>
-                </bean>
-              </key>
-                <bean class="org.quartz.JobDetail">
-                  <property name="name" value="My Example Job"/>
-                  <property name="group" value="ServiceMix"/>
-                </bean>
-            </entry>
-          </map>
-        </property>
+            <property name="triggers">
+              <map>
+              <!--
+                <entry>
+                  <key>
+                    <bean class="org.quartz.SimpleTrigger">
+                      <property name="repeatInterval" value="10000"/>
+                      <property name="repeatCount" value="-1"/>
+                    </bean>
+                  </key>
+                  <bean class="org.quartz.JobDetail">
+                    <property name="name" value="My Example Job"/>
+                    <property name="group" value="ServiceMix"/>
+                  </bean>
+                </entry>
+                -->
+              </map>
+            </property>
           </bean>
         </sm:component>
       </sm:activationSpec>
@@ -62,15 +65,15 @@
       <sm:activationSpec componentName="inputSender" service="my:inputSender">
         <sm:component>
           <bean class="org.apache.servicemix.components.jms.JmsSenderComponent">
-        <property name="template">
-          <bean class="org.springframework.jms.core.JmsTemplate">
-            <property name="connectionFactory">
-              <ref local="jmsFactory"/>
+            <property name="template">
+              <bean class="org.springframework.jms.core.JmsTemplate">
+                <property name="connectionFactory">
+                  <ref local="jmsFactory"/>
+                </property>
+                <property name="defaultDestinationName" value="demo.org.apache.servicemix.source"/>
+                <property name="pubSubDomain" value="true"/>
+              </bean>
             </property>
-            <property name="defaultDestinationName" value="demo.org.apache.servicemix.source"/>
-            <property name="pubSubDomain" value="true"/>
-          </bean>
-        </property>
           </bean>
         </sm:component>
       </sm:activationSpec>
@@ -80,13 +83,13 @@
       <sm:activationSpec componentName="inputReceiver" service="my:inputReceiver" destinationService="my:outputSender">
         <sm:component>
           <bean class="org.apache.servicemix.components.jms.JmsInUsingJCABinding">
-        <property name="jcaContainer" ref="jencks"/>
-        <property name="activationSpec">
-          <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
-            <property name="destination" value="demo.org.apache.servicemix.source"/>
-            <property name="destinationType" value="javax.jms.Topic"/>
-          </bean>
-        </property>
+            <property name="jcaContainer" ref="jencks"/>
+            <property name="activationSpec">
+              <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
+                <property name="destination" value="demo.org.apache.servicemix.source"/>
+                <property name="destinationType" value="javax.jms.Topic"/>
+              </bean>
+            </property>
           </bean>
         </sm:component>
       </sm:activationSpec>
@@ -95,15 +98,13 @@
       <sm:activationSpec componentName="outputSender" service="my:outputSender">
         <sm:component>
           <bean class="org.apache.servicemix.components.jms.JmsSenderComponent">
-        <property name="template">
-          <bean class="org.springframework.jms.core.JmsTemplate">
-            <property name="connectionFactory">
-              <ref local="jmsFactory"/>
+            <property name="template">
+              <bean class="org.springframework.jms.core.JmsTemplate">
+                <property name="connectionFactory" ref="jmsFactory"/>
+                <property name="defaultDestinationName" value="demo.org.apache.servicemix.result"/>
+                <property name="pubSubDomain" value="true"/>
+              </bean>
             </property>
-            <property name="defaultDestinationName" value="demo.org.apache.servicemix.result"/>
-            <property name="pubSubDomain" value="true"/>
-          </bean>
-        </property>
           </bean>
         </sm:component>
       </sm:activationSpec>
@@ -113,13 +114,13 @@
       <sm:activationSpec componentName="jmsTrace" service="my:jmsTrace" destinationService="my:trace">
         <sm:component>
           <bean class="org.apache.servicemix.components.jms.JmsInUsingJCABinding">
-        <property name="jcaContainer" ref="jencks"/>
-        <property name="activationSpec">
-          <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
-            <property name="destination" value="demo.org.apache.servicemix.result"/>
-            <property name="destinationType" value="javax.jms.Topic"/>
-          </bean>
-        </property>
+            <property name="jcaContainer" ref="jencks"/>
+            <property name="activationSpec">
+              <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
+                <property name="destination" value="demo.org.apache.servicemix.result"/>
+                <property name="destinationType" value="javax.jms.Topic"/>
+              </bean>
+            </property>
           </bean>
         </sm:component>
       </sm:activationSpec>

Modified: incubator/servicemix/trunk/servicemix-web/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web/src/webapp/WEB-INF/web.xml?rev=415357&r1=415356&r2=415357&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-web/src/webapp/WEB-INF/web.xml (original)
+++ incubator/servicemix/trunk/servicemix-web/src/webapp/WEB-INF/web.xml Mon Jun 19 09:08:23
2006
@@ -15,7 +15,7 @@
   </context-param>
   <context-param>
     <param-name>contextClass</param-name>
-    <param-value>org.apache.xbean.spring.context.XmlWebApplicationContext</param-value>
+    <param-value>org.apache.servicemix.xbean.XmlWebApplicationContext</param-value>
   </context-param>
 
   <listener>



Mime
View raw message