diff --git a/install/Adempiere/build.xml b/install/Adempiere/build.xml
index 431076895d..db4309d270 100644
--- a/install/Adempiere/build.xml
+++ b/install/Adempiere/build.xml
@@ -55,7 +55,10 @@
-
+
+
+
+
@@ -359,7 +362,11 @@
+ includes="Adempiere.jar,AdempiereSLib.jar,adempiereRoot.jar,adempiereApps.jar,adempiereApps.war,adempiereRoot.war,adempiereWebStore.war,adempiereWebCM.war,posterita.war,posterita.jar,webui.war" />
+
+
+
@@ -387,6 +394,24 @@
+
+
+
+
+
+
+
+
+
+
@@ -474,7 +499,7 @@
-
diff --git a/install/src/org/compiere/install/ConfigGlassfish.java b/install/src/org/compiere/install/ConfigGlassfish.java
new file mode 100644
index 0000000000..2abdf7c8c5
--- /dev/null
+++ b/install/src/org/compiere/install/ConfigGlassfish.java
@@ -0,0 +1,173 @@
+/**********************************************************************
+* This file is part of Adempiere ERP Bazaar *
+* http://www.adempiere.org *
+* *
+* Copyright (C) Praneet Tiwari. *
+* Copyright (C) Contributors *
+* *
+* This program is free software; you can redistribute it and/or *
+* modify it under the terms of the GNU General Public License *
+* as published by the Free Software Foundation; either version 2 *
+* of the License, or (at your option) any later version. *
+* *
+* This program 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 General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the Free Software *
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
+* MA 02110-1301, USA. *
+* *
+* Contributors: *
+* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
+* *
+* Sponsors: *
+* - D3 Soft (http://www.d3-soft.com) *
+***********************************************************************/
+
+package org.compiere.install;
+
+import java.io.*;
+import java.net.*;
+
+/**
+ * GlassFish v2UR1 Apps Server Configuration
+ *
+ * @author Praneet Tiwari
+ * @author Trifon Trifonov
+ * @version $Id: $
+ */
+
+public class ConfigGlassfish extends Config {
+
+ /**
+ * ConfigGlassfish
+ * @param data configuration
+ */
+ public ConfigGlassfish (ConfigurationData data)
+ {
+ super (data);
+ } // ConfigGlassfish
+
+ /**
+ * Initialize
+ */
+ public void init()
+ {
+ p_data.setAppsServerDeployDir(getDeployDir());
+ p_data.setAppsServerDeployDir(false);
+ //
+ p_data.setAppsServerJNPPort("1099");
+ p_data.setAppsServerJNPPort(true);
+ p_data.setAppsServerWebPort("8080");
+ p_data.setAppsServerWebPort(true);
+ p_data.setAppsServerSSLPort("443");
+ p_data.setAppsServerSSLPort(true);
+ } // init
+
+ /**
+ * Get Deployment Dir
+ * @return deployment dir
+ */
+ private String getDeployDir()
+ {
+ // TODO - check deployment directory
+ return p_data.getAdempiereHome();
+ /*Commented for now
+ + File.separator + "glassfish"
+ + File.separator + "domains"
+ + File.separator + "domain1" ;
+ * */
+ } // getDeployDir
+
+ /**
+ * Test
+ * @return error message or null if OK
+ */
+ public String test()
+ {
+ // AppsServer
+ String server = p_data.getAppsServer();
+ boolean pass = server != null && server.length() > 0
+ && server.toLowerCase().indexOf("localhost") == -1
+ && !server.equals("127.0.0.1");
+ InetAddress appsServer = null;
+ String error = "Not correct: AppsServer = " + server;
+ try
+ {
+ if (pass)
+ appsServer = InetAddress.getByName(server);
+ }
+ catch (Exception e)
+ {
+ error += " - " + e.getMessage();
+ pass = false;
+ }
+ if (getPanel() != null)
+ signalOK(getPanel().okAppsServer, "ErrorAppsServer",
+ pass, true, error);
+ if (!pass)
+ return error;
+ log.info("OK: AppsServer = " + appsServer);
+ setProperty(ConfigurationData.ADEMPIERE_APPS_SERVER, appsServer.getHostName());
+ setProperty(ConfigurationData.ADEMPIERE_APPS_TYPE, p_data.getAppsServerType());
+
+ // Deployment Dir
+ p_data.setAppsServerDeployDir(getDeployDir());
+ File deploy = new File (p_data.getAppsServerDeployDir());
+ pass = deploy.exists();
+ error = "Not found: " + deploy;
+ if (getPanel() != null)
+ signalOK(getPanel().okDeployDir, "ErrorDeployDir",
+ pass, true, error);
+ if (!pass)
+ return error;
+ setProperty(ConfigurationData.ADEMPIERE_APPS_DEPLOY, p_data.getAppsServerDeployDir());
+ log.info("OK: Deploy Directory = " + deploy);
+
+ // JNP Port
+ int JNPPort = p_data.getAppsServerJNPPort();
+ pass = !p_data.testPort (appsServer, JNPPort, false)
+ && p_data.testServerPort(JNPPort);
+ error = "Not correct: JNP Port = " + JNPPort;
+ if (getPanel() != null)
+ signalOK(getPanel().okJNPPort, "ErrorJNPPort",
+ pass, true, error);
+ if (!pass)
+ return error;
+ log.info("OK: JNPPort = " + JNPPort);
+ setProperty(ConfigurationData.ADEMPIERE_JNP_PORT, String.valueOf(JNPPort));
+
+ // Web Port
+ int WebPort = p_data.getAppsServerWebPort();
+ pass = !p_data.testPort ("http", appsServer.getHostName(), WebPort, "/")
+ && p_data.testServerPort(WebPort);
+ error = "Not correct: Web Port = " + WebPort;
+ if (getPanel() != null)
+ signalOK(getPanel().okWebPort, "ErrorWebPort",
+ pass, true, error);
+ if (!pass)
+ return error;
+ log.info("OK: Web Port = " + WebPort);
+ setProperty(ConfigurationData.ADEMPIERE_WEB_PORT, String.valueOf(WebPort));
+
+ // SSL Port
+ int sslPort = p_data.getAppsServerSSLPort();
+ pass = !p_data.testPort ("https", appsServer.getHostName(), sslPort, "/")
+ && p_data.testServerPort(sslPort);
+ error = "Not correct: SSL Port = " + sslPort;
+ if (getPanel() != null)
+ signalOK(getPanel().okSSLPort, "ErrorWebPort",
+ pass, true, error);
+ if (!pass)
+ return error;
+ log.info("OK: SSL Port = " + sslPort);
+ setProperty(ConfigurationData.ADEMPIERE_SSL_PORT, String.valueOf(sslPort));
+ //
+ return null;
+ } // test
+
+} // ConfigGlassfish
+
diff --git a/install/src/org/compiere/install/ConfigurationData.java b/install/src/org/compiere/install/ConfigurationData.java
index dd57f92d4d..fd09fb348b 100644
--- a/install/src/org/compiere/install/ConfigurationData.java
+++ b/install/src/org/compiere/install/ConfigurationData.java
@@ -1026,18 +1026,28 @@ public class ConfigurationData
protected static String APPSTYPE_JBOSS = "jboss";
/** Tomcat only */
protected static String APPSTYPE_TOMCAT = "tomcatOnly";
+ /** GlassFish */
+ protected static String APPSTYPE_GLASSFISH = "GlassFish";
/** IBM WS */
private static String APPSTYPE_IBM = "";
/** Oracle */
private static String APPSTYPE_ORACLE = "";
/** Application Server Type */
static String[] APPSTYPE = new String[]
- {APPSTYPE_JBOSS, APPSTYPE_TOMCAT,
- APPSTYPE_IBM, APPSTYPE_ORACLE};
+ { APPSTYPE_JBOSS
+ , APPSTYPE_GLASSFISH
+ , APPSTYPE_TOMCAT
+ , APPSTYPE_IBM
+ , APPSTYPE_ORACLE
+ };
/** Database Configs */
private Config[] m_appsConfig = new Config[]
- {new ConfigJBoss(this), new ConfigTomcat(this),
- null, null};
+ { new ConfigJBoss(this)
+ , new ConfigGlassfish( this )
+ , new ConfigTomcat(this)
+ , null
+ , null
+ };
/**
* Init Apps Server
diff --git a/lib/adempiereAll.xml b/lib/adempiereAll.xml
index 01a3a8e17a..ed0954de01 100644
--- a/lib/adempiereAll.xml
+++ b/lib/adempiereAll.xml
@@ -4,8 +4,8 @@
@version $Id: application.xml,v 1.3 2006/06/12 00:59:05 jjanke Exp $
-->
- adempiere
Adempiere Applications
+ adempiere
AdempiereSLib.jar