You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by ha...@apache.org on 2011/12/06 14:37:08 UTC

svn commit: r1210907 - in /labs/magnet: ./ core/src/main/resources/ core/src/main/resources/META-INF/spring/ core/src/test/java/org/apache/labs/magnet/core/ magnet/

Author: hadrian
Date: Tue Dec  6 13:37:07 2011
New Revision: 1210907

URL: http://svn.apache.org/viewvc?rev=1210907&view=rev
Log:
Support for web services. Minor fixes for style and warnings

Added:
    labs/magnet/core/src/main/resources/META-INF/spring/beans.xml
      - copied, changed from r1209711, labs/magnet/core/src/main/resources/META-INF/spring/camel-context.xml
Removed:
    labs/magnet/core/src/main/resources/META-INF/spring/camel-context.xml
Modified:
    labs/magnet/core/src/main/resources/log4j.properties
    labs/magnet/core/src/test/java/org/apache/labs/magnet/core/RouteTest.java
    labs/magnet/magnet/pom.xml
    labs/magnet/pom.xml

Copied: labs/magnet/core/src/main/resources/META-INF/spring/beans.xml (from r1209711, labs/magnet/core/src/main/resources/META-INF/spring/camel-context.xml)
URL: http://svn.apache.org/viewvc/labs/magnet/core/src/main/resources/META-INF/spring/beans.xml?p2=labs/magnet/core/src/main/resources/META-INF/spring/beans.xml&p1=labs/magnet/core/src/main/resources/META-INF/spring/camel-context.xml&r1=1209711&r2=1210907&rev=1210907&view=diff
==============================================================================
--- labs/magnet/core/src/main/resources/META-INF/spring/camel-context.xml (original)
+++ labs/magnet/core/src/main/resources/META-INF/spring/beans.xml Tue Dec  6 13:37:07 2011
@@ -33,6 +33,7 @@
        http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
 
   <import resource="classpath:META-INF/cxf/cxf.xml"/>
+  <import resource="classpath:META-INF/cxf/cxf-extension-camel.xml"/>
 
   <!-- Create an embedded ActiveMQ Broker 
   <bean id="jmsConnectionFactory" 
@@ -62,8 +63,14 @@
 
 
   <!-- Web Services -->
-  <!-- TODO: add here -->
+  <jaxrs:server address="camel://direct:shoutout" id="http-server">
+    <jaxrs:serviceBeans><ref bean="shoutout" /></jaxrs:serviceBeans>
+    <jaxrs:inInterceptors><bean class="org.apache.cxf.interceptor.LoggingOutInterceptor" /></jaxrs:inInterceptors>
+  </jaxrs:server>
 
+  <bean id="shoutout" class="org.apache.labs.magnet.service.ShoutoutService" />
+
+  <!-- Camel configuration -->
   <bean id="properties" class="org.apache.camel.component.properties.PropertiesComponent">
     <property name="location" value="classpath:core.properties"/>
   </bean>

Modified: labs/magnet/core/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewvc/labs/magnet/core/src/main/resources/log4j.properties?rev=1210907&r1=1210906&r2=1210907&view=diff
==============================================================================
--- labs/magnet/core/src/main/resources/log4j.properties (original)
+++ labs/magnet/core/src/main/resources/log4j.properties Tue Dec  6 13:37:07 2011
@@ -16,21 +16,19 @@
 ## ------------------------------------------------------------------------
 
 
-log4j.rootLogger=INFO, out
+log4j.rootLogger=WARN, out
 
-# uncomment the following line to turn on Camel debugging
+# conveniences settings for turning on debugging
+#log4j.logger.org.apache.labs.magnet=DEBUG
 #log4j.logger.org.apache.camel=DEBUG
-
-# uncomment the following line to turn on ActiveMQ debugging
 #log4j.logger.org.apache.activemq=DEBUG
 
-log4j.logger.org.springframework=WARN
-
 
 # CONSOLE appender not used by default
 log4j.appender.out=org.apache.log4j.ConsoleAppender
 log4j.appender.out.layout=org.apache.log4j.PatternLayout
 log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
 #log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+#log4j.appender.out.layout.ConversionPattern=%c %-5p %m%n
 
 log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
\ No newline at end of file

