Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 91376 invoked from network); 6 Aug 2008 13:40:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Aug 2008 13:40:17 -0000 Received: (qmail 28387 invoked by uid 500); 6 Aug 2008 13:40:16 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 28270 invoked by uid 500); 6 Aug 2008 13:40:16 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 28261 invoked by uid 99); 6 Aug 2008 13:40:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Aug 2008 06:40:16 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Aug 2008 13:39:18 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B4934238899C; Wed, 6 Aug 2008 06:39:15 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r683262 - in /cxf/trunk: rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java Date: Wed, 06 Aug 2008 13:39:13 -0000 To: commits@cxf.apache.org From: ffang@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080806133915.B4934238899C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ffang Date: Wed Aug 6 06:39:10 2008 New Revision: 683262 URL: http://svn.apache.org/viewvc?rev=683262&view=rev Log: [CXF-1652]CXF Decoupled Endpoints are not getting cleaned up properly even after bus.Shutdown() in org.apache.cxf.systest.ws.rm.SequenceTest. Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=683262&r1=683261&r2=683262&view=diff ============================================================================== --- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (original) +++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java Wed Aug 6 06:39:10 2008 @@ -726,6 +726,7 @@ // if (decoupledDestination != null) { releaseDecoupledDestination(); + } } @@ -924,6 +925,9 @@ if (--decoupledDestinationRefCount == 0) { LOG.log(Level.INFO, "shutting down decoupled destination"); decoupledDestination.shutdown(); + + //this way we can release the port of decoupled destination + decoupledDestination.setMessageObserver(null); } } Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java?rev=683262&r1=683261&r2=683262&view=diff ============================================================================== --- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java (original) +++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java Wed Aug 6 06:39:10 2008 @@ -1255,7 +1255,7 @@ greeter.greetMeOneWay("neutrophil"); greeter.greetMeOneWay("basophil"); greeter.greetMeOneWay("eosinophil"); - stopGreeter(); + stopGreeterButNotCloseConduit(); awaitMessages(6, 8); MessageFlow mf = new MessageFlow(outRecorder.getOutboundMessages(), inRecorder.getInboundMessages()); @@ -1355,7 +1355,11 @@ } private void stopGreeter() { - if (null != greeterBus) { + if (null != greeterBus) { + + //ensure we close the decoupled destination of the conduit, + //so that release the port if the destination reference count hit zero + ClientProxy.getClient(greeter).getConduit().close(); greeterBus.shutdown(true); greeter = null; greeterBus = null; @@ -1369,6 +1373,15 @@ } } + private void stopGreeterButNotCloseConduit() { + if (null != greeterBus) { + + greeterBus.shutdown(true); + greeter = null; + greeterBus = null; + } + } + private void awaitMessages(int nExpectedOut, int nExpectedIn) { awaitMessages(nExpectedOut, nExpectedIn, 10000); }