incubator-kalumet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject svn commit: r1212103 [3/3] - in /incubator/kalumet/trunk: agent/src/main/java/org/apache/kalumet/agent/updater/ common/src/main/java/org/apache/kalumet/ common/src/main/java/org/apache/kalumet/model/ common/src/test/java/org/apache/kalumet/ console/src...
Date Thu, 08 Dec 2011 20:39:00 GMT
Modified: incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/ApplicationServerWindow.java
URL: http://svn.apache.org/viewvc/incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/ApplicationServerWindow.java?rev=1212103&r1=1212102&r2=1212103&view=diff
==============================================================================
--- incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/ApplicationServerWindow.java
(original)
+++ incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/ApplicationServerWindow.java
Thu Dec  8 20:38:58 2011
@@ -44,6 +44,11 @@ public class ApplicationServerWindow ext
     private ApplicationServerGeneralPane generalPane;
     private ApplicationServerCachesPane cachesPane;
 
+    public final static String JBOSS4_CONTROLLER_CLASSNAME = "org.apache.kalumet.controller.jboss.JBoss4Controller";
+    public final static String JBOSS6_CONTROLLER_CLASSNAME = "org.apache.kalumet.controller.jboss.JBoss6Controller";
+    public final static String WEBLOGIC_CONTROLLER_CLASSNAME = "org.apache.kalumet.controller.weblogic.WeblogicController";
+    public final static String WEBSPHERE_CONTROLLER_CLASSNAME = "org.apache.kalumet.controller.websphere.WebsphereController";
+
     // status thread
     class StatusThread extends Thread {
 
@@ -239,13 +244,16 @@ public class ApplicationServerWindow ext
                 server.setBlocker(false);
             }
             if (typeFieldIndex == 0) {
-                server.setClassname("org.apache.kalumet.controller.jboss.JBossController");
+                server.setClassname(ApplicationServerWindow.JBOSS4_CONTROLLER_CLASSNAME);
             }
             if (typeFieldIndex == 1) {
-                server.setClassname("org.apache.kalumet.controller.weblogic.WeblogicController");
+                server.setClassname(ApplicationServerWindow.JBOSS6_CONTROLLER_CLASSNAME);
             }
             if (typeFieldIndex == 2) {
-                server.setClassname("org.apache.kalumet.controller.websphere.WebsphereController");
+                server.setClassname(ApplicationServerWindow.WEBLOGIC_CONTROLLER_CLASSNAME);
+            }
+            if (typeFieldIndex == 3) {
+                server.setClassname(ApplicationServerWindow.WEBSPHERE_CONTROLLER_CLASSNAME);
             }
             server.setJmxurl(jmxFieldValue);
             server.setAdminuser(adminUserFieldValue);

Modified: incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/ApplicationServersPane.java
URL: http://svn.apache.org/viewvc/incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/ApplicationServersPane.java?rev=1212103&r1=1212102&r2=1212103&view=diff
==============================================================================
--- incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/ApplicationServersPane.java
(original)
+++ incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/ApplicationServersPane.java
Thu Dec  8 20:38:58 2011
@@ -660,13 +660,16 @@ public class ApplicationServersPane exte
             serversGrid.add(serverName);
             // server type
             Label serverType = new Label(Messages.getString("unknown"));
