rpms/jonas/devel jonas-shutdown.patch, NONE, 1.1 jonas.spec, 1.131, 1.132

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Nov 11 10:53:23 UTC 2005


Author: gbenson

Update of /cvs/dist/rpms/jonas/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv17645

Modified Files:
	jonas.spec 
Added Files:
	jonas-shutdown.patch 
Log Message:
Allow clean shutdown (from Andrew Haley)

jonas-shutdown.patch:
 Pool.java       |    5 ++++-
 PoolKeeper.java |    8 ++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

--- NEW FILE jonas-shutdown.patch ---
We can't shutdown jonas because gcj does not (and in fact,
cannot) support Thread.stop.  This patch works around this.

--- jonas/src/org/objectweb/jonas/dbm/Pool.java~        2004-11-17 20:54:07 +0000
+++ jonas/src/org/objectweb/jonas/dbm/Pool.java 2005-11-09 17:44:42 +0000
@@ -982,7 +982,10 @@
         logger.log(BasicLevel.DEBUG, "");
 
         // Stop the pool keeper, since all connections will be closed.
-        poolKeeper.stop();
+        if (System.getProperty("java.vm.name").equals("GNU libgcj"))
+            poolKeeper.die();
+        else
+            poolKeeper.stop();
 
         // Close physically all connections
         Iterator it = xac2item.keySet().iterator();
--- jonas/src/org/objectweb/jonas/dbm/PoolKeeper.java~  2004-11-17 20:54:07 +0000
+++ jonas/src/org/objectweb/jonas/dbm/PoolKeeper.java   2005-11-09 17:44:24 +0000
@@ -52,6 +52,12 @@
      */
     private long samplingperiod = 60000L;  // default = 60s
 
+    private boolean dead = false;
+
+    protected void die() {
+        dead = true;
+    }
+
     /**
      * Constructor
      * @param pool Pool to monitor
@@ -89,6 +95,8 @@
             }
             try {
                 sleep(timeout);
+                if (dead)
+                    return;
                 adjusttime -= timeout;
                 samplingtime -= timeout;
                 if (adjusttime <= 0) {



Index: jonas.spec
===================================================================
RCS file: /cvs/dist/rpms/jonas/devel/jonas.spec,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -r1.131 -r1.132
--- jonas.spec	4 Nov 2005 12:44:12 -0000	1.131
+++ jonas.spec	11 Nov 2005 10:53:19 -0000	1.132
@@ -10,7 +10,7 @@
 %if %{?_with_snapshot:1}%{!?_with_snapshot:0}
 %define release		0.%{cvs_version}.1jpp_1rh
 %else
-%define release		1jpp_14fc
+%define release		1jpp_15fc
 %endif
 
 %define section		free
@@ -139,6 +139,7 @@
 Patch32: jonas-classpath.patch
 Patch33: jonas-early-resolution.patch
 Patch34: jonas-bz170535.patch
+Patch35: jonas-shutdown.patch
 
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -516,6 +517,7 @@
 %patch32 -p0
 %patch33 -p1
 %patch34 -p0
+%patch35 -p0
 popd
 
 # Red Hat specific
@@ -1734,6 +1736,9 @@
 # -----------------------------------------------------------------------------
 
 %changelog
+* Fri Nov 11 2005 Gary Benson <gbenson at redhat.com> - 4.3.3-1jpp_15fc
+- Allow clean shutdown (from Andrew Haley).
+
 * Fri Nov  4 2005 Gary Benson <gbenson at redhat.com> - 4.3.3-1jpp_14fc
 - Many testsuite fixes (from Andrew Haley).
 




More information about the fedora-cvs-commits mailing list