cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r797522 - in /cxf/branches/2.2.x-fixes: ./ integration/jca/src/main/java/org/apache/cxf/jca/outbound/ integration/jca/src/test/java/org/apache/cxf/jca/outbound/
Date Fri, 24 Jul 2009 15:18:56 GMT
Author: dkulp
Date: Fri Jul 24 15:18:55 2009
New Revision: 797522

URL: http://svn.apache.org/viewvc?rev=797522&view=rev
Log:
Merged revisions 797517 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r797517 | dkulp | 2009-07-24 11:10:25 -0400 (Fri, 24 Jul 2009) | 1 line
  
  [CXF-2357] Patch from William Tam applied
........

Added:
    cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/outbound/
      - copied from r797517, cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/outbound/
    cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/outbound/ManagedConnectionImplTest.java
      - copied unchanged from r797517, cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/outbound/ManagedConnectionImplTest.java
Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/integration/jca/src/main/java/org/apache/cxf/jca/outbound/ManagedConnectionImpl.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 24 15:18:55 2009
@@ -1 +1 @@
-/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786512,786514,786582-786583,786638,786647,786850,787200,787269,787277-787279,787290-787291,787305,787323,787366,787849,788030,788060,788187,788444,788451,788703,788752,788774,788819-788820,789013,789371,789387,789420,789527-789530,789704-789705,789788,789811,789896-789901,790074,790094,790134,790188,790294,790553,790637-790644,790868,791301,791354,791538,791753,791947,792007,792096,792183,792261-792265,792271,792604,792683-792685,792975,792985,793059,793570,794297,794396,794680,794728,794771,794778-794780,794892,795044,795104,795160,795583,795907,796022-796023,796352,796593,796741,796780,796994-796997,797117,797159,797192,797194,797231-797233,797442,797505
+/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786512,786514,786582-786583,786638,786647,786850,787200,787269,787277-787279,787290-787291,787305,787323,787366,787849,788030,788060,788187,788444,788451,788703,788752,788774,788819-788820,789013,789371,789387,789420,789527-789530,789704-789705,789788,789811,789896-789901,790074,790094,790134,790188,790294,790553,790637-790644,790868,791301,791354,791538,791753,791947,792007,792096,792183,792261-792265,792271,792604,792683-792685,792975,792985,793059,793570,794297,794396,794680,794728,794771,794778-794780,794892,795044,795104,795160,795583,795907,796022-796023,796352,796593,796741,796780,796994-796997,797117,797159,797192,797194,797231-797233,797442,797505,797517

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/integration/jca/src/main/java/org/apache/cxf/jca/outbound/ManagedConnectionImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/integration/jca/src/main/java/org/apache/cxf/jca/outbound/ManagedConnectionImpl.java?rev=797522&r1=797521&r2=797522&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/integration/jca/src/main/java/org/apache/cxf/jca/outbound/ManagedConnectionImpl.java
(original)
+++ cxf/branches/2.2.x-fixes/integration/jca/src/main/java/org/apache/cxf/jca/outbound/ManagedConnectionImpl.java
Fri Jul 24 15:18:55 2009
@@ -346,9 +346,22 @@
                 LOG.finest("invoke connection spec:" + spec + " method=" + method);
             }
             
-            if ("hashCode".equals(method.getName()) || "equals".equals(method.getName()))
{
+            if ("hashCode".equals(method.getName())) {
                 return method.invoke(Proxy.getInvocationHandler(proxy), args);
-                
+            }
+            
+            if ("equals".equals(method.getName())) {
+                // These are proxies.  We don't really care if their targets are equal.
+                // We do care if these are the same proxy instances that we created.  
+                // Therefore, if their proxy and invocation handler are consistent, 
+                // we believe they are equal.
+                boolean result = false;
+                try {
+                    result = proxy == args[0] && this == Proxy.getInvocationHandler(args[0]);
+                } catch (Exception e) {
+                    // ignore and assume not equal
+                }      
+                return result;
             }
             
             if ("toString".equals(method.getName())) {
@@ -383,15 +396,13 @@
         private Object handleCloseMethod(Object proxy, Method method,
                 Object[] args) {
             
+
             handles.remove(proxy);
             associatedHandle = null;
-            if (handles.isEmpty()) {
-                isClosed = true;
-                ConnectionEvent event = new ConnectionEvent(ManagedConnectionImpl.this,
-                        ConnectionEvent.CONNECTION_CLOSED);
-                event.setConnectionHandle(proxy);
-                sendEvent(event);
-            }
+            ConnectionEvent event = new ConnectionEvent(ManagedConnectionImpl.this,
+                    ConnectionEvent.CONNECTION_CLOSED);
+            event.setConnectionHandle(proxy);
+            sendEvent(event);
             
             return null;
         }



Mime
View raw message