OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | fractal-commits List | July 2008 Index

<--  Date Index  --> <--  Thread Index  -->

[fractal-commits] [8327] trunk/fractal-bf/examples/fcexplorer: upgrade BF-FcExplorer example to 0.4-SNAPSHOT.


Title: [8327] trunk/fractal-bf/examples/fcexplorer: upgrade BF-FcExplorer example to 0.4-SNAPSHOT.
Revision
8327
Author
ervalerio
Date
2008-07-27 10:05:51 +0200 (Sun, 27 Jul 2008)

Log Message

upgrade BF-FcExplorer example to 0.4-SNAPSHOT.
use WS plugin instead of TCP;

Modified Paths

Added Paths

Diff

Modified: trunk/fractal-bf/examples/fcexplorer/.classpath (8326 => 8327)


--- trunk/fractal-bf/examples/fcexplorer/.classpath	2008-07-27 07:24:52 UTC (rev 8326)
+++ trunk/fractal-bf/examples/fcexplorer/.classpath	2008-07-27 08:05:51 UTC (rev 8327)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src/main/java"/>
-	<classpathentry excluding="**" kind="src" output="src/main/resources" path="src/main/resources"/>
+	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
 	<classpathentry kind="output" path="target/classes"/>

Added: trunk/fractal-bf/examples/fcexplorer/.settings/org.eclipse.jdt.core.prefs (0 => 8327)


--- trunk/fractal-bf/examples/fcexplorer/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ trunk/fractal-bf/examples/fcexplorer/.settings/org.eclipse.jdt.core.prefs	2008-07-27 08:05:51 UTC (rev 8327)
@@ -0,0 +1,5 @@
+#Sun Jul 27 09:31:03 CEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.source=1.5

Added: trunk/fractal-bf/examples/fcexplorer/.settings/org.maven.ide.eclipse.prefs (0 => 8327)


--- trunk/fractal-bf/examples/fcexplorer/.settings/org.maven.ide.eclipse.prefs	                        (rev 0)
+++ trunk/fractal-bf/examples/fcexplorer/.settings/org.maven.ide.eclipse.prefs	2008-07-27 08:05:51 UTC (rev 8327)
@@ -0,0 +1,8 @@
+#Sun Jul 27 09:26:24 CEST 2008
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+version=1

Modified: trunk/fractal-bf/examples/fcexplorer/pom.xml (8326 => 8327)


--- trunk/fractal-bf/examples/fcexplorer/pom.xml	2008-07-27 07:24:52 UTC (rev 8326)
+++ trunk/fractal-bf/examples/fcexplorer/pom.xml	2008-07-27 08:05:51 UTC (rev 8327)
@@ -1,40 +1,29 @@
 <?xml version="1.0"?>
-<!-- 
-	* This library is free software; you can redistribute it and/or
-	* modify it under the terms of the GNU Lesser General Public
-	* License as published by the Free Software Foundation; either
-	* version 2 of the License, or (at your option) any later version.
-	*
-	* This library is distributed in the hope that it will be useful,
-	* but WITHOUT ANY WARRANTY; without even the implied warranty of
-	* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-	* Lesser General Public License for more details.
-	*
-	* You should have received a copy of the GNU Lesser General Public
-	* License along with this library; if not, write to the Free Software
-	* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	<!--
+		* This library is free software; you can redistribute it and/or *
+		modify it under the terms of the GNU Lesser General Public * License
+		as published by the Free Software Foundation; either * version 2 of
+		the License, or (at your option) any later version. * * This library
+		is distributed in the hope that it will be useful, * but WITHOUT ANY
+		WARRANTY; without even the implied warranty of * MERCHANTABILITY or
+		FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public
+		License for more details. * * You should have received a copy of the
+		GNU Lesser General Public * License along with this library; if not,
+		write to the Free Software * Foundation, Inc., 59 Temple Place, Suite
+		330, Boston, MA 02111-1307 USA
+	-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
 	<modelVersion>4.0.0</modelVersion>
-
 	<parent>
 		<groupId>org.objectweb.fractal.bf.examples</groupId>
 		<artifactId>fractal-bf-examples-parent</artifactId>
-		<version>0.3-SNAPSHOT</version>
+		<version>0.4-SNAPSHOT</version>
 	</parent>
-
 	<artifactId>fractal-bf-examples-fcexplorer</artifactId>
