JBoss Native SVN: r1460 - in trunk/utils/windows/native/service/procrun: apps/prunsrv and 1 other directories.
by jbossnative-commits@lists.jboss.org
Author: mladen.turk(a)jboss.com
Date: 2008-03-26 07:36:55 -0400 (Wed, 26 Mar 2008)
New Revision: 1460
Modified:
trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.c
trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.h
trunk/utils/windows/native/service/procrun/apps/prunsrv/prunsrv.c
trunk/utils/windows/native/service/procrun/apps/prunsrv/prunsrv.h
trunk/utils/windows/native/service/procrun/src/cmdline.c
Log:
Always use 32-bit registry settings because installer is 32-bit
Modified: trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.c
===================================================================
--- trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.c 2008-03-26 11:07:00 UTC (rev 1459)
+++ trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.c 2008-03-26 11:36:55 UTC (rev 1460)
@@ -56,6 +56,12 @@
#define START_SYSTEM L"SystemInit"
#define EMPTY_PASSWORD L" "
+#ifdef WIN64
+#define KREG_WOW6432 KEY_WOW64_32KEY
+#else
+#define KREG_WOW6432 0
+#endif
+
/* Main application pool */
APXHANDLE hPool = NULL;
APXHANDLE hService = NULL;
@@ -1684,7 +1690,8 @@
apxLoadResource(IDS_APPLICATION, 0),
APXREG_USER);
loadConfiguration();
- hRegserv = apxCreateRegistryW(hPool, KEY_READ | KEY_WRITE, PRG_REGROOT,
+ hRegserv = apxCreateRegistryW(hPool, KEY_READ | KEY_WRITE | KREG_WOW6432,
+ PRG_REGROOT,
lpCmdline->szApplication,
APXREG_SOFTWARE | APXREG_SERVICE);
Modified: trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.h
===================================================================
--- trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.h 2008-03-26 11:07:00 UTC (rev 1459)
+++ trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.h 2008-03-26 11:36:55 UTC (rev 1460)
@@ -26,7 +26,7 @@
#undef PRG_VERSION
#define PRG_VERSION "2.0.4.0"
-#define PRG_REGROOT L"JBoss\\JBoss Web Service Wrapper"
+#define PRG_REGROOT L"JBoss\\JBoss Web 2"
#define IDM_TM_EXIT 2000
#define IDM_TM_START 2001
Modified: trunk/utils/windows/native/service/procrun/apps/prunsrv/prunsrv.c
===================================================================
--- trunk/utils/windows/native/service/procrun/apps/prunsrv/prunsrv.c 2008-03-26 11:07:00 UTC (rev 1459)
+++ trunk/utils/windows/native/service/procrun/apps/prunsrv/prunsrv.c 2008-03-26 11:36:55 UTC (rev 1460)
@@ -40,6 +40,12 @@
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
+#ifdef WIN64
+#define KREG_WOW6432 KEY_WOW64_32KEY
+#else
+#define KREG_WOW6432 0
+#endif
+
typedef struct APX_STDWRAP {
LPCWSTR szLogPath;
LPCWSTR szStdOutFilename;
@@ -413,7 +419,8 @@
int i = 0;
SetLastError(ERROR_SUCCESS);
- hRegistry = apxCreateRegistryW(gPool, KEY_READ, PRG_REGROOT,
+ hRegistry = apxCreateRegistryW(gPool, KEY_READ | KREG_WOW6432,
+ PRG_REGROOT,
lpCmdline->szApplication,
APXREG_SOFTWARE | APXREG_SERVICE);
if (IS_INVALID_HANDLE(hRegistry)) {
@@ -485,7 +492,8 @@
{
APXHANDLE hRegistry;
int i = 0;
- hRegistry = apxCreateRegistryW(gPool, KEY_WRITE, PRG_REGROOT,
+ hRegistry = apxCreateRegistryW(gPool, KEY_WRITE | KREG_WOW6432,
+ PRG_REGROOT,
lpCmdline->szApplication,
APXREG_SOFTWARE | APXREG_SERVICE);
if (IS_INVALID_HANDLE(hRegistry))
Modified: trunk/utils/windows/native/service/procrun/apps/prunsrv/prunsrv.h
===================================================================
--- trunk/utils/windows/native/service/procrun/apps/prunsrv/prunsrv.h 2008-03-26 11:07:00 UTC (rev 1459)
+++ trunk/utils/windows/native/service/procrun/apps/prunsrv/prunsrv.h 2008-03-26 11:36:55 UTC (rev 1460)
@@ -26,7 +26,7 @@
#undef PRG_VERSION
#define PRG_VERSION "2.0.4.0"
-#define PRG_REGROOT L"JBoss\\JBoss Web Service Wrapper"
+#define PRG_REGROOT L"JBoss\\JBoss Web 2"
#endif /* _PRUNSRV_H */
Modified: trunk/utils/windows/native/service/procrun/src/cmdline.c
===================================================================
--- trunk/utils/windows/native/service/procrun/src/cmdline.c 2008-03-26 11:07:00 UTC (rev 1459)
+++ trunk/utils/windows/native/service/procrun/src/cmdline.c 2008-03-26 11:36:55 UTC (rev 1460)
@@ -22,7 +22,7 @@
#define X86_SUFFIX L".X86"
#define X64_SUFFIX L".X64"
-#define A64_SUFFIX L".A64"
+#define A64_SUFFIX L".I64"
/* Those two are declared in handles.c */
extern LPWSTR *_st_sys_argvw;
16 years, 1 month
JBoss Native SVN: r1459 - sandbox/httpd/src/native/mod_manager.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-03-26 07:07:00 -0400 (Wed, 26 Mar 2008)
New Revision: 1459
Modified:
sandbox/httpd/src/native/mod_manager/mod_manager.c
Log:
Force mod-cluster when the method is one of ours.
1 - Allow ProxyPass / bla....
2 - no need of SetHandler mod-cluster in httpd.conf
Modified: sandbox/httpd/src/native/mod_manager/mod_manager.c
===================================================================
--- sandbox/httpd/src/native/mod_manager/mod_manager.c 2008-03-25 10:17:25 UTC (rev 1458)
+++ sandbox/httpd/src/native/mod_manager/mod_manager.c 2008-03-26 11:07:00 UTC (rev 1459)
@@ -487,7 +487,38 @@
x[j] = '\0';
return j;
}
+/*
+ * This routine is called before mod_proxy translate name.
+ * This allows us to make decisions before mod_proxy
+ * to be able to fill tables even with ProxyPass / balancer...
+ */
+static int manager_trans(request_rec *r)
+{
+ int ours = 0;
+ if (strcasecmp(r->method, "CONFIG") == 0)
+ ours = 1;
+ else if (strcasecmp(r->method, "ENABLE-APP") == 0)
+ ours = 1;
+ else if (strcasecmp(r->method, "DISABLE-APP") == 0)
+ ours = 1;
+ else if (strcasecmp(r->method, "STOP-APP") == 0)
+ ours = 1;
+ else if (strcasecmp(r->method, "REMOVE-APP") == 0)
+ ours = 1;
+ else if (strcasecmp(r->method, "STATUS") == 0)
+ ours = 1;
+ else if (strcasecmp(r->method, "DUMP") == 0)
+ ours = 1;
+ if (ours) {
+ /* The method one of ours */
+ r->handler = "mod-cluster";
+ return OK;
+ }
+
+ return DECLINED;
+}
+
/* Process the requests from the ModClusterService */
static int manager_handler(request_rec *r)
{
@@ -603,10 +634,15 @@
static void manager_hooks(apr_pool_t *p)
{
+ static const char * const aszSucc[]={ "mod_proxy.c", NULL };
/* Create the shared tables for mod_proxy_cluster */
ap_hook_post_config(manager_init, NULL, NULL, APR_HOOK_MIDDLE);
+ /* post read_request handling: to be handle to use ProxyPass / */
+ ap_hook_translate_name(manager_trans, NULL, aszSucc,
+ APR_HOOK_FIRST);
+
/* Process the request from the ModClusterService */
ap_hook_handler(manager_handler, NULL, NULL, APR_HOOK_MIDDLE);
16 years, 1 month
JBoss Native SVN: r1458 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: mladen.turk(a)jboss.com
Date: 2008-03-25 06:17:25 -0400 (Tue, 25 Mar 2008)
New Revision: 1458
Modified:
trunk/build/unix/package.list
Log:
Remove 2.0.4-dev from the package list. After tag we'll create 2.0.5-dev
Modified: trunk/build/unix/package.list
===================================================================
--- trunk/build/unix/package.list 2008-03-25 10:15:54 UTC (rev 1457)
+++ trunk/build/unix/package.list 2008-03-25 10:17:25 UTC (rev 1458)
@@ -3,7 +3,6 @@
jboss-native|2.0.1|TOMCAT_NATIVE_1_1_11|apr:v:1.2.9|apu:v:1.2.8|api:v:1.2.1|ssl:v:0.9.8e|zlib:v:1.2.3
jboss-native|2.0.2|TOMCAT_NATIVE_1_1_11|apr:v:1.2.9|apu:v:1.2.8|api:v:1.2.1|ssl:v:0.9.8e|zlib:v:1.2.3
jboss-native|2.0.3|TOMCAT_NATIVE_1_1_12|apr:v:1.2.8|apu:v:1.2.8|api:v:1.2.1|ssl:v:0.9.8e|zlib:v:1.2.3
-jboss-native|2.0.4-dev|trunk|apr:v:1.2.8|apu:v:1.2.8|api:v:1.2.1|ssl:v:0.9.8e|zlib:v:1.2.3
jboss-native|2.0.4|TOMCAT_NATIVE_1_1_13|apr:v:1.2.8|apu:v:1.2.8|api:v:1.2.1|ssl:v:0.9.8e|zlib:v:1.2.3
# SIGHT
jboss-sight|1.0.0|trunk|apr:v:1.2.9|apu:v:1.2.8|api:v:1.2.1
16 years, 1 month
JBoss Native SVN: r1457 - trunk/build/unix/util.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-03-25 06:15:54 -0400 (Tue, 25 Mar 2008)
New Revision: 1457
Modified:
trunk/build/unix/util/applypatch.sh
Log:
Arrange properties.
Modified: trunk/build/unix/util/applypatch.sh
===================================================================
--- trunk/build/unix/util/applypatch.sh 2008-03-25 10:13:23 UTC (rev 1456)
+++ trunk/build/unix/util/applypatch.sh 2008-03-25 10:15:54 UTC (rev 1457)
@@ -25,7 +25,7 @@
if $xb_verbose; then
echo ""
- echo "Running `basename $0` $LastChangedDate: 2008-03-19 09:23:13 +0100 (Wed, 19 Mar 2008) $"
+ echo "Running `basename $0` $LastChangedDate$"
echo ""
echo "Started : `date`"
echo "Params : $@"
Property changes on: trunk/build/unix/util/applypatch.sh
___________________________________________________________________
Name: svn:keywords
+ LastChangedDate
16 years, 1 month
JBoss Native SVN: r1456 - trunk/build/patch.
by jbossnative-commits@lists.jboss.org
Author: mladen.turk(a)jboss.com
Date: 2008-03-25 06:13:23 -0400 (Tue, 25 Mar 2008)
New Revision: 1456
Added:
trunk/build/patch/tomcat-native-1.1.13.patch
Log:
Add missing patch for tcn_version.h
Added: trunk/build/patch/tomcat-native-1.1.13.patch
===================================================================
--- trunk/build/patch/tomcat-native-1.1.13.patch (rev 0)
+++ trunk/build/patch/tomcat-native-1.1.13.patch 2008-03-25 10:13:23 UTC (rev 1456)
@@ -0,0 +1,61 @@
+--- include/tcn_version.h
++++ include/tcn_version.h
+@@ -69,7 +69,7 @@
+ #define TCN_MINOR_VERSION 1
+
+ /** patch level */
+-#define TCN_PATCH_VERSION 12
++#define TCN_PATCH_VERSION 13
+
+ /**
+ * This symbol is defined for internal, "development" copies of TCN. This
+--- os/win32/libtcnative.rc
++++ os/win32/libtcnative.rc
+@@ -20,7 +20,7 @@
+ "See the License for the specific language governing " \
+ "permissions and limitations under the License."
+
+-#define TCN_VERISON "1.1.12"
++#define TCN_VERISON "1.1.13"
+ 1000 ICON "apache.ico"
+
+ 1001 DIALOGEX 0, 0, 252, 51
+@@ -36,8 +36,8 @@
+ END
+
+ 1 VERSIONINFO
+- FILEVERSION 1,1,12,0
+- PRODUCTVERSION 1,1,12,0
++ FILEVERSION 1,1,13,1
++ PRODUCTVERSION 1,1,13,1
+ FILEFLAGSMASK 0x3fL
+ #ifdef _DEBUG
+ FILEFLAGS 0x1L
+--- src/network.c
++++ src/network.c
+@@ -17,7 +17,7 @@
+ /*
+ *
+ * @author Mladen Turk
+- * @version $Revision: 562478 $, $Date: 2007-08-03 16:33:51 +0200 (Fri, 03 Aug 2007) $
++ * @version $Revision: 631212 $, $Date: 2008-02-26 14:46:57 +0100 (Tue, 26 Feb 2008) $
+ */
+
+ #include "tcn.h"
+@@ -1106,7 +1106,6 @@
+
+ UNREFERENCED(o);
+ if (!s->sock) {
+- tcn_ThrowAPRException(e, APR_ENOTSOCK);
+ return APR_ENOTSOCK;
+ }
+ else
+@@ -1120,7 +1119,7 @@
+ apr_int32_t on = 0;
+
+ UNREFERENCED(o);
+- if (s->sock)
++ if (!s->sock)
+ tcn_ThrowAPRException(e, APR_ENOTSOCK);
+ else {
+ TCN_THROW_IF_ERR((*s->net->opt_get)(s->opaque, (apr_int32_t)opt,
16 years, 1 month
JBoss Native SVN: r1455 - in trunk/build/unix: util and 1 other directory.
by jbossnative-commits@lists.jboss.org
Author: mladen.turk(a)jboss.com
Date: 2008-03-25 06:06:39 -0400 (Tue, 25 Mar 2008)
New Revision: 1455
Added:
trunk/build/unix/util/applypatch.sh
Modified:
trunk/build/unix/buildsrc.jboss-native.sh
trunk/build/unix/package.list
Log:
Add patch and patch logic for native component
Modified: trunk/build/unix/buildsrc.jboss-native.sh
===================================================================
--- trunk/build/unix/buildsrc.jboss-native.sh 2008-03-25 08:10:18 UTC (rev 1454)
+++ trunk/build/unix/buildsrc.jboss-native.sh 2008-03-25 10:06:39 UTC (rev 1455)
@@ -52,6 +52,9 @@
exit 1
fi
+# Apply patches
+$build_top/util/applypatch.sh $build_top ${native_dist}/srclib/tomcat-native-${native_ext} false
+
# Generate configure.
apr_sources=${native_dist}/srclib/`ls ${native_dist}/srclib | grep apr-1`
if $BUILD_WIN ; then
Modified: trunk/build/unix/package.list
===================================================================
--- trunk/build/unix/package.list 2008-03-25 08:10:18 UTC (rev 1454)
+++ trunk/build/unix/package.list 2008-03-25 10:06:39 UTC (rev 1455)
@@ -4,6 +4,7 @@
jboss-native|2.0.2|TOMCAT_NATIVE_1_1_11|apr:v:1.2.9|apu:v:1.2.8|api:v:1.2.1|ssl:v:0.9.8e|zlib:v:1.2.3
jboss-native|2.0.3|TOMCAT_NATIVE_1_1_12|apr:v:1.2.8|apu:v:1.2.8|api:v:1.2.1|ssl:v:0.9.8e|zlib:v:1.2.3
jboss-native|2.0.4-dev|trunk|apr:v:1.2.8|apu:v:1.2.8|api:v:1.2.1|ssl:v:0.9.8e|zlib:v:1.2.3
+jboss-native|2.0.4|TOMCAT_NATIVE_1_1_13|apr:v:1.2.8|apu:v:1.2.8|api:v:1.2.1|ssl:v:0.9.8e|zlib:v:1.2.3
# SIGHT
jboss-sight|1.0.0|trunk|apr:v:1.2.9|apu:v:1.2.8|api:v:1.2.1
jboss-sight|1.0.1|trunk|apr:v:1.2.8|apu:v:1.2.8|api:v:1.2.1
Added: trunk/build/unix/util/applypatch.sh
===================================================================
--- trunk/build/unix/util/applypatch.sh (rev 0)
+++ trunk/build/unix/util/applypatch.sh 2008-03-25 10:06:39 UTC (rev 1455)
@@ -0,0 +1,70 @@
+!/bin/sh
+# Copyright(c) 2007 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+# @author Mladen Turk
+#
+
+if $xb_verbose; then
+ echo ""
+ echo "Running `basename $0` $LastChangedDate: 2008-03-19 09:23:13 +0100 (Wed, 19 Mar 2008) $"
+ echo ""
+ echo "Started : `date`"
+ echo "Params : $@"
+ echo ""
+fi
+
+# Apply patch for the component
+# $1 directory of the component like apr-1.2.8
+# $2 also apply the rhel patches.
+#
+# TODO: rename $patch to $XB_PATCH
+#
+xb_applypatch()
+{
+ basefilename=`basename $xbap_package_dir`
+ if [ -f $xbap_build_top/../patch/$basefilename.patch ]; then
+ (cd $xbap_package_dir
+ echo "Applying patch $ap_build_top/../patch/$basefilename.patch in $xbap_package_dir"
+ $patch -tf -p0 -i $xbap_build_top/../patch/$basefilename.patch
+ ) || return 1
+ fi
+ if $xbap_is_rhel; then
+ if [ -f $xbap_build_top/../patch/$basefilename.rhel.patch ]; then
+ (cd $xbap_package_dir
+ echo "Applying rhel patch $ap_build_top/../patch/$basefilename.rhel.patch in $xbap_package_dir"
+ $patch -tf -p0 -i $xbap_build_top/../patch/$basefilename.rhel.patch
+ ) || return 1
+ fi
+ fi
+}
+
+# Apply patch for the component
+# $1 Build top. Where we start the build.sh
+# $2 Component directory like apr-1.2.8
+# $3 Also apply the rhel patches.
+
+xbap_build_top=$1
+xbap_package_dir=$2
+xbsp_is_rhel=$3
+
+# Call the internal functions.
+xb_applypatch
Property changes on: trunk/build/unix/util/applypatch.sh
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:eol-style
+ LF
16 years, 1 month
JBoss Native SVN: r1454 - in trunk/utils/windows/native/service/procrun: apps/prunmgr and 2 other directories.
by jbossnative-commits@lists.jboss.org
Author: mladen.turk(a)jboss.com
Date: 2008-03-25 04:10:18 -0400 (Tue, 25 Mar 2008)
New Revision: 1454
Modified:
trunk/utils/windows/native/service/procrun/NMAKEmgr
trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.h
trunk/utils/windows/native/service/procrun/apps/prunsrv/prunsrv.h
trunk/utils/windows/native/service/procrun/src/cmdline.c
Log:
Allow .CPU file extension to be stripped from the service name. This allows to have multiple executables in the same root
Modified: trunk/utils/windows/native/service/procrun/NMAKEmgr
===================================================================
--- trunk/utils/windows/native/service/procrun/NMAKEmgr 2008-03-20 20:28:36 UTC (rev 1453)
+++ trunk/utils/windows/native/service/procrun/NMAKEmgr 2008-03-25 08:10:18 UTC (rev 1454)
@@ -32,10 +32,6 @@
LFLAGS = $(LFLAGS) user32.lib gdi32.lib winspool.lib comdlg32.lib comctl32.lib shlwapi.lib netapi32.lib
INCLUDES = -I$(SRCDIR)\include -I$(SRCDIR)\src -I$(SRCDIR)\apps\prunmgr -I$(JAVA_HOME)\include -I$(JAVA_HOME)\include\win32
-!IF "$(CPU)" == "I386"
-RCFLAGS = $(RCFLAGS) /d "USE_MANIFEST"
-!ENDIF
-
PDBFLAGS = -Fo$(WORKDIR)\ -Fd$(WORKDIR)\$(PROJECT)-src
OBJECTS = \
$(WORKDIR)\cmdline.obj \
Modified: trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.h
===================================================================
--- trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.h 2008-03-20 20:28:36 UTC (rev 1453)
+++ trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.h 2008-03-25 08:10:18 UTC (rev 1454)
@@ -26,7 +26,7 @@
#undef PRG_VERSION
#define PRG_VERSION "2.0.4.0"
-#define PRG_REGROOT L"JBoss\\JBoss Web 2"
+#define PRG_REGROOT L"JBoss\\JBoss Web Service Wrapper"
#define IDM_TM_EXIT 2000
#define IDM_TM_START 2001
Modified: trunk/utils/windows/native/service/procrun/apps/prunsrv/prunsrv.h
===================================================================
--- trunk/utils/windows/native/service/procrun/apps/prunsrv/prunsrv.h 2008-03-20 20:28:36 UTC (rev 1453)
+++ trunk/utils/windows/native/service/procrun/apps/prunsrv/prunsrv.h 2008-03-25 08:10:18 UTC (rev 1454)
@@ -26,7 +26,7 @@
#undef PRG_VERSION
#define PRG_VERSION "2.0.4.0"
-#define PRG_REGROOT L"JBoss\\JBoss Web 2"
+#define PRG_REGROOT L"JBoss\\JBoss Web Service Wrapper"
#endif /* _PRUNSRV_H */
Modified: trunk/utils/windows/native/service/procrun/src/cmdline.c
===================================================================
--- trunk/utils/windows/native/service/procrun/src/cmdline.c 2008-03-20 20:28:36 UTC (rev 1453)
+++ trunk/utils/windows/native/service/procrun/src/cmdline.c 2008-03-25 08:10:18 UTC (rev 1454)
@@ -20,6 +20,10 @@
#define EXE_SUFFIX L".EXE"
#define EXE_SUFFIXLEN (sizeof(EXE_SUFFIX) / sizeof(WCHAR) - 1)
+#define X86_SUFFIX L".X86"
+#define X64_SUFFIX L".X64"
+#define A64_SUFFIX L".A64"
+
/* Those two are declared in handles.c */
extern LPWSTR *_st_sys_argvw;
extern int _st_sys_argc;
@@ -84,6 +88,20 @@
p = _st_sys_argvw[0] + l - EXE_SUFFIXLEN;
if (lstrcmpiW(p, EXE_SUFFIX) == 0)
*p = L'\0';
+ /* Strip CPU specific suffixes */
+ l = lstrlenW(_st_sys_argvw[0]);
+ if (l > EXE_SUFFIXLEN) {
+ p = _st_sys_argvw[0] + l - EXE_SUFFIXLEN;
+ if (lstrcmpiW(p, X86_SUFFIX) == 0) {
+ *p = L'\0';
+ }
+ else if (lstrcmpiW(p, X64_SUFFIX) == 0) {
+ *p = L'\0';
+ }
+ else if (lstrcmpiW(p, A64_SUFFIX) == 0) {
+ *p = L'\0';
+ }
+ }
if (lpszCommands && _st_sys_argc > 1 && lstrlenW(_st_sys_argvw[1]) > 5) {
if (_st_sys_argvw[1][0] == L'/' &&
_st_sys_argvw[1][1] == L'/' &&
16 years, 1 month
JBoss Native SVN: r1453 - trunk/utils/windows/native/service/procrun/apps/prunmgr.
by jbossnative-commits@lists.jboss.org
Author: mladen.turk(a)jboss.com
Date: 2008-03-20 16:28:36 -0400 (Thu, 20 Mar 2008)
New Revision: 1453
Modified:
trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.rc
Log:
Update versions to patch 1
Modified: trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.rc
===================================================================
--- trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.rc 2008-03-20 20:26:51 UTC (rev 1452)
+++ trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.rc 2008-03-20 20:28:36 UTC (rev 1453)
@@ -230,7 +230,7 @@
STRINGTABLE
BEGIN
IDS_APPLICATION STR_PRODUCT
- IDS_APPVERSION "Version 2.0.3"
+ IDS_APPVERSION "Version 2.0.4"
IDS_APPFULLNAME STR_PRODUCT " Version " PRG_VERSION
IDS_APPCOPYRIGHT "Copyright � 2008 Red Hat Middleware, LLC."
IDS_APPDESCRIPTION "JBoss Web Service Management Tool"
@@ -261,8 +261,8 @@
END
1 VERSIONINFO
- FILEVERSION 2,0,4,0
- PRODUCTVERSION 2,0,4,0
+ FILEVERSION 2,0,4,1
+ PRODUCTVERSION 2,0,4,1
FILEFLAGSMASK 0x3fL
#if defined(_DEBUG)
FILEFLAGS 0x03L
16 years, 1 month
JBoss Native SVN: r1452 - trunk/utils/windows/native/service/procrun/apps/prunmgr.
by jbossnative-commits@lists.jboss.org
Author: mladen.turk(a)jboss.com
Date: 2008-03-20 16:26:51 -0400 (Thu, 20 Mar 2008)
New Revision: 1452
Modified:
trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.manifest
trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.rc
Log:
Make manifest CPU agnostic, so a nice flat GUI can be shown on x64 as well
Modified: trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.manifest
===================================================================
--- trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.manifest 2008-03-20 16:39:04 UTC (rev 1451)
+++ trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.manifest 2008-03-20 20:26:51 UTC (rev 1452)
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
-<assemblyIdentity version="2.0.4.0" processorArchitecture="X86" name="JBoss.Web.Service" type="win32" />
+<assemblyIdentity version="3.1.0.0" processorArchitecture="*" name="JBoss Web Service" type="win32" />
<description>JBoss Web Service Manager</description>
<dependency>
<dependentAssembly>
-<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" />
+<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" />
</dependentAssembly>
</dependency>
</assembly>
Modified: trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.rc
===================================================================
--- trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.rc 2008-03-20 16:39:04 UTC (rev 1451)
+++ trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.rc 2008-03-20 20:26:51 UTC (rev 1452)
@@ -35,9 +35,7 @@
IDR_LICENSE RTF "../../resources/license.rtf"
BMP_JBOSSLOGO BITMAP "../../resources/jbosslogo.bmp"
-#ifdef USE_MANIFEST
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "prunmgr.manifest"
-#endif
IDD_ABOUTBOX DIALOGEX 0, 0, 337, 187
STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
16 years, 1 month
JBoss Native SVN: r1451 - trunk/utils/windows/native/service/jbosssvc.
by jbossnative-commits@lists.jboss.org
Author: mladen.turk(a)jboss.com
Date: 2008-03-20 12:39:04 -0400 (Thu, 20 Mar 2008)
New Revision: 1451
Modified:
trunk/utils/windows/native/service/jbosssvc/jboss.c
Log:
Read service default shutdown timeout
Modified: trunk/utils/windows/native/service/jbosssvc/jboss.c
===================================================================
--- trunk/utils/windows/native/service/jbosssvc/jboss.c 2008-03-20 16:13:24 UTC (rev 1450)
+++ trunk/utils/windows/native/service/jbosssvc/jboss.c 2008-03-20 16:39:04 UTC (rev 1451)
@@ -70,6 +70,7 @@
#include <stdlib.h>
#include <string.h>
#include <process.h>
+#include <time.h>
/* Custom return error values */
#define ERR_RET_USAGE 1
@@ -152,6 +153,46 @@
return rv;
}
+static DWORD WaitToKillServiceTimeout()
+{
+ static DWORD dwTimeout = 0;
+
+ if (dwTimeout) {
+ return dwTimeout;
+ }
+ else {
+ DWORD err;
+ HKEY hKey;
+ CHAR wsBuf[MAX_PATH];
+ DWORD dwLen, dwType = REG_SZ;
+
+ dwTimeout = 20000;
+ if ((err = RegOpenKeyExA(HKEY_LOCAL_MACHINE,
+ "SYSTEM\\CurrentControlSet\\Control",
+ 0,
+ KEY_READ,
+ &hKey)) != ERROR_SUCCESS) {
+ return dwTimeout;
+ }
+
+ dwLen = sizeof(wsBuf);
+ err = RegQueryValueExA(hKey,
+ "WaitToKillServiceTimeout",
+ NULL,
+ &dwType,
+ (LPBYTE)wsBuf,
+ &dwLen);
+ RegCloseKey(hKey);
+ if (err == ERROR_SUCCESS) {
+ dwTimeout = (DWORD)atoi(wsBuf);
+ if (!dwTimeout)
+ dwTimeout = 20000;
+ }
+
+ return dwTimeout;
+ }
+}
+
/* To share the semaphores with other processes, we need a NULL ACL
* Code from MS KB Q106387
*/
@@ -679,8 +720,9 @@
}
}
} while (Process32Next(hProcessSnap, &pe32));
-
+
CloseHandle(hProcessSnap);
+ Sleep(500);
return TerminateProcess(hProcess, retCode);
}
@@ -688,28 +730,38 @@
/* Executed when the service receives stop event */
static DWORD ServiceStop()
{
- int i = 0;
+ int step = 14000;
PROCESS_INFORMATION prInfo;
char cmd[MAX_CMDLINE + 1];
+ time_t s;
+ double t;
if (!IsServiceRunning(_service_name)) {
AddToMessageLog(FALSE, "Service %s is already stopped", _service_name);
return 0;
}
+
+ t = WaitToKillServiceTimeout() / 1000 - 2;
+ time(&s);
BuildCommandLine(cmd, "stop");
AddToMessageLog(FALSE, "Stopping service %s", _service_name);
- ReportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, 0);
+ ReportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR,
+ WaitToKillServiceTimeout());
+
while (RunChildProcess(_cmd_exe, cmd, &prInfo)) {
WaitForSingleObject(prInfo.hProcess, INFINITE);
AddToMessageLog(FALSE, "Stopped service %s", _service_name);
CloseHandle(prInfo.hProcess);
CloseHandle(prInfo.hThread);
-
+
ReportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, 0);
- if (WaitForSingleObject(_service_run_event, 10000) == WAIT_OBJECT_0)
+ if (WaitForSingleObject(_service_run_event, step) == WAIT_OBJECT_0)
break;
- if (i++ > 4) {
+
+ if (step > 2000)
+ step = 2000;
+ if (difftime(time(NULL), s) > t) {
ReportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, 0);
TerminateProcessGroup(_service_run_hproc, _service_run_pid, 1);
AddToMessageLog(FALSE, "Service terminated %s", _service_name);
16 years, 1 month