Author: lresende
Date: Tue Aug 12 16:50:52 2008
New Revision: 685380
URL: http://svn.apache.org/viewvc?rev=685380&view=rev
Log:
Refactoring the launcher to follow the same pattern used in other apps
(launch.launchxxxx launcher)
Added:
tuscany/java/sca/samples/feed-aggregator/src/main/java/launch/
tuscany/java/sca/samples/feed-aggregator/src/main/java/launch/LaunchFeedServer.java
(with props)
Removed:
tuscany/java/sca/samples/feed-aggregator/src/main/java/feed/SampleServer.java
Modified:
tuscany/java/sca/samples/feed-aggregator/README
tuscany/java/sca/samples/feed-aggregator/build.xml
Modified: tuscany/java/sca/samples/feed-aggregator/README
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/feed-aggregator/README?rev=685380&r1=685379&r2=685380&view=diff
==============================================================================
--- tuscany/java/sca/samples/feed-aggregator/README (original)
+++ tuscany/java/sca/samples/feed-aggregator/README Tue Aug 12 16:50:52 2008
@@ -13,11 +13,11 @@
OR if you don't have ant, on Windows do
-java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-feed-aggregator.jar
feed.SampleServer
+java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-feed-aggregator.jar
launch.LaunchFeedServer
and on *nix do
-java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-feed-aggregator.jar
feed.SampleServer
+java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-feed-aggregator.jar
launch.LaunchFeedServer
You should see the following output on the screen.
@@ -56,10 +56,11 @@
feed/
AggregatorImpl.java - implementation of the Feed
aggregator component
- SampleServer.java - starts the SCA Runtime and
- publishes the aggregated feeds
Sort.java - utilty
interface
SortImpl.java -
implementation of the Sort component
+ launch
+ LaunchFeedServer.java - starts the SCA Runtime and
+ publishes the aggregated feeds
resources/
FeedAggregator.composite - the SCA assembly for this sample
feed-aggregator.png - a pictorial representation of the
Modified: tuscany/java/sca/samples/feed-aggregator/build.xml
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/feed-aggregator/build.xml?rev=685380&r1=685379&r2=685380&view=diff
==============================================================================
--- tuscany/java/sca/samples/feed-aggregator/build.xml (original)
+++ tuscany/java/sca/samples/feed-aggregator/build.xml Tue Aug 12 16:50:52 2008
@@ -17,7 +17,7 @@
* under the License.
-->
<project name="feed-aggregator" default="compile">
- <property name="test.class" value="feed.SampleServer" />
+ <property name="test.class" value="launch.LaunchFeedServer" />
<property name="test.jar" value="sample-feed-aggregator.jar" />
<target name="init">
Added:
tuscany/java/sca/samples/feed-aggregator/src/main/java/launch/LaunchFeedServer.java
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/samples/feed-aggregator/src/main/java/launch/LaunchFeedServer.java?rev=685380&view=auto
==============================================================================
---
tuscany/java/sca/samples/feed-aggregator/src/main/java/launch/LaunchFeedServer.java
(added)
+++
tuscany/java/sca/samples/feed-aggregator/src/main/java/launch/LaunchFeedServer.java
Tue Aug 12 16:50:52 2008
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 launch;
+
+import java.io.IOException;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+public class LaunchFeedServer {
+ public static void main(String[] args) throws Exception {
+ SCADomain scaDomain =
SCADomain.newInstance("FeedAggregator.composite");
+
+ try {
+ System.out.println("Sample Feed server started (press enter to
shutdown)");
+ System.out.println();
+ System.out.println("To read the aggregated feeds, point your Web
browser to the following addresses:");
+ System.out.println("http://localhost:8083/atomAggregator");
+ System.out.println("http://localhost:8083/atomAggregator/atomsvc
(for the Atom service document)");
+ System.out.println("http://localhost:8083/rssAggregator");
+ System.out.println();
+ System.in.read();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+
+ scaDomain.close();
+ System.out.println("Sample Feed server stopped");
+ }
+}
Propchange:
tuscany/java/sca/samples/feed-aggregator/src/main/java/launch/LaunchFeedServer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/java/sca/samples/feed-aggregator/src/main/java/launch/LaunchFeedServer.java
------------------------------------------------------------------------------
svn:keywords = Rev Date