activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r807670 - in /activemq/sandbox/activemq-flow: ./ activemq-all/src/test/java/org/apache/activemq/legacy/bugs/amq1095/ activemq-broker/ activemq-broker/src/main/java/org/apache/activemq/apollo/broker/ activemq-broker/src/main/java/org/apache/...
Date Tue, 25 Aug 2009 15:32:51 GMT
Author: chirino
Date: Tue Aug 25 15:32:48 2009
New Revision: 807670

URL: http://svn.apache.org/viewvc?rev=807670&view=rev
Log:
- Moved the jaxb model into it's own maven module.
- Eliminated the spring dependency in broker and stomp modules.


Added:
    activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerAware.java
      - copied, changed from r807584, activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/legacy/broker/BrokerServiceAware.java
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/java/org/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/java/org/apache/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/java/org/apache/activemq/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/java/org/apache/activemq/apollo/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/java/org/apache/activemq/apollo/jaxb/
      - copied from r807584, activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/resources/META-INF/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/resources/META-INF/services/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/resources/META-INF/services/org/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/resources/META-INF/services/org/apache/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/resources/META-INF/services/org/apache/activemq/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/resources/META-INF/services/org/apache/activemq/apollo/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/resources/META-INF/services/org/apache/activemq/apollo/broker/
      - copied from r807584, activemq/sandbox/activemq-flow/activemq-broker/src/main/resources/META-INF/services/org/apache/activemq/apollo/broker/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/resources/non-persistent-activemq.xml
      - copied unchanged from r807584, activemq/sandbox/activemq-flow/activemq-broker/src/main/resources/non-persistent-activemq.xml
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/resources/org/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/resources/org/apache/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/resources/org/apache/activemq/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/resources/org/apache/activemq/apollo/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/resources/org/apache/activemq/apollo/jaxb/
      - copied from r807584, activemq/sandbox/activemq-flow/activemq-broker/src/main/resources/org/apache/activemq/apollo/jaxb/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/main/resources/persistent-activemq.xml
  (props changed)
      - copied unchanged from r807584, activemq/sandbox/activemq-flow/activemq-broker/src/main/resources/persistent-activemq.xml
    activemq/sandbox/activemq-flow/activemq-jaxb/src/test/java/org/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/test/java/org/apache/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/test/java/org/apache/activemq/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/test/java/org/apache/activemq/apollo/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/test/java/org/apache/activemq/apollo/jaxb/
      - copied from r807584, activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/apollo/jaxb/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/test/resources/org/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/test/resources/org/apache/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/test/resources/org/apache/activemq/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/test/resources/org/apache/activemq/apollo/
    activemq/sandbox/activemq-flow/activemq-jaxb/src/test/resources/org/apache/activemq/apollo/jaxb/
      - copied from r807584, activemq/sandbox/activemq-flow/activemq-broker/src/test/resources/org/apache/activemq/apollo/jaxb/
Removed:
    activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/
    activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/legacy/xbean/
    activemq/sandbox/activemq-flow/activemq-broker/src/main/resources/META-INF/services/org/apache/activemq/apollo/broker/
    activemq/sandbox/activemq-flow/activemq-broker/src/main/resources/non-persistent-activemq.xml
    activemq/sandbox/activemq-flow/activemq-broker/src/main/resources/org/apache/activemq/apollo/jaxb/
    activemq/sandbox/activemq-flow/activemq-broker/src/main/resources/persistent-activemq.xml
    activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/apollo/jaxb/
    activemq/sandbox/activemq-flow/activemq-broker/src/test/resources/org/apache/activemq/apollo/jaxb/
Modified:
    activemq/sandbox/activemq-flow/activemq-all/src/test/java/org/apache/activemq/legacy/bugs/amq1095/ActiveMQTestCase.java
    activemq/sandbox/activemq-flow/activemq-broker/pom.xml
    activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/Broker.java
    activemq/sandbox/activemq-flow/activemq-broker/src/test/resources/log4j.properties
    activemq/sandbox/activemq-flow/activemq-client/pom.xml
    activemq/sandbox/activemq-flow/activemq-jaxb/pom.xml
    activemq/sandbox/activemq-flow/activemq-openwire/pom.xml
    activemq/sandbox/activemq-flow/activemq-spring/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java
    activemq/sandbox/activemq-flow/activemq-stomp/pom.xml
    activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/JmsFrameTranslator.java
    activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java
    activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompSslTransportFactory.java
    activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompTransportFactory.java
    activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java
    activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompWireFormat.java
    activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompWireFormatFactory.java
    activemq/sandbox/activemq-flow/pom.xml