-
-	<name>Fractal-BF: Fractalc Explorer example</name>
-
-	<description>
-		Fractal Binding Factory with Fractal Explorer
+	<name>Fractal-BF: Fractal Explorer example</name>
+	<description> Fractal Binding Factory with Fractal Explorer 
 	</description>
-
-
 	<dependencies>
 		<dependency>
 			<groupId>org.objectweb.fractal.bf</groupId>
@@ -52,21 +41,32 @@
 			<version>${project.version}</version>
 		</dependency>
 		<dependency>
-			<groupId>
-				org.objectweb.fractal.fractalexplorer.examples
-			</groupId>
+			<groupId> org.objectweb.fractal.fractalexplorer.examples</groupId>
 			<artifactId>helloworld</artifactId>
 			<version>1.1.3-SNAPSHOT</version>
+			<!--
+				need to exclude xerces because version 2.4.0 is uncompatible with
+				cxf
+			-->
+			<exclusions>
+				<exclusion>
+					<artifactId>xercesImpl</artifactId>
+					<groupId>xerces</groupId>
+				</exclusion>
+			</exclusions>
 		</dependency>
+		<!-- importing xerces compatible version with cxf -->
 		<dependency>
+			<artifactId>xercesImpl</artifactId>
+			<groupId>xerces</groupId>
+			<version>2.8.1</version>
+		</dependency>
+		<dependency>
 			<groupId>org.objectweb.fractal.bf.examples</groupId>
 			<artifactId>fractal-bf-examples-helloworld</artifactId>
 			<version>${project.version}</version>
 		</dependency>
 	</dependencies>
-
-
-
 	<build>
 		<plugins>
 			<!-- Java 1.5 -->
@@ -93,10 +93,7 @@
 				</executions>
 			</plugin>
 		</plugins>
-
-
 	</build>
-
 	<profiles>
 		<profile>
 			<id>run</id>
@@ -115,28 +112,22 @@
 							</execution>
 						</executions>
 						<dependencies>
-
 						</dependencies>
 						<configuration>
-							<executable>
-								${JAVA_HOME}/bin/java
-							</executable>
+							<executable> ${JAVA_HOME}/bin/java </executable>
 							<arguments>
-								<argument>
-									-Dfractal.provider=org.objectweb.fractal.julia.Julia
+								<argument> -Dfractal.provider=org.objectweb.fractal.julia.Julia 
 								</argument>
 <!--								<argument>-->
-<!--									-Djulia.config=julia-dream.cfg,julia-dream-activities.cfg-->
+								<!--
+									-Djulia.config=julia-dream.cfg,julia-dream-activities.cfg
+								-->
 <!--								</argument>-->
 								<argument>-cp</argument>
 								<classpath />
-								<argument>
-									org.objectweb.fractal.adl.Launcher
-								</argument>
+								<argument> org.objectweb.fractal.adl.Launcher </argument>
 								<argument>-fractal</argument>
-								<argument>
-									ClientServerExplorerBF
-								</argument>
+								<argument> ClientServerExplorerBF </argument>
 								<argument>r</argument>
 							</arguments>
 						</configuration>
@@ -145,5 +136,4 @@
 			</build>
 		</profile>
 	</profiles>
-
-</project>
+</project>
\ No newline at end of file

Modified: trunk/fractal-bf/examples/fcexplorer/src/main/java/ExporterBinder.java (8326 => 8327)


--- trunk/fractal-bf/examples/fcexplorer/src/main/java/ExporterBinder.java	2008-07-27 07:24:52 UTC (rev 8326)
+++ trunk/fractal-bf/examples/fcexplorer/src/main/java/ExporterBinder.java	2008-07-27 08:05:51 UTC (rev 8327)
@@ -30,9 +30,8 @@
 import org.objectweb.fractal.bf.BindingFactory;
 import org.objectweb.fractal.bf.BindingFactoryException;
 import org.objectweb.fractal.bf.BindingFactoryHelper;
-import org.objectweb.fractal.bf.ExportId;
 import org.objectweb.fractal.bf.ExportMode;
-import org.objectweb.fractal.bf.connectors.tcp.TcpConnectorConstants;
+import org.objectweb.fractal.bf.connectors.ws.WsConnectorConstants;
 import org.objectweb.fractal.fraclet.annotation.annotations.FractalComponent;
 import org.objectweb.fractal.fraclet.annotation.annotations.Service;
 import org.objectweb.fractal.util.Fractal;
