empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franci...@apache.org
Subject svn commit: r748331 - in /incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample: client/RunClient.java server/RunServer.java
Date Thu, 26 Feb 2009 22:07:10 GMT
Author: francisdb
Date: Thu Feb 26 22:07:09 2009
New Revision: 748331

URL: http://svn.apache.org/viewvc?rev=748331&view=rev
Log:
do swing related stuff on the swing EDT

Modified:
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/RunClient.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/RunServer.java

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/RunClient.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/RunClient.java?rev=748331&r1=748330&r2=748331&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/RunClient.java
(original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/RunClient.java
Thu Feb 26 22:07:09 2009
@@ -19,11 +19,19 @@
 
 package org.apache.empire.samples.cxf.wssample.client;
 
+import javax.swing.SwingUtilities;
+
 import org.apache.empire.samples.cxf.wssample.server.ServerControl;
 
 public class RunClient {
 
 	public static void main(String[] args) {
-		new ClientGUI(new EmployeeManagementProxy(ServerControl.serviceAddress));
+	    final EmployeeManagementProxy proxy = new EmployeeManagementProxy(ServerControl.serviceAddress);
+		SwingUtilities.invokeLater(new Runnable()
+        {
+			public void run() {
+				new ClientGUI(proxy);
+			}
+		});
 	}
 }

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/RunServer.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/RunServer.java?rev=748331&r1=748330&r2=748331&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/RunServer.java
(original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/RunServer.java
Thu Feb 26 22:07:09 2009
@@ -20,24 +20,35 @@
 package org.apache.empire.samples.cxf.wssample.server;
 
 import javax.swing.JOptionPane;
+import javax.swing.SwingUtilities;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-public class RunServer {
-	public static void main(String[] args)
+public class RunServer
+{
+    
+    public static void main(String[] args)
     {
-    	Log log = LogFactory.getLog(EmployeeManagementService.class);
-    	
+        Log log = LogFactory.getLog(EmployeeManagementService.class);
+
         try
         {
-            new ServerGUI(new ServerControl());
+            final ServerControl control = new ServerControl();
+            SwingUtilities.invokeLater(new Runnable()
+            {
+                public void run()
+                {
+                    new ServerGUI(control);
+                }
+            });
 
         } catch (Throwable t)
         {
             t.printStackTrace();
             log.error(t);
-            JOptionPane.showMessageDialog(null, "Please have a look at the logfile.", "A
Error occurred!", JOptionPane.ERROR_MESSAGE);
+            JOptionPane.showMessageDialog(null, "Please have a look at the logfile.", "A
Error occurred!",
+                                          JOptionPane.ERROR_MESSAGE);
         }
     }
 }



Mime
View raw message