Modified: activemq/sandbox/activemq-flow/activemq-all/src/test/java/org/apache/activemq/legacy/bugs/amq1095/ActiveMQTestCase.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-all/src/test/java/org/apache/activemq/legacy/bugs/amq1095/ActiveMQTestCase.java?rev=807670&r1=807669&r2=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-all/src/test/java/org/apache/activemq/legacy/bugs/amq1095/ActiveMQTestCase.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-all/src/test/java/org/apache/activemq/legacy/bugs/amq1095/ActiveMQTestCase.java
Tue Aug 25 15:32:48 2009
@@ -17,7 +17,6 @@
 
 package org.apache.activemq.legacy.bugs.amq1095;
 
-import java.io.File;
 import java.net.URI;
 import java.util.Iterator;
 import java.util.LinkedList;

Modified: activemq/sandbox/activemq-flow/activemq-broker/pom.xml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-broker/pom.xml?rev=807670&r1=807669&r2=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-broker/pom.xml (original)
+++ activemq/sandbox/activemq-flow/activemq-broker/pom.xml Tue Aug 25 15:32:48 2009
@@ -30,32 +30,7 @@
   <version>6.0-SNAPSHOT</version>
 
   <name>ActiveMQ :: Broker</name>
-  
-  <repositories>
-    <repository>
-      <id>maven2-repository.dev.java.net</id>
-      <name>Java.net Maven  Repository </name>
-      <url>http://download.java.net/maven/2</url>
-    </repository>
-    <!--<repository>-->
-      <!--<id>codehaus</id>-->
-      <!--<name>Codehaus Maven 2 Repository</name>-->
-      <!--<url>http://repository.codehaus.org/</url>-->
-    <!--</repository>-->
-  </repositories>
-    
-  <pluginRepositories>
-  	<!-- For the schemagen plugin -->
-    <pluginRepository>
-      <id>open.iona.m2</id>
-      <name>IONA Open Source Community Release Repository</name>
-      <url>http://repo.open.iona.com/maven2</url>
-      <releases>
-        <enabled>true</enabled>
-      </releases>
-    </pluginRepository>
-  </pluginRepositories>
-  
+
   <dependencies>
   
     <dependency>
@@ -74,13 +49,6 @@
       <groupId>org.apache.activemq</groupId>
       <artifactId>activemq-kaha</artifactId>
     </dependency>
-    
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-context</artifactId>
-      <optional>true</optional>
-    </dependency>
-    
 
     <!-- Testing Dependencies -->    
     <dependency>
@@ -105,12 +73,7 @@
       <artifactId>log4j</artifactId>
       <scope>test</scope>
     </dependency>
-
-   <dependency>
-    <groupId>org.codehaus.woodstox</groupId>
-    <artifactId>wstx-asl</artifactId>
-    <version>4.0.0</version>
-   </dependency>
+      
   </dependencies>
 
   <build>
@@ -145,145 +108,7 @@
         </executions>
       </plugin>
 