-            if (server.getClassname().equals("org.apache.kalumet.controller.jboss.JBossController"))
{
+            if (server.getClassname().equals(ApplicationServerWindow.JBOSS4_CONTROLLER_CLASSNAME))
{
                 serverType = new Label(Messages.getString("jboss4"));
             }
-            if (server.getClassname().equals("org.apache.kalumet.controller.weblogic.WeblogicController"))
{
+            if (server.getClassname().equals(ApplicationServerWindow.JBOSS6_CONTROLLER_CLASSNAME))
{
+                serverType = new Label(Messages.getString("jboss6"));
+            }
+            if (server.getClassname().equals(ApplicationServerWindow.WEBLOGIC_CONTROLLER_CLASSNAME))
{
                 serverType = new Label(Messages.getString("weblogic8"));
             }
-            if (server.getClassname().equals("org.apache.kalumet.controller.websphere.WebsphereController"))
{
+            if (server.getClassname().equals(ApplicationServerWindow.WEBSPHERE_CONTROLLER_CLASSNAME))
{
                 serverType = new Label(Messages.getString("websphere5"));
             }
             serverType.setStyleName("default");

Modified: incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/ApplicationsPane.java
URL: http://svn.apache.org/viewvc/incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/ApplicationsPane.java?rev=1212103&r1=1212102&r2=1212103&view=diff
==============================================================================
--- incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/ApplicationsPane.java
(original)
+++ incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/ApplicationsPane.java
Thu Dec  8 20:38:58 2011
@@ -397,11 +397,16 @@ public class ApplicationsPane extends Co
             TextField uriField = (TextField) ApplicationsPane.this.getComponent("applicationuri_"
+ parent.getEnvironmentName() + "_" + (String) scopeField.getSelectedItem() + "_" + name);
             String uri = FileManipulator.format(uriField.getText());
             boolean exists = false;
+            FileManipulator fileManipulator = null;
             try {
-                FileManipulator fileManipulator = FileManipulator.getInstance();
+                fileManipulator = new FileManipulator();
                 exists = fileManipulator.exists(uri);
             } catch (Exception e) {
                 KalumetConsoleApplication.getApplication().getLogPane().addWarning("Can't
check the URI " + uri + ": " + e.getMessage(), parent.getEnvironmentName());
+            } finally {
+                if (fileManipulator != null) {
+                    fileManipulator.close();
+                }
             }
             if (exists) {
                 KalumetConsoleApplication.getApplication().getLogPane().addConfirm("URI "
+ uri + " exists.", parent.getEnvironmentName());

Modified: incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/HomePageWindow.java
URL: http://svn.apache.org/viewvc/incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/HomePageWindow.java?rev=1212103&r1=1212102&r2=1212103&view=diff
==============================================================================
--- incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/HomePageWindow.java
(original)
+++ incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/HomePageWindow.java
Thu Dec  8 20:38:58 2011
@@ -73,9 +73,10 @@ public class HomePageWindow extends Wind
                 KalumetConsoleApplication.getApplication().getLogPane().addWarning(Messages.getString("homepage.warn.mandatory"));
                 return;
             }
+            FileManipulator fileManipulator = null;
             try {
                 // init a file manipulator
-                FileManipulator fileManipulator = FileManipulator.getInstance();
+                fileManipulator = new FileManipulator();
                 // write the homepage area in the output stream
                 PrintWriter writer = new PrintWriter(fileManipulator.write(homePageLocation));
                 writer.print(area.getText());
@@ -84,6 +85,10 @@ public class HomePageWindow extends Wind
             } catch (Exception e) {
                 KalumetConsoleApplication.getApplication().getLogPane().addWarning(Messages.getString("homepage.warn.error")
+ ": " + e.getMessage());
                 return;
+            } finally {
+                if (fileManipulator != null) {
+                    fileManipulator.close();
+                }
             }
             KalumetConsoleApplication.getApplication().getLogPane().addConfirm(Messages.getString("homepage.generated"));
         }

Modified: incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/PublishReleaseWindow.java
URL: http://svn.apache.org/viewvc/incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/PublishReleaseWindow.java?rev=1212103&r1=1212102&r2=1212103&view=diff
==============================================================================
--- incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/PublishReleaseWindow.java
(original)
+++ incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/PublishReleaseWindow.java
Thu Dec  8 20:38:58 2011
@@ -219,9 +219,10 @@ public class PublishReleaseWindow extend
             // update the environment location
             parent.getEnvironment().setReleaseLocation(baseLocation);
             parent.setUpdated(true);
+            FileManipulator fileManipulator = null;
             try {
                 // init file manipulator
-                FileManipulator fileManipulator = FileManipulator.getInstance();
+                fileManipulator = new FileManipulator();
                 // iterate in the application checkboxes
                 for (Iterator applicationCheckBoxIterator = applicationCheckBoxes.iterator();
applicationCheckBoxIterator.hasNext(); ) {
                     ApplicationCheckBox checkBox = (ApplicationCheckBox) applicationCheckBoxIterator.next();
@@ -295,6 +296,10 @@ public class PublishReleaseWindow extend
             } catch (Exception e) {
                 KalumetConsoleApplication.getApplication().getLogPane().addError(Messages.getString("release.error")
+ ": " + e.getMessage(), parent.getEnvironmentName());
                 return;
+            } finally {
+                if (fileManipulator != null) {
+                    fileManipulator.close();
+                }
             }
             KalumetConsoleApplication.getApplication().getLogPane().addConfirm(Messages.getString("release.published"));
         }

Modified: incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/SoftwareWindow.java
URL: http://svn.apache.org/viewvc/incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/SoftwareWindow.java?rev=1212103&r1=1212102&r2=1212103&view=diff
==============================================================================
--- incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/SoftwareWindow.java
(original)
+++ incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/SoftwareWindow.java
Thu Dec  8 20:38:58 2011
@@ -1406,11 +1406,16 @@ public class SoftwareWindow extends Wind
         public void actionPerformed(ActionEvent event) {
             String uri = FileManipulator.format(uriField.getText());
             boolean exists = false;
+            FileManipulator fileManipulator = null;
             try {
-                FileManipulator fileManipulator = FileManipulator.getInstance();
+                fileManipulator = new FileManipulator();
                 exists = fileManipulator.exists(uri);
             } catch (Exception e) {
                 KalumetConsoleApplication.getApplication().getLogPane().addWarning("Can't
check the URI " + uri + ": " + e.getMessage(), parent.getEnvironmentWindow().getEnvironmentName());
+            } finally {
+                if (fileManipulator != null) {
+                    fileManipulator.close();
+                }
             }
             if (exists) {
                 KalumetConsoleApplication.getApplication().getLogPane().addConfirm("URI "
+ uri + " exists.", parent.getEnvironmentWindow().getEnvironmentName());

Modified: incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/SoftwaresPane.java
URL: http://svn.apache.org/viewvc/incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/SoftwaresPane.java?rev=1212103&r1=1212102&r2=1212103&view=diff
==============================================================================
--- incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/SoftwaresPane.java
(original)
+++ incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/app/SoftwaresPane.java
Thu Dec  8 20:38:58 2011
@@ -415,11 +415,16 @@ public class SoftwaresPane extends Conte
             TextField uriField = (TextField) SoftwaresPane.this.getComponent("softwareuri_"
+ parent.getEnvironmentName() + "_" + name);
             String uri = FileManipulator.format(uriField.getText());
             boolean exists = false;
+            FileManipulator fileManipulator = null;
             try {
-                FileManipulator fileManipulator = FileManipulator.getInstance();
+                fileManipulator = new FileManipulator();
                 exists = fileManipulator.exists(uri);
             } catch (Exception e) {
                 KalumetConsoleApplication.getApplication().getLogPane().addWarning("Can't
check the URI " + uri + ": " + e.getMessage(), parent.getEnvironmentName());
+            } finally {
+                if (fileManipulator != null) {
+                    fileManipulator.close();
+                }
             }
             if (exists) {
                 KalumetConsoleApplication.getApplication().getLogPane().addConfirm("URI "
+ uri + " exists.", parent.getEnvironmentName());

Modified: incubator/kalumet/trunk/console/src/main/resources/org/apache/kalumet/console/app/locales/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/kalumet/trunk/console/src/main/resources/org/apache/kalumet/console/app/locales/Messages.properties?rev=1212103&r1=1212102&r2=1212103&view=diff
==============================================================================
--- incubator/kalumet/trunk/console/src/main/resources/org/apache/kalumet/console/app/locales/Messages.properties
(original)
+++ incubator/kalumet/trunk/console/src/main/resources/org/apache/kalumet/console/app/locales/Messages.properties
Thu Dec  8 20:38:58 2011
@@ -175,7 +175,8 @@ id														  ID
 increment												  Increment
 information												  Informations
 initial													  Initial
-jboss4												      JBoss 4.0.x/4.2.x
+jboss4												      JBoss 4.x
+jboss6                                                    JBoss 6.x
 jdbc													  JDBC URL
 jdbc.driver												  JDBC driver
 jdbc.driver.oracle.thin									  Oracle Thin
@@ -379,6 +380,6 @@ variable.notfound										  Variable no
 view													  View
 virtualhost												  Virtual Host
 weblinks											      Web notes (HTML accepted)
-weblogic8											      BEA WebLogic 8.1.x/9.x/10.0
-websphere5												  IBM WebSphere 5.1.x/6.1.x
+weblogic8											      BEA/Oracle WebLogic 8.x/9.x/10.0
+websphere5												  IBM WebSphere 5.x/6.x
 welcome												      Welcome
\ No newline at end of file

Modified: incubator/kalumet/trunk/controller/jboss/src/main/java/org/apache/kalumet/controller/jboss/JBoss4Controller.java
URL: http://svn.apache.org/viewvc/incubator/kalumet/trunk/controller/jboss/src/main/java/org/apache/kalumet/controller/jboss/JBoss4Controller.java?rev=1212103&r1=1212102&r2=1212103&view=diff
==============================================================================
--- incubator/kalumet/trunk/controller/jboss/src/main/java/org/apache/kalumet/controller/jboss/JBoss4Controller.java
(original)
+++ incubator/kalumet/trunk/controller/jboss/src/main/java/org/apache/kalumet/controller/jboss/JBoss4Controller.java
Thu Dec  8 20:38:58 2011
@@ -254,7 +254,7 @@ public class JBoss4Controller extends Ab
         this.jdbcConnectionPoolWriteFile(tempFile, name, driver, increment, initial, maximal,
user, password, url);
         FileManipulator fileManipulator = null;
         try {
-            fileManipulator = FileManipulator.getInstance();
+            fileManipulator = new FileManipulator();
             if (fileManipulator.contentEquals(deployURL.getPath() + "/" + name + "-ds.xml",
deployURL.getPath() + "/" + name + "-ds.xml.temp")) {
                 LOGGER.debug("JDBC connection pool {} is already up to date", name);
                 try {

Modified: incubator/kalumet/trunk/controller/jboss/src/main/java/org/apache/kalumet/controller/jboss/JBoss6Controller.java
URL: http://svn.apache.org/viewvc/incubator/kalumet/trunk/controller/jboss/src/main/java/org/apache/kalumet/controller/jboss/JBoss6Controller.java?rev=1212103&r1=1212102&r2=1212103&view=diff
==============================================================================
--- incubator/kalumet/trunk/controller/jboss/src/main/java/org/apache/kalumet/controller/jboss/JBoss6Controller.java
(original)
+++ incubator/kalumet/trunk/controller/jboss/src/main/java/org/apache/kalumet/controller/jboss/JBoss6Controller.java
Thu Dec  8 20:38:58 2011
@@ -328,7 +328,7 @@ public class JBoss6Controller extends Ab
         this.jdbcConnectionPoolWriteFile(tempFile, name, driver, increment, initial, maximal,
user, password, url);
         FileManipulator fileManipulator = null;
         try {
-            fileManipulator = FileManipulator.getInstance();
+            fileManipulator = new FileManipulator();
             if (fileManipulator.contentEquals(deployURL.getPath() + "/" + name + "-ds.xml",
deployURL.getPath() + "/" + name + "-ds.xml.temp")) {
                 LOGGER.debug("JDBC connection pool {} is already up to date", name);
                 return true;

Modified: incubator/kalumet/trunk/utils/src/main/java/org/apache/kalumet/utils/FileUtils.java
URL: http://svn.apache.org/viewvc/incubator/kalumet/trunk/utils/src/main/java/org/apache/kalumet/utils/FileUtils.java?rev=1212103&r1=1212102&r2=1212103&view=diff
==============================================================================
--- incubator/kalumet/trunk/utils/src/main/java/org/apache/kalumet/utils/FileUtils.java (original)
+++ incubator/kalumet/trunk/utils/src/main/java/org/apache/kalumet/utils/FileUtils.java Thu
Dec  8 20:38:58 2011
@@ -45,9 +45,10 @@ public class FileUtils {
     public static String view(String path) {
         String content = null;
         InputStream stream = null;
+        FileManipulator fileManipulator = null;
         try  {
             // get a file manipulator instance
-            FileManipulator fileManipulator = FileManipulator.getInstance();
+            fileManipulator = new FileManipulator();
             // get the file content
             stream = fileManipulator.read(path);
             // populate the content string
@@ -63,6 +64,9 @@ public class FileUtils {
                     // nothing to do
                 }
             }
+            if (fileManipulator != null) {
+                fileManipulator.close();
+            }
         }
         return content;
     }
@@ -75,9 +79,10 @@ public class FileUtils {
      */
     public static SimplifiedFileObject[] browse(String path) {
         SimplifiedFileObject[] children = null;
+        FileManipulator fileManipulator = null;
         try {
             // get a file manipulator instance
-            FileManipulator fileManipulator = FileManipulator.getInstance();
+            fileManipulator = new FileManipulator();
             // get the path children
             FileObject[] fileObjects = fileManipulator.browse(path);
             children = new SimplifiedFileObject[fileObjects.length];
@@ -96,6 +101,10 @@ public class FileUtils {
             }
         } catch (Exception e) {
             LOGGER.warn("Can't browse {}", path, e);
+        } finally {
+            if (fileManipulator != null) {
+                fileManipulator.close();
+            }
         }
         return children;
     }



Mime
View raw message