Modified: labs/magnet/core/src/test/java/org/apache/labs/magnet/core/RouteTest.java
URL: http://svn.apache.org/viewvc/labs/magnet/core/src/test/java/org/apache/labs/magnet/core/RouteTest.java?rev=1210907&r1=1210906&r2=1210907&view=diff
==============================================================================
--- labs/magnet/core/src/test/java/org/apache/labs/magnet/core/RouteTest.java (original)
+++ labs/magnet/core/src/test/java/org/apache/labs/magnet/core/RouteTest.java Tue Dec  6 13:37:07 2011
@@ -24,7 +24,7 @@ import org.springframework.context.suppo
 public class RouteTest extends CamelSpringTestSupport {
 
     protected ClassPathXmlApplicationContext createApplicationContext() {
-        return new ClassPathXmlApplicationContext("META-INF/spring/camel-context.xml");
+        return new ClassPathXmlApplicationContext("META-INF/spring/beans.xml");
     }
 
     @Test

Modified: labs/magnet/magnet/pom.xml
URL: http://svn.apache.org/viewvc/labs/magnet/magnet/pom.xml?rev=1210907&r1=1210906&r2=1210907&view=diff
==============================================================================
--- labs/magnet/magnet/pom.xml (original)
+++ labs/magnet/magnet/pom.xml Tue Dec  6 13:37:07 2011
@@ -125,88 +125,75 @@
   </dependencyManagement>
 
   <build>
-    <defaultGoal>install</defaultGoal>
-
     <pluginManagement>
       <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-compiler-plugin</artifactId>
-            <version>2.3.2</version>
-            <configuration>
-              <source>1.6</source>
-              <target>1.6</target>
-              <maxmem>256M</maxmem>
-              <encoding>UTF-8</encoding>
-            </configuration>
-          </plugin>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-resources-plugin</artifactId>
-            <version>2.4.3</version>
-            <configuration>
-              <encoding>UTF-8</encoding>
-            </configuration>
-          </plugin>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-clean-plugin</artifactId>
-            <version>2.4.1</version>
-          </plugin>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-install-plugin</artifactId>
-            <version>2.3.1</version>
-          </plugin>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-plugin-plugin</artifactId>
-            <version>2.6</version>
-          </plugin>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-source-plugin</artifactId>
-            <version>2.1.2</version>
-          </plugin>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-assembly-plugin</artifactId>
-            <version>2.2-beta-5</version>
-          </plugin>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-deploy-plugin</artifactId>
-            <version>2.5</version>
-          </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>2.4.3</version>
+          <configuration>
+            <encoding>UTF-8</encoding>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-clean-plugin</artifactId>
+          <version>2.4.1</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-install-plugin</artifactId>
+          <version>2.3.1</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-plugin-plugin</artifactId>
+          <version>2.6</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-source-plugin</artifactId>
+          <version>2.1.2</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-assembly-plugin</artifactId>
+          <version>2.2-beta-5</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-deploy-plugin</artifactId>
+          <version>2.5</version>
+        </plugin>
 
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-dependency-plugin</artifactId>
-            <version>2.1</version>
-          </plugin>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <version>2.6</version>
-          </plugin>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-report-plugin</artifactId>
-            <version>2.5</version>
-          </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-dependency-plugin</artifactId>
+          <version>2.1</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.6</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-report-plugin</artifactId>
+          <version>2.5</version>
+        </plugin>
 
-          <plugin>
-            <groupId>org.apache.felix</groupId>
-            <artifactId>maven-bundle-plugin</artifactId>
-            <version>2.3.5</version>
-          </plugin>
-          <plugin>
-            <groupId>org.apache.karaf.tooling</groupId>
-            <artifactId>features-maven-plugin</artifactId>
-            <version>${karaf.version}</version>
-          </plugin>
-        </plugins>
-      </pluginManagement>
+        <plugin>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>maven-bundle-plugin</artifactId>
+          <version>2.3.5</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.karaf.tooling</groupId>
+          <artifactId>features-maven-plugin</artifactId>
+          <version>${karaf.version}</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
   </build>
 
 </project>

Modified: labs/magnet/pom.xml
URL: http://svn.apache.org/viewvc/labs/magnet/pom.xml?rev=1210907&r1=1210906&r2=1210907&view=diff
==============================================================================
--- labs/magnet/pom.xml (original)
+++ labs/magnet/pom.xml Tue Dec  6 13:37:07 2011
@@ -69,5 +69,25 @@
     <module>emporium</module>
   </modules>
 
+  <build>
+    <defaultGoal>install</defaultGoal>
+
+    <pluginManagement>
+      <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-compiler-plugin</artifactId>
+            <version>2.3.2</version>
+            <configuration>
+              <source>1.6</source>
+              <target>1.6</target>
+              <maxmem>256M</maxmem>
+              <encoding>UTF-8</encoding>
+            </configuration>
+          </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
 </project>
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org