-<!--
-
-    jaxb schemagen plugin does not work quite well for our use case (classpath problems),
-    so we're using it as an ant task (see below)
-    try to switch back to this in some future version
-
--->
-<!--
-       <plugin>
-        <groupId>com.sun.tools.jxc.maven2</groupId>
-        <artifactId>maven-jaxb-schemagen-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>process-sources</phase>
-            <configuration>
-              <destdir>${project.build.directory}/schema</destdir>
-              <includes>
-                <include>**/jaxb/package-info.java</include>
-                <include>**/jaxb/*Xml.java</include>
-              </includes>
-              <schemas>
-                <schema>
-                  <namespace>http://activemq.apache.org/schema/activemq/apollo</namespace>
-                  <file>activemq-apollo.xsd</file>
-                </schema>
-              </schemas>
-            </configuration>
-            <goals>
-              <goal>generate</goal>
-            </goals> 
-          </execution>
-        </executions>
-      </plugin>  
--->
-      
-      
-       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>generate schema</id>
-            <phase>process-sources</phase>
-            <configuration>
-                <tasks>        
-                <taskdef name="schemagen" classname="com.sun.tools.jxc.SchemaGenTask">
-                    <classpath refid="maven.compile.classpath"/>
-                </taskdef>
-                <mkdir dir="${project.build.directory}/schema"/>
-                <schemagen srcdir="${project.build.sourceDirectory}" destdir="${project.build.directory}/schema">
-                    <schema namespace="http://activemq.apache.org/schema/activemq/apollo"
file="activemq-apollo.xsd" />
-                    <classpath refid="maven.compile.classpath"/>
-                    <include name="**/jaxb/package-info.java"/>
-                    <include name="**/jaxb/*Xml.java"/>
-                </schemagen>
-                </tasks>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-        </executions>
-        
-        <dependencies>
-          <dependency>
-            <groupId>com.sun.xml.bind</groupId>
-            <artifactId>jaxb-xjc</artifactId>
-            <version>${xjc-version}</version>
-            <exclusions>
-              <exclusion>
-                <groupId>com.sun.xml.bind</groupId>
-                <artifactId>jaxb-impl</artifactId>
-              </exclusion>
-            </exclusions>            
-          </dependency>  
-          <dependency>
-            <groupId>com.sun.xml.bind</groupId>
-            <artifactId>jaxb-impl</artifactId>
-            <version>${jaxb-version}</version>
-            <exclusions>
-              <exclusion>
-                <groupId>javax.jws</groupId>
-                <artifactId>jsr181-api</artifactId>
-              </exclusion>
-            </exclusions>
-          </dependency>
-        </dependencies>
-      </plugin>
-
     </plugins>
   </build>
-  
-  <profiles>
-    <profile>
-      <id>jdk-1.5</id>
-      <activation>
-        <jdk>1.5</jdk>
-      </activation>
-      <dependencies>
-        <dependency>
-          <groupId>javax.xml.bind</groupId>
-          <artifactId>jaxb-api</artifactId>
-        </dependency>
-        <dependency>
-          <groupId>com.sun.xml.bind</groupId>
-          <artifactId>jaxb-impl</artifactId>
-        </dependency>
-      </dependencies>
-    </profile>
-    
-   <profile>
-      <id>ibmjdk</id>
-      <activation>
-        <file>
-          <exists>${java.home}/../lib/tools.jar</exists>
-        </file>
-      </activation>
-      <build>
-        <pluginManagement>
-          <plugins>
-            <plugin>
-              <groupId>org.apache.maven.plugins</groupId>
-              <artifactId>maven-antrun-plugin</artifactId>
-              <dependencies>
-                <dependency>
-                  <groupId>com.sun</groupId>
-                  <artifactId>tools</artifactId>
-                  <!--the real JDK version could be 1.5 or 1.6-->
-                  <version>1.5.0</version>
-                  <scope>system</scope>
-                  <optional>true</optional>
-                  <systemPath>${java.home}/../lib/tools.jar</systemPath>
-                </dependency>
-              </dependencies>
-            </plugin>
-          </plugins>
-        </pluginManagement>
-      </build>
-    </profile>
-  </profiles>
 
 </project>

Modified: activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/Broker.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/Broker.java?rev=807670&r1=807669&r2=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/Broker.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/Broker.java
Tue Aug 25 15:32:48 2009
@@ -53,7 +53,7 @@
     private VirtualHost defaultVirtualHost;
     private IDispatcher dispatcher;
     private File dataDirectory;
-    
+
     private final class BrokerAcceptListener implements TransportAcceptListener {
 		public void onAccept(final Transport transport) {
 		    BrokerConnection connection = new BrokerConnection();
@@ -333,7 +333,46 @@
             return new ArrayList<VirtualHost>(virtualHosts.values());
         }
     }
-    
+
+    // /////////////////////////////////////////////////////////////////
+    // Bean registry related methods to support more easily configuring
+    // broker extensions.
+    // /////////////////////////////////////////////////////////////////
+
+
+    /**
+     * Puts a bean into the registry.
+     *
+     * @param  name the name of the bean
+     * @param  value the bean value
+     * @return the previous bean registered with the name or null
+     *         if none was previously registered
+     */
+    public Object putBean(String name, Object value) {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * Gets a listing of all the registered bean names which
+     * implement the specified class.
+     *
+     * @param clazz
+     * @return
+     */
+    public String[] getBeanNamesForType(Class<?> clazz) {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * Gets a bean instance that has been registered.
+     * @param name
+     * @param <T>
+     * @return
+     */
+    public <T> T getBean(String name) {
+        throw new UnsupportedOperationException();
+    }
+
     // /////////////////////////////////////////////////////////////////
     // Property Accessors
     // /////////////////////////////////////////////////////////////////
@@ -409,5 +448,7 @@
 			Thread.sleep(500);
 		}
 	}
