Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2005-01-06 07:28:01 +0000
committerslewis2005-01-06 07:28:01 +0000
commit81408f00d216c6703f7dfd39dc793c1dc1eb8bc2 (patch)
treee222d29ba4a1614a2c7f780087d8a37c55243129
parente41396af7d351865de82be0ce23f267acd15745b (diff)
downloadorg.eclipse.ecf-81408f00d216c6703f7dfd39dc793c1dc1eb8bc2.tar.gz
org.eclipse.ecf-81408f00d216c6703f7dfd39dc793c1dc1eb8bc2.tar.xz
org.eclipse.ecf-81408f00d216c6703f7dfd39dc793c1dc1eb8bc2.zip
Added ClientApplication and ServerApplication in org.eclipse.ecf.provider plugin to allow standalone applications to be run separate from eclipse.
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/launchconfigs/ClientApplication.launch7
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/launchconfigs/ServerApplication.launch7
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/Trace.java17
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/app/ClientApplication.java136
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/app/ServerApplication.java61
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Client.java4
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Server.java2
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ContainerInstantiator.java11
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainer.java6
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ServerSOContainer.java4
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPServerSOContainer.java12
-rw-r--r--framework/bundles/org.eclipse.ecf/javadoc.xml2
-rw-r--r--framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/Trace.java15
13 files changed, 260 insertions, 24 deletions
diff --git a/framework/bundles/org.eclipse.ecf.provider/launchconfigs/ClientApplication.launch b/framework/bundles/org.eclipse.ecf.provider/launchconfigs/ClientApplication.launch
new file mode 100644
index 000000000..b636b7626
--- /dev/null
+++ b/framework/bundles/org.eclipse.ecf.provider/launchconfigs/ClientApplication.launch
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ecf.provider.app.ClientApplication"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ecf.provider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.eclipse.ecf.core.internal.Trace=true -Dorg.eclipse.ecf.provider.Trace=true"/>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+</launchConfiguration>
diff --git a/framework/bundles/org.eclipse.ecf.provider/launchconfigs/ServerApplication.launch b/framework/bundles/org.eclipse.ecf.provider/launchconfigs/ServerApplication.launch
new file mode 100644
index 000000000..42cc1b5d2
--- /dev/null
+++ b/framework/bundles/org.eclipse.ecf.provider/launchconfigs/ServerApplication.launch
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ecf.provider.app.ServerApplication"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ecf.provider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.eclipse.ecf.core.internal.Trace=true -Dorg.eclipse.ecf.provider.Trace=true"/>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+</launchConfiguration>
diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/Trace.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/Trace.java
index 203037355..2b73c6910 100644
--- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/Trace.java
+++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/Trace.java
@@ -29,8 +29,18 @@ public class Trace {
pluginName = ProviderPlugin.getDefault().getBundle()
.getSymbolicName();
} catch (Exception e) {
- // No eclipse Platform available
- System.out.println("Eclipse platform not available. "+Trace.class.getName());
+ try {
+ String val = System.getProperty("org.eclipse.ecf.provider.Trace");
+ if (val != null) {
+ setTrace(true);
+ isEclipse = false;
+ // No eclipse Platform available
+ System.out.println("WARNING: Eclipse platform not available for trace...using system.out for org.eclipse.ecf.provider");
+ } else {
+ System.out.println(Trace.class.getName()+": OFF");
+ }
+ } catch (Exception except) {
+ }
}
}
@@ -78,7 +88,4 @@ public class Trace {
name = tracePrefix+str;
}
- public static void setThreadDebugGroup(Object obj) {
- // Do nothing
- }
} \ No newline at end of file
diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/app/ClientApplication.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/app/ClientApplication.java
new file mode 100644
index 000000000..ea0c14867
--- /dev/null
+++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/app/ClientApplication.java
@@ -0,0 +1,136 @@
+package org.eclipse.ecf.provider.app;
+
+import java.util.Random;
+import org.eclipse.ecf.core.ISharedObjectContainer;
+import org.eclipse.ecf.core.SharedObjectContainerDescription;
+import org.eclipse.ecf.core.SharedObjectContainerFactory;
+import org.eclipse.ecf.core.SharedObjectDescription;
+import org.eclipse.ecf.core.comm.ConnectionDescription;
+import org.eclipse.ecf.core.comm.ConnectionFactory;
+import org.eclipse.ecf.core.identity.ID;
+import org.eclipse.ecf.core.identity.IDFactory;
+import org.eclipse.ecf.provider.generic.ContainerInstantiator;
+import org.eclipse.ecf.provider.generic.TCPServerSOContainer;
+
+/**
+ * An ECF client container implementation that runs as an application.
+ * <p>
+ * Usage: java org.eclipse.ecf.provider.app.ClientApplication &lt;serverid&gt
+ * <p>
+ * If &lt;serverid&gt; is omitted or "-" is specified,
+ * ecftcp://localhost:3282/server" is used.
+ *
+ */
+public class ClientApplication {
+
+ public static final int DEFAULT_WAITTIME = 40000;
+
+ public static final int DEFAULT_TIMEOUT = TCPServerSOContainer.DEFAULT_KEEPALIVE;
+
+ public static final String CONNECTION_NAME = org.eclipse.ecf.provider.comm.tcp.Client.class.getName();
+ public static final String CONNECTION_CLASS = org.eclipse.ecf.provider.comm.tcp.Client.Creator.class.getName();
+
+ public static final String CONTAINER_FACTORY_NAME = ContainerInstantiator.class.getName();
+ public static final String CONTAINER_FACTORY_CLASS = CONTAINER_FACTORY_NAME;
+
+ public static final String COMPOSENT_CONTAINER_NAME = ContainerInstantiator.class.getName();
+
+ // Number of clients to create
+ static int clientCount = 1;
+ // Array of client instances
+ ISharedObjectContainer [] sm = new ISharedObjectContainer[clientCount];
+ // ServerApplication name to connect to
+ String serverName = null;
+ // Class names of any sharedObjects to be created. If null, no sharedObjects created.
+ String [] sharedObjectClassNames = null;
+ // IDs of sharedObjects created
+ ID [] sharedObjects = null;
+
+ static SharedObjectContainerDescription contd = null;
+ static Random aRan = new Random();
+ public ClientApplication() {
+ super();
+ }
+
+ public void init(String [] args) throws Exception {
+ serverName = TCPServerSOContainer.getDefaultServerURL();
+ if (args.length > 0) {
+ if (!args[0].equals("-")) serverName = args[0];
+ }
+ if (args.length > 1) {
+ sharedObjectClassNames = new String[args.length - 1];
+ for (int i = 0; i < args.length - 1; i++) {
+ sharedObjectClassNames[i] = args[i + 1];
+ }
+ }
+ // Setup factory descriptions since Eclipse does not do this for us
+ ConnectionDescription cd = new ConnectionDescription(ClientApplication.class.getClassLoader(),CONNECTION_NAME,CONNECTION_CLASS,null);
+ ConnectionFactory.addDescription(cd);
+ contd = new SharedObjectContainerDescription(ClientApplication.class.getClassLoader(),CONTAINER_FACTORY_NAME,CONTAINER_FACTORY_CLASS,null);
+ SharedObjectContainerFactory.addDescription(contd);
+ for(int i=0; i < clientCount; i++) {
+ sm[i] = makeClient();
+ }
+ }
+
+ protected ISharedObjectContainer makeClient() throws Exception {
+ // Make identity instance for the new container
+ ID newContainerID = IDFactory.makeGUID();
+ ISharedObjectContainer result = SharedObjectContainerFactory.makeSharedObjectContainer(contd,null,new Object[] { newContainerID, new Integer(DEFAULT_TIMEOUT)});
+ return result;
+ }
+
+ public void joinGroup(ID server) throws Exception {
+ for(int i = 0; i < clientCount; i++) {
+ System.out.print("ClientApplication "+sm[i].getConfig().getID().getName()+" joining "+server.getName()+"...");
+ sm[i].joinGroup(server,null);
+ System.out.println("completed.");
+ }
+ }
+
+ public void leaveGroup() {
+ for(int i = 0; i < clientCount; i++) {
+ System.out.print("ClientApplication "+sm[i].getConfig().getID().getName()+" leaving...");
+ sm[i].leaveGroup();
+ System.out.println("completed.");
+ }
+ }
+
+ public void createStages() throws Exception {
+ if (sharedObjectClassNames != null) {
+ for(int j=0; j < clientCount; j++) {
+ ISharedObjectContainer scg = sm[j];
+ for(int i=0; i < sharedObjectClassNames.length; i++) {
+ System.out.println("Creating sharedObject: "+sharedObjectClassNames[i]+" for client "+scg.getConfig().getID().getName());
+ SharedObjectDescription sd = new SharedObjectDescription(IDFactory.makeStringID(String.valueOf(aRan.nextInt())),sharedObjectClassNames[i]);
+ scg.getSharedObjectManager().createSharedObject(sd,null);
+ System.out.println("Created sharedObject for client "+scg.getConfig().getID().getName());
+ }
+ }
+ }
+
+ }
+ public void removeStages() throws Exception {
+ if (sharedObjects == null) return;
+ for(int j=0; j < clientCount; j++) {
+ for(int i=0; i < sharedObjects.length; i++) {
+ System.out.println("Removing stage: "+sharedObjects[i].getName()+" for client "+sm[j].getConfig().getID().getName());
+ sm[j].getSharedObjectManager().removeSharedObject(sharedObjects[i]);
+ }
+ }
+ }
+ public static void main(String[] args) throws Exception {
+ ClientApplication st = new ClientApplication();
+ st.init(args);
+ // Get server id to join
+ ID serverID = IDFactory.makeStringID(st.serverName);
+ st.joinGroup(serverID);
+ st.createStages();
+ System.out.println("Waiting "+DEFAULT_WAITTIME+" ms...");
+ Thread.sleep(DEFAULT_WAITTIME);
+ st.removeStages();
+ st.leaveGroup();
+ System.out.println("Exiting.");
+ }
+
+}
diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/app/ServerApplication.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/app/ServerApplication.java
new file mode 100644
index 000000000..00de1ea57
--- /dev/null
+++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/app/ServerApplication.java
@@ -0,0 +1,61 @@
+package org.eclipse.ecf.provider.app;
+
+import org.eclipse.ecf.core.identity.ID;
+import org.eclipse.ecf.core.identity.IDFactory;
+import org.eclipse.ecf.provider.generic.SOContainerConfig;
+import org.eclipse.ecf.provider.generic.TCPServerSOContainer;
+import org.eclipse.ecf.provider.generic.TCPServerSOContainerGroup;
+
+/**
+ * An ECF server container implementation that runs as an application.
+ * <p>
+ * Usage: java org.eclipse.ecf.provider.app.ServerApplication &lt;serverid&gt
+ * <p>
+ * If &lt;serverid&gt; is omitted or "-" is specified,
+ * ecftcp://localhost:3282/server" is used. The &lt;serverid&gt; must correspond to URI syntax as
+ * defined by <a href="http://www.ietf.org/rfc/rfc2396.txt"><i>RFC&nbsp;2396: Uniform
+ * Resource Identifiers (URI): Generic Syntax</i></a>, amended by <a href="http://www.ietf.org/rfc/rfc2732.txt"><i>RFC&nbsp;2732:
+ * Format for Literal IPv6 Addresses in URLs</i></a>
+ *
+ */
+public class ServerApplication {
+ public static final int DEFAULT_KEEPALIVE = TCPServerSOContainer.DEFAULT_KEEPALIVE;
+ static TCPServerSOContainerGroup serverGroup = null;
+ static TCPServerSOContainer server = null;
+
+ public static void main(String args[]) throws Exception {
+ // Get server identity
+ String serverName = null;
+ if (args.length > 0) {
+ if (!args[0].equals("-"))
+ serverName = args[0];
+ }
+ if (serverName == null) {
+ serverName = TCPServerSOContainer.getDefaultServerURL();
+ }
+ java.net.URI anURL = new java.net.URI(serverName);
+ int port = anURL.getPort();
+ if (port == -1) {
+ port = TCPServerSOContainer.DEFAULT_PORT;
+ }
+ String name = anURL.getPath();
+ if (name == null) {
+ name = TCPServerSOContainer.DEFAULT_NAME;
+ }
+ // Setup server group
+ serverGroup = new TCPServerSOContainerGroup(anURL.getPort());
+ // Create identity for server
+ ID id = IDFactory.makeStringID(serverName);
+ // Create server config object with identity and default timeout
+ SOContainerConfig config = new SOContainerConfig(id);
+ // Make server instance
+ System.out.print("Creating ECF server container...");
+ server = new TCPServerSOContainer(config, serverGroup, name,
+ TCPServerSOContainer.DEFAULT_KEEPALIVE);
+ serverGroup.putOnTheAir();
+ System.out.println("success!");
+ System.out
+ .println("Waiting for client connections at '" + id.getName() + "'...");
+ System.out.println("<ctrl>-c to stop server");
+ }
+} \ No newline at end of file
diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Client.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Client.java
index 4d5483a2c..484c04fc0 100644
--- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Client.java
+++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Client.java
@@ -204,7 +204,7 @@ public final class Client implements ISynchAsynchConnection {
throws IOException {
debug("connect(" + remote + "," + data + "," + timeout + ")");
if (socket != null)
- throw new ConnectException("Client already connected");
+ throw new ConnectException("ClientApplication already connected");
URI anURI = null;
try {
anURI = remote.toURI();
@@ -348,7 +348,7 @@ public final class Client implements ISynchAsynchConnection {
}
// Before returning, actually remove remote objects
//handler.handleDisconnectEvent(new DisconnectConnectionEvent(
- //Client.this, null, queue));
+ //ClientApplication.this, null, queue));
}
private Thread getRcvThread() {
diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Server.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Server.java
index 865e61f32..02328107a 100644
--- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Server.java
+++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Server.java
@@ -68,7 +68,7 @@ public class Server extends ServerSocket {
debug.msg("Closing listener normally.");
}
}
- }, "Server(" + getLocalPort() + ")");
+ }, "ServerApplication(" + getLocalPort() + ")");
}
protected void handleAccept(final Socket aSocket) {
diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ContainerInstantiator.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ContainerInstantiator.java
index 90ef49f31..1a8307a2f 100644
--- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ContainerInstantiator.java
+++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ContainerInstantiator.java
@@ -28,10 +28,15 @@ public class ContainerInstantiator implements
try {
Boolean isClient = new Boolean(true);
ID id = null;
+ Integer keepAlive = new Integer(TCPServerSOContainer.DEFAULT_KEEPALIVE);
if (args != null) {
- if (args.length == 2) {
+ if (args.length == 3) {
isClient = (Boolean) args[0];
id = (ID) args[1];
+ keepAlive = (Integer) args[2];
+ } else if (args.length == 2) {
+ id = (ID) args[0];
+ keepAlive = (Integer) args[1];
} else if (args.length == 1) {
id = (ID) args[0];
}
@@ -40,9 +45,9 @@ public class ContainerInstantiator implements
}
ISharedObjectContainer result = null;
if (isClient.booleanValue()) {
- return new TCPClientSOContainer(new SOContainerConfig(id));
+ return new TCPClientSOContainer(new SOContainerConfig(id),keepAlive.intValue());
} else {
- return new TCPServerSOContainer(new SOContainerConfig(id));
+ return new TCPServerSOContainer(new SOContainerConfig(id),keepAlive.intValue());
}
} catch (Exception e) {
throw new SharedObjectContainerInstantiationException(
diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainer.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainer.java
index dd8e3fc4b..2e6671ddb 100644
--- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainer.java
+++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainer.java
@@ -392,7 +392,7 @@ public abstract class SOContainer implements ISharedObjectContainer {
/**
* @param sd
- * @return
+ * @return Object []
*/
public Object[] getArgsFromProperties(SharedObjectDescription sd) {
if (sd == null)
@@ -413,7 +413,7 @@ public abstract class SOContainer implements ISharedObjectContainer {
/**
* @param sd
- * @return
+ * @return String []
*/
public String[] getArgTypesFromProperties(SharedObjectDescription sd) {
if (sd == null)
@@ -445,7 +445,7 @@ public abstract class SOContainer implements ISharedObjectContainer {
/**
* @param sd
- * @return
+ * @return ClassLoader
*/
protected ClassLoader getClassLoaderForSharedObject(
SharedObjectDescription sd) {
diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ServerSOContainer.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ServerSOContainer.java
index 55dbaab13..ff5e88b8b 100644
--- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ServerSOContainer.java
+++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ServerSOContainer.java
@@ -100,13 +100,13 @@ public class ServerSOContainer extends SOContainer implements ISharedObjectConta
protected void handleViewChangeMessage(ContainerMessage mess)
throws IOException {
- // Server should never receive change messages
+ // ServerApplication should never receive change messages
}
public void joinGroup(ID group, Object data)
throws SharedObjectContainerJoinException {
SharedObjectContainerJoinException e = new SharedObjectContainerJoinException(
- "Server cannot join group " + group.getName());
+ "ServerApplication cannot join group " + group.getName());
throw e;
}
diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPServerSOContainer.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPServerSOContainer.java
index 539a9019a..7961bdd17 100644
--- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPServerSOContainer.java
+++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPServerSOContainer.java
@@ -26,8 +26,10 @@ public class TCPServerSOContainer extends ServerSOContainer implements
ConnectionRequestHandler {
public static final String DEFAULT_PROTOCOL = "ecftcp";
public static final int DEFAULT_PORT = 3282;
- public static final int DEFAULT_KEEPALIVE = 30000;
- public static final String DEFAULT_NAME = "server";
+ public static final int DEFAULT_KEEPALIVE = 10000;
+ public static final String DEFAULT_NAME = "/server";
+ public static final String DEFAULT_HOST = "localhost";
+
// Keep alive value
protected int keepAlive;
protected TCPServerSOContainerGroup group;
@@ -90,9 +92,11 @@ public class TCPServerSOContainer extends ServerSOContainer implements
public TCPServerSOContainer(ISharedObjectContainerConfig config)
throws IOException, URISyntaxException {
- this(config, null, DEFAULT_PORT);
+ this(config, null, DEFAULT_KEEPALIVE);
+ }
+ public TCPServerSOContainer(ISharedObjectContainerConfig config, int keepAlive) throws IOException, URISyntaxException {
+ this(config,null,keepAlive);
}
-
public Serializable checkConnect(Socket socket, String target,
Serializable data, ISynchAsynchConnection conn) {
return acceptNewClient(socket, target, data, conn);
diff --git a/framework/bundles/org.eclipse.ecf/javadoc.xml b/framework/bundles/org.eclipse.ecf/javadoc.xml
index 21037d423..c24eb3e7a 100644
--- a/framework/bundles/org.eclipse.ecf/javadoc.xml
+++ b/framework/bundles/org.eclipse.ecf/javadoc.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project default="javadoc">
<target name="javadoc">
- <javadoc destdir="../ecf website/org.eclipse.ecf.docs/api" access="protected" use="true" notree="false" nonavbar="false" noindex="false" splitindex="true" author="false" version="true" nodeprecatedlist="false" nodeprecated="false" packagenames="org.eclipse.ecf.core.identity.provider,org.eclipse.ecf.core.comm.provider,org.eclipse.ecf.core,org.eclipse.ecf.core.comm,org.eclipse.ecf.provider.generic.gmm,org.eclipse.ecf.core.events,org.eclipse.ecf.provider,org.eclipse.ecf.core.util,org.eclipse.ecf.core.identity,org.eclipse.ecf.core.provider,org.eclipse.ecf.provider.generic,org.eclipse.ecf.provider.comm.tcp,org.eclipse.ecf.provider.generic.events" sourcepath="src;../org.eclipse.ecf.provider/src" classpath="../org.eclipse.ecf.provider/bin;C:\301\eclipse\plugins\org.eclipse.osgi_3.0.1\osgi.jar;C:\301\eclipse\plugins\org.eclipse.core.runtime_3.0.1\runtime.jar;C:\301\eclipse\plugins\org.eclipse.osgi_3.0.1\defaultAdaptor.jar;C:\301\eclipse\plugins\org.eclipse.osgi_3.0.1\core.jar;bin;C:\301\eclipse\plugins\org.eclipse.osgi_3.0.1\eclipseAdaptor.jar;C:\301\eclipse\plugins\org.eclipse.osgi_3.0.1\resolver.jar;C:\301\eclipse\plugins\org.eclipse.osgi_3.0.1\console.jar" doctitle="Eclipse Communication Framework (ECF) 0.2.0">
+ <javadoc destdir="../ecf website/org.eclipse.ecf.docs/api" access="protected" use="true" notree="false" nonavbar="false" noindex="false" splitindex="true" author="false" version="true" nodeprecatedlist="false" nodeprecated="false" packagenames="org.eclipse.ecf.core.identity.provider,org.eclipse.ecf.core.comm.provider,org.eclipse.ecf.core,org.eclipse.ecf.core.comm,org.eclipse.ecf.provider.app,org.eclipse.ecf.provider.generic.gmm,org.eclipse.ecf.core.events,org.eclipse.ecf.provider,org.eclipse.ecf.core.util,org.eclipse.ecf.core.identity,org.eclipse.ecf.core.provider,org.eclipse.ecf.provider.generic,org.eclipse.ecf.provider.comm.tcp,org.eclipse.ecf.provider.generic.events" sourcepath="src;../org.eclipse.ecf.provider/src" classpath="../org.eclipse.ecf.provider/bin;C:\301\eclipse\plugins\org.eclipse.osgi_3.0.1\osgi.jar;C:\301\eclipse\plugins\org.eclipse.core.runtime_3.0.1\runtime.jar;C:\301\eclipse\plugins\org.eclipse.osgi_3.0.1\defaultAdaptor.jar;C:\301\eclipse\plugins\org.eclipse.osgi_3.0.1\core.jar;bin;C:\301\eclipse\plugins\org.eclipse.osgi_3.0.1\eclipseAdaptor.jar;C:\301\eclipse\plugins\org.eclipse.osgi_3.0.1\resolver.jar;C:\301\eclipse\plugins\org.eclipse.osgi_3.0.1\console.jar" doctitle="Eclipse Communication Framework (ECF) 0.2.0">
<link href="http://java.sun.com/j2se/1.4.2/docs/api"/>
</javadoc>
</target>
diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/Trace.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/Trace.java
index 39a9fdcc4..877f997eb 100644
--- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/Trace.java
+++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/Trace.java
@@ -29,11 +29,20 @@ public class Trace {
pluginName = ECFPlugin.getDefault().getBundle()
.getSymbolicName();
} catch (Exception e) {
- // No eclipse Platform available
- System.out.println("Eclipse platform not available. "+Trace.class.getName());
+ try {
+ String val = System.getProperty("org.eclipse.ecf.core.internal.Trace");
+ if (val != null) {
+ setTrace(true);
+ isEclipse = false;
+ // No eclipse Platform available
+ System.out.println("WARNING: Eclipse platform not available for trace...using system.out for org.eclipse.ecf");
+ } else {
+ System.out.println(Trace.class.getName()+": OFF");
+ }
+ } catch (Exception except) {
+ }
}
}
-
public static void setTrace(boolean on) {
ON = on;
}

Back to the top