@@ -43,79 +42,62 @@
  * @author pgarcia
  */
 @FractalComponent
-public class ExporterBinder implements BindClient, ExportServer
-{
+public class ExporterBinder implements BindClient, ExportServer {
 
-  @Service
-  Component      ref;
+	@Service
+	Component ref;
 
-  BindingFactory bindingFactory;
+	BindingFactory bindingFactory;
 
-  ExportId       tcpId;
+	public ExporterBinder() throws BindingFactoryException {
+		bindingFactory = BindingFactoryHelper.getBindingFactory();
+	}
 
-  public ExporterBinder() throws BindingFactoryException
-  {
-    bindingFactory = BindingFactoryHelper.getBindingFactory();
-  }
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see BindClient#bindClient()
+	 */
+	public void bindClient() {
+		try {
+			Map<String, String> bindHints = new HashMap<String, String>(); // could
 
-  /*
-   * (non-Javadoc)
-   * 
-   * @see BindClient#bindClient()
-   */
-  public void bindClient()
-  {
-    try
-    {
-      Map<String, String> bindHints = new HashMap<String, String>(); // could
-      // reuse
-      // exportHints
-      // here
-      bindHints.put(ExportMode.EXPORT_MODE, "tcp");
-      bindHints.put(TcpConnectorConstants.REMOTE_INTERFACE_NAME, "s");
-      bindHints.put(TcpConnectorConstants.LISTEN_PORT, "8081");
-      bindHints.put(TcpConnectorConstants.REPLY_TO, "8080");
-      bindingFactory.bind(getClientComponent(), "service", bindHints);
-    }
-    catch (Exception e)
-    {
-      System.err.println("An error occured while trying to bind");
-      e.printStackTrace();
-    }
-  }
+			bindHints.put(ExportMode.EXPORT_MODE, "ws");
+			bindHints.put(WsConnectorConstants.ADDRESS,
+					WsConnectorConstants.DEFAULT_ADDRESS);
 
-  private Component getClientComponent() throws Exception
-  {
-    Component root = (Component) Fractal.getSuperController(ref)
-        .getFcSuperComponents()[0];
-    return ContentControllerHelper.getSubComponentByName(root, "client");
-  }
+			bindingFactory.bind(getClientComponent(), "service", bindHints);
+		} catch (Exception e) {
+			System.err.println("An error occured while trying to bind");
+			e.printStackTrace();
+		}
+	}
 
-  /*
-   * (non-Javadoc)
-   * 
-   * @see ExportServer#export()
-   */
-  public void export()
-  {
-    try
-    {
-      Map<String, String> exportHints = new HashMap<String, String>();
-      exportHints.put(ExportMode.EXPORT_MODE, "tcp");
-      exportHints.put(TcpConnectorConstants.LISTEN_PORT, "8081");
-      tcpId = bindingFactory.export(getServerComponent(), "s", exportHints);
-    }
-    catch (Exception e)
-    {
-      System.err.println("An error occured while trying to export");
-      e.printStackTrace();
-    }
-  }
+	private Component getClientComponent() throws Exception {
+		Component root = Fractal.getSuperController(ref).getFcSuperComponents()[0];
+		return ContentControllerHelper.getSubComponentByName(root, "client");
+	}
 
-  private Component getServerComponent() throws Exception
-  {
-    Component root = (Component) Fractal.getSuperController(ref)
-        .getFcSuperComponents()[0];
-    return ContentControllerHelper.getSubComponentByName(root, "server");
-  }
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see ExportServer#export()
+	 */
+	public void export() {
+		try {
+			Map<String, String> exportHints = new HashMap<String, String>();
+			exportHints.put(ExportMode.EXPORT_MODE, "ws");
+			exportHints.put(WsConnectorConstants.ADDRESS,
+					WsConnectorConstants.DEFAULT_ADDRESS);
+			bindingFactory.export(getServerComponent(), "s", exportHints);
+		} catch (Exception e) {
+			System.err.println("An error occured while trying to export");
+			e.printStackTrace();
+		}
+	}
+
+	private Component getServerComponent() throws Exception {
+		Component root = Fractal.getSuperController(ref).getFcSuperComponents()[0];
+		return ContentControllerHelper.getSubComponentByName(root, "server");
+	}
 }


<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.