-   
+
+
+
 }
\ No newline at end of file

Copied: activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerAware.java
(from r807584, activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/legacy/broker/BrokerServiceAware.java)
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerAware.java?p2=activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerAware.java&p1=activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/legacy/broker/BrokerServiceAware.java&r1=807584&r2=807670&rev=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/legacy/broker/BrokerServiceAware.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerAware.java
Tue Aug 25 15:32:48 2009
@@ -14,12 +14,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.activemq.legacy.broker;
+package org.apache.activemq.apollo.broker;
 
 /**
- * @deprecated The entire 'org.apache.activemq.legacy' package will hopefully go away soon.
+ * Marker interface for objects which would like to get injected with the
+ * broker instance.
  */
-@Deprecated
-public interface BrokerServiceAware {
+public interface BrokerAware {
 
-}
+    /**
+     *
+     * @param broker the broker that the object is being associated with.
+     */
+    public void setBroker(Broker broker);
+
+}
\ No newline at end of file

Modified: activemq/sandbox/activemq-flow/activemq-broker/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-broker/src/test/resources/log4j.properties?rev=807670&r1=807669&r2=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-broker/src/test/resources/log4j.properties (original)
+++ activemq/sandbox/activemq-flow/activemq-broker/src/test/resources/log4j.properties Tue
Aug 25 15:32:48 2009
@@ -20,8 +20,6 @@
 #
 log4j.rootLogger=INFO, out, stdout
 
-log4j.logger.org.apache.activemq.spring=WARN
-
 # CONSOLE appender not used by default
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

Modified: activemq/sandbox/activemq-flow/activemq-client/pom.xml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-client/pom.xml?rev=807670&r1=807669&r2=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-client/pom.xml (original)
+++ activemq/sandbox/activemq-flow/activemq-client/pom.xml Tue Aug 25 15:32:48 2009
@@ -48,6 +48,11 @@
 
     <!-- Testing Dependencies -->    
     <dependency>
+      <groupId>org.apache.activemq</groupId>
+      <artifactId>activemq-jaxb</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <scope>test</scope>

Modified: activemq/sandbox/activemq-flow/activemq-jaxb/pom.xml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-jaxb/pom.xml?rev=807670&r1=807669&r2=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-jaxb/pom.xml (original)
+++ activemq/sandbox/activemq-flow/activemq-jaxb/pom.xml Tue Aug 25 15:32:48 2009
@@ -31,19 +31,6 @@
 
   <name>ActiveMQ :: JAXB</name>
   
-  <repositories>
-    <repository>
-      <id>maven2-repository.dev.java.net</id>
-      <name>Java.net Maven  Repository </name>
-      <url>http://download.java.net/maven/2</url>
-    </repository>
-    <!--<repository>-->
-      <!--<id>codehaus</id>-->
-      <!--<name>Codehaus Maven 2 Repository</name>-->
-      <!--<url>http://repository.codehaus.org/</url>-->
-    <!--</repository>-->
-  </repositories>
-    
   <pluginRepositories>
   	<!-- For the schemagen plugin -->
     <pluginRepository>
@@ -54,6 +41,11 @@
         <enabled>true</enabled>
       </releases>
     </pluginRepository>
+    <pluginRepository>
+      <id>maven2-repository.dev.java.net</id>
+      <name>Java.net Maven  Repository </name>
+      <url>http://download.java.net/maven/2</url>
+    </pluginRepository>
   </pluginRepositories>
   
   <dependencies>

