empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franci...@apache.org
Subject svn commit: r749138 - in /incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample: client/ common/ server/
Date Sun, 01 Mar 2009 22:17:18 GMT
Author: francisdb
Date: Sun Mar  1 22:17:17 2009
New Revision: 749138

URL: http://svn.apache.org/viewvc?rev=749138&view=rev
Log:
cleaning up code warnings
faster startup of server gui

Modified:
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/ClientGUI.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/Department.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/RunServer.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/SampleConfig.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerControl.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerGUI.java

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/ClientGUI.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/ClientGUI.java?rev=749138&r1=749137&r2=749138&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/ClientGUI.java
(original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/ClientGUI.java
Sun Mar  1 22:17:17 2009
@@ -187,6 +187,8 @@
 
 	/**
 	 * This is the default constructor
+	 * 
+	 * @param prxy the proxy
 	 */
 	public ClientGUI(EmployeeManagementProxy prxy) {
 		super();
@@ -204,13 +206,13 @@
 	/**
 	 * This method initializes this
 	 * 
-	 * @return void
 	 */
 	private void initialize() {
 		this.setSize(529, 299);
 		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 		this.setContentPane(getJContentPane());
 		this.setTitle("Employee Management Client");
+		this.setLocationRelativeTo(null);
 	}
 
 	/**

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/Department.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/common/Department.java?rev=749138&r1=749137&r2=749138&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/Department.java
(original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/Department.java
Sun Mar  1 22:17:17 2009
@@ -73,7 +73,8 @@
 		return updateTimestamp;
 	}
 	
-	public String toString()
+	@Override
+    public String toString()
 	{
 		return name;
 	}

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=749138&r1=749137&r2=749138&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
Sun Mar  1 22:17:17 2009
@@ -28,21 +28,22 @@
 public class RunServer
 {
     
+    private static final Log log = LogFactory.getLog(RunServer.class);
+
     public static void main(String[] args)
     {
-        Log log = LogFactory.getLog(EmployeeManagementService.class);
-
         try
         {
             final ServerControl control = new ServerControl();
-            SwingUtilities.invokeLater(new Runnable()
+            SwingUtilities.invokeAndWait(new Runnable()
             {
                 public void run()
                 {
-                    new ServerGUI(control);
+                    ServerGUI gui = new ServerGUI(control);
+                    gui.setVisible(true);
                 }
             });
-
+            control.start();
         } catch (Throwable t)
         {
             t.printStackTrace();

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/SampleConfig.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/SampleConfig.java?rev=749138&r1=749137&r2=749138&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/SampleConfig.java
(original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/SampleConfig.java
Sun Mar  1 22:17:17 2009
@@ -36,6 +36,10 @@
 
 	/**
 	 * Initialize the configuration
+	 * 
+	 * @param filename the file
+	 * 
+	 * @return true on succes
 	 */
 	public boolean init(String filename) {
 		// Read the properties file

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerControl.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/ServerControl.java?rev=749138&r1=749137&r2=749138&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerControl.java
(original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerControl.java
Sun Mar  1 22:17:17 2009
@@ -40,18 +40,20 @@
 
 public class ServerControl
 {
-
+    private static final Log                   log            = LogFactory.getLog(EmployeeManagementService.class);
+    
+    public static final String                   serviceName    = "employeeManagement";
+    public static final String                   serviceAddress = "http://localhost:8081/"
+ serviceName;
+    
     private SampleDB                       db             = null;
     private Connection                     conn           = null;
     private SampleConfig                   config         = null;
     private DBDatabaseDriver               driver         = null;
-    protected static Log                   log            = LogFactory.getLog(EmployeeManagementService.class);
 
-    public static String                   serviceName    = "employeeManagement";
-    public static String                   serviceAddress = "http://localhost:8081/" + serviceName;
+
     private String                         configPath     = "config.xml";
     private org.apache.cxf.endpoint.Server endpoint       = null;
-    JaxWsServerFactoryBean svrFactory = null;
+    private JaxWsServerFactoryBean svrFactory = null;
 
     public ServerControl()
     {

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerGUI.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/ServerGUI.java?rev=749138&r1=749137&r2=749138&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerGUI.java
(original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerGUI.java
Sun Mar  1 22:17:17 2009
@@ -50,6 +50,7 @@
     
     /**
      * This is the default constructor
+     * @param sControl the server control
      */
     public ServerGUI(ServerControl sControl)
     {
@@ -57,8 +58,6 @@
         _sControl = sControl;
         initialize();
         initTextAreaLogger();
-        _sControl.start();
-        this.setVisible(true);
     }
     
     private void initTextAreaLogger()
@@ -85,16 +84,17 @@
     /**
      * This method initializes this
      * 
-     * @return void
      */
     private void initialize()
     {
-        this.setSize(495, 285);
         this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         this.setContentPane(getJContentPane());
         this.setTitle("Employee Management Server Control");
+        this.pack();
+        this.setLocationRelativeTo(null);
         this.addWindowListener(new java.awt.event.WindowAdapter() {   
-        	public void windowClosing(java.awt.event.WindowEvent e) {    
+        	@Override
+			public void windowClosing(java.awt.event.WindowEvent e) {    
         		_sControl.stop();
         	}
         });
@@ -111,7 +111,6 @@
         {
             jContentPane = new JPanel();
             jContentPane.setLayout(new BorderLayout());
-            jContentPane.setSize(new Dimension(505, 241));
             jContentPane.add(getPnlButtons(), BorderLayout.SOUTH);
             jContentPane.add(getScroller(), BorderLayout.CENTER);
         }
@@ -214,6 +213,7 @@
         if (scroller == null)
         {
             scroller = new JScrollPane();
+            scroller.setPreferredSize(new Dimension(500, 250));
             scroller.setViewportView(getJEditorPane());
         }
         return scroller;



Mime
View raw message