Propchange: activemq/sandbox/activemq-flow/activemq-jaxb/src/main/resources/persistent-activemq.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/sandbox/activemq-flow/activemq-openwire/pom.xml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/pom.xml?rev=807670&r1=807669&r2=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/pom.xml (original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/pom.xml Tue Aug 25 15:32:48 2009
@@ -67,7 +67,7 @@
     </dependency>
     <dependency>
       <groupId>org.apache.activemq</groupId>
-      <artifactId>activemq-kaha</artifactId>
+      <artifactId>activemq-jaxb</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>

Modified: activemq/sandbox/activemq-flow/activemq-spring/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-spring/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java?rev=807670&r1=807669&r2=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-spring/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-spring/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java
Tue Aug 25 15:32:48 2009
@@ -20,9 +20,6 @@
 import java.net.URI;
 
 import org.apache.activemq.legacy.broker.BrokerService;
-import org.apache.activemq.legacy.xbean.XBeanBrokerService;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.xbean.spring.context.ResourceXmlApplicationContext;
 import org.apache.xbean.spring.context.impl.URIEditor;
 import org.springframework.beans.BeansException;

Modified: activemq/sandbox/activemq-flow/activemq-stomp/pom.xml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-stomp/pom.xml?rev=807670&r1=807669&r2=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-stomp/pom.xml (original)
+++ activemq/sandbox/activemq-flow/activemq-stomp/pom.xml Tue Aug 25 15:32:48 2009
@@ -32,17 +32,14 @@
   <name>ActiveMQ :: Stomp</name>
 
   <dependencies>
-    
+
+    <!-- We should try to remove this depdency -->
     <dependency>
       <groupId>org.apache.activemq</groupId>
       <artifactId>activemq-openwire</artifactId>
     </dependency>
 
     <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-context</artifactId>
-    </dependency>    
-    <dependency>
       <groupId>com.thoughtworks.xstream</groupId>
       <artifactId>xstream</artifactId>
     </dependency>        
@@ -51,16 +48,10 @@
     <dependency>
       <groupId>org.apache.activemq</groupId>
       <artifactId>activemq-broker</artifactId>
-      <version>${activemq-version}</version>
       <type>test-jar</type>
       <scope>test</scope>
     </dependency>
     <dependency>
-    	<groupId>org.apache.activemq</groupId>
-    	<artifactId>activemq-kaha</artifactId>
-    	<scope>test</scope>
-    </dependency>
-    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <scope>test</scope>

Modified: activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/JmsFrameTranslator.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/JmsFrameTranslator.java?rev=807670&r1=807669&r2=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/JmsFrameTranslator.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/JmsFrameTranslator.java
Tue Aug 25 15:32:48 2009
@@ -28,9 +28,8 @@
 import org.apache.activemq.command.ActiveMQMapMessage;
 import org.apache.activemq.command.ActiveMQMessage;
 import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.springframework.beans.BeansException;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
+import org.apache.activemq.apollo.broker.BrokerAware;
+import org.apache.activemq.apollo.broker.Broker;
 
 import com.thoughtworks.xstream.XStream;
 import com.thoughtworks.xstream.io.HierarchicalStreamReader;
@@ -46,12 +45,12 @@
  * @author <a href="mailto:dejan@nighttale.net">Dejan Bosanac</a>
  */
 public class JmsFrameTranslator extends LegacyFrameTranslator implements
-		ApplicationContextAware {
+        BrokerAware {
 
 	XStream xStream = null;
-	ApplicationContext applicationContext;
+	Broker broker;
 
-	public ActiveMQMessage convertFrame(ProtocolConverter converter,
+    public ActiveMQMessage convertFrame(ProtocolConverter converter,
 			StompFrame command) throws JMSException, ProtocolException {
 		Map headers = command.getHeaders();
 		ActiveMQMessage msg;
@@ -177,12 +176,11 @@
 	// -------------------------------------------------------------------------
 	protected XStream createXStream() {
 		XStream xstream = null;
-		if (applicationContext != null) {
-			String[] names = applicationContext
-					.getBeanNamesForType(XStream.class);
+		if (broker != null) {
+			String[] names = broker.getBeanNamesForType(XStream.class);
 			for (int i = 0; i < names.length; i++) {
 				String name = names[i];
-				xstream = (XStream) applicationContext.getBean(name);
+				xstream = (XStream) broker.getBean(name);
 				if (xstream != null) {
 					break;
 				}
@@ -196,9 +194,7 @@
 
 	}
 
-	public void setApplicationContext(ApplicationContext applicationContext)
-			throws BeansException {
-		this.applicationContext = applicationContext;
-	}
-
+    public void setBroker(Broker broker) {
+        this.broker = broker;
+    }
 }

Modified: activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java?rev=807670&r1=807669&r2=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java
Tue Aug 25 15:32:48 2009
@@ -58,8 +58,8 @@
 import org.apache.activemq.util.IntrospectionSupport;
 import org.apache.activemq.util.LongSequenceGenerator;
 import org.apache.activemq.util.buffer.ByteArrayOutputStream;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
+import org.apache.activemq.apollo.broker.Broker;
+import org.apache.activemq.apollo.broker.BrokerAware;
 
 /**
  * @author <a href="http://hiramchirino.com">chirino</a>
@@ -89,12 +89,12 @@
     private final AtomicBoolean connected = new AtomicBoolean(false);
     private final FrameTranslator frameTranslator;
     private final FactoryFinder FRAME_TRANSLATOR_FINDER = new FactoryFinder("META-INF/services/org/apache/activemq/transport/frametranslator/");
-    private final ApplicationContext applicationContext;
+    private final Broker broker;
 
-    public ProtocolConverter(StompTransportFilter stompTransportFilter, FrameTranslator translator,
ApplicationContext applicationContext) {
+    public ProtocolConverter(StompTransportFilter stompTransportFilter, FrameTranslator translator,
Broker broker) {
         this.transportFilter = stompTransportFilter;
         this.frameTranslator = translator;
-        this.applicationContext = applicationContext;
+        this.broker = broker;
     }
 
     protected int generateCommandId() {
@@ -145,8 +145,8 @@
 			if (header != null) {
 				translator = (FrameTranslator) FRAME_TRANSLATOR_FINDER
 						.newInstance(header);
-				if (translator instanceof ApplicationContextAware) {
-					((ApplicationContextAware)translator).setApplicationContext(applicationContext);
+				if (translator instanceof BrokerAware) {
+					((BrokerAware)translator).setBroker(broker);
 				}
 			}
 		} catch (Exception ignore) {

Modified: activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompSslTransportFactory.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompSslTransportFactory.java?rev=807670&r1=807669&r2=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompSslTransportFactory.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompSslTransportFactory.java
Tue Aug 25 15:32:48 2009
@@ -18,38 +18,32 @@
 
 import java.util.Map;
 
-import org.apache.activemq.legacy.broker.BrokerService;
-import org.apache.activemq.legacy.broker.BrokerServiceAware;
-import org.apache.activemq.legacy.xbean.XBeanBrokerService;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.tcp.SslTransportFactory;
 import org.apache.activemq.util.IntrospectionSupport;
 import org.apache.activemq.wireformat.WireFormat;
-import org.springframework.context.ApplicationContext;
+import org.apache.activemq.apollo.broker.BrokerAware;
+import org.apache.activemq.apollo.broker.Broker;
 
 /**
- * A <a href="http://stomp.codehaus.org/">STOMP</a> over SSL transport factory
+ * A <a href="http://activemq.apache.org/stomp/">STOMP</a> over SSL transport
factory
  * 
  * @version $Revision: 645574 $
  */
-public class StompSslTransportFactory extends SslTransportFactory implements BrokerServiceAware
{
-
-    private ApplicationContext applicationContext = null;
+public class StompSslTransportFactory extends SslTransportFactory implements BrokerAware
{
+    private Broker broker;
 
     protected String getDefaultWireFormatType() {
         return "stomp";
     }
 
     public Transport compositeConfigure(Transport transport, WireFormat format, Map options)
{
-        transport = new StompTransportFilter(transport, new LegacyFrameTranslator(), applicationContext);
+        transport = new StompTransportFilter(transport, new LegacyFrameTranslator(), broker);
         IntrospectionSupport.setProperties(transport, options);
         return super.compositeConfigure(transport, format, options);
     }
 
-    public void setBrokerService(BrokerService brokerService) {
-        if (brokerService instanceof XBeanBrokerService) {
-            this.applicationContext = ((XBeanBrokerService)brokerService).getApplicationContext();
-        }
+    public void setBroker(Broker broker) {
+        this.broker = broker;
     }
-
 }

Modified: activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompTransportFactory.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompTransportFactory.java?rev=807670&r1=807669&r2=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompTransportFactory.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompTransportFactory.java
Tue Aug 25 15:32:48 2009
@@ -18,30 +18,28 @@
 
 import java.util.Map;
 
-import org.apache.activemq.legacy.broker.BrokerService;
-import org.apache.activemq.legacy.broker.BrokerServiceAware;
-import org.apache.activemq.legacy.xbean.XBeanBrokerService;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.tcp.TcpTransportFactory;
 import org.apache.activemq.util.IntrospectionSupport;
 import org.apache.activemq.wireformat.WireFormat;
-import org.springframework.context.ApplicationContext;
+import org.apache.activemq.apollo.broker.BrokerAware;
+import org.apache.activemq.apollo.broker.Broker;
 
 /**
- * A <a href="http://stomp.codehaus.org/">STOMP</a> transport factory
+ * A <a href="http://activemq.apache.org/stomp/">STOMP</a> transport factory
  * 
  * @version $Revision: 1.1.1.1 $
  */
-public class StompTransportFactory extends TcpTransportFactory implements BrokerServiceAware
{
+public class StompTransportFactory extends TcpTransportFactory implements BrokerAware {
+
+    private Broker broker;
 
-	private ApplicationContext applicationContext = null;
-	
     protected String getDefaultWireFormatType() {
         return "stomp";
     }
 
     public Transport compositeConfigure(Transport transport, WireFormat format, Map options)
{
-        transport = new StompTransportFilter(transport, new LegacyFrameTranslator(), applicationContext);
+        transport = new StompTransportFilter(transport, new LegacyFrameTranslator(), broker);
         IntrospectionSupport.setProperties(transport, options);
         return super.compositeConfigure(transport, format, options);
     }
@@ -52,9 +50,7 @@
         return false;
     }
 
-	public void setBrokerService(BrokerService brokerService) {
-		if (brokerService instanceof XBeanBrokerService) {
-			this.applicationContext = ((XBeanBrokerService)brokerService).getApplicationContext();
-		}
-	}
+    public void setBroker(Broker broker) {
+        this.broker = broker;
+    }
 }

Modified: activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java?rev=807670&r1=807669&r2=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java
Tue Aug 25 15:32:48 2009
@@ -25,9 +25,9 @@
 import org.apache.activemq.transport.TransportFilter;
 import org.apache.activemq.transport.TransportListener;
 import org.apache.activemq.util.IOExceptionSupport;
+import org.apache.activemq.apollo.broker.Broker;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.springframework.context.ApplicationContext;
 
 /**
  * The StompTransportFilter normally sits on top of a TcpTransport that has been
@@ -44,10 +44,10 @@
 
     private boolean trace;
 
-    public StompTransportFilter(Transport next, FrameTranslator translator, ApplicationContext
applicationContext) {
+    public StompTransportFilter(Transport next, FrameTranslator translator, Broker broker)
{
         super(next);
         this.frameTranslator = translator;
-        this.protocolConverter = new ProtocolConverter(this, translator, applicationContext);
+        this.protocolConverter = new ProtocolConverter(this, translator, broker);
     }
 
     public void oneway(Object o) throws IOException {

Modified: activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompWireFormat.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompWireFormat.java?rev=807670&r1=807669&r2=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompWireFormat.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompWireFormat.java
Tue Aug 25 15:32:48 2009
@@ -35,7 +35,7 @@
 
 /**
  * Implements marshalling and unmarsalling the <a
- * href="http://stomp.codehaus.org/">Stomp</a> protocol.
+ * href="http://activemq.apache.org/stomp/">Stomp</a> protocol.
  */
 public class StompWireFormat implements WireFormat {
 

Modified: activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompWireFormatFactory.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompWireFormatFactory.java?rev=807670&r1=807669&r2=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompWireFormatFactory.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompWireFormatFactory.java
Tue Aug 25 15:32:48 2009
@@ -21,7 +21,7 @@
 import org.apache.activemq.wireformat.WireFormatFactory;
 
 /**
- * Creates WireFormat objects that marshalls the <a href="http://stomp.codehaus.org/">Stomp</a>
protocol.
+ * Creates WireFormat objects that marshalls the <a href="http://activemq.apache.org/stomp/">Stomp</a>
protocol.
  */
 public class StompWireFormatFactory implements WireFormatFactory {
     public WireFormat createWireFormat() {

Modified: activemq/sandbox/activemq-flow/pom.xml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/pom.xml?rev=807670&r1=807669&r2=807670&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/pom.xml (original)
+++ activemq/sandbox/activemq-flow/pom.xml Tue Aug 25 15:32:48 2009
@@ -214,6 +214,13 @@
       </dependency>
       <dependency>
         <groupId>org.apache.activemq</groupId>
+        <artifactId>activemq-broker</artifactId>
+        <version>${activemq-version}</version>
+        <type>test-jar</type>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.activemq</groupId>
         <artifactId>activemq-dispatcher</artifactId>
         <version>${activemq-version}</version>
       </dependency>



Mime
View raw message