cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r468314 - in /incubator/cxf/trunk/jca/src: main/java/org/apache/cxf/jca/cxf/ main/java/org/apache/cxf/jca/cxf/handlers/ test/java/org/apache/cxf/jca/cxf/ test/java/org/apache/cxf/jca/cxf/handlers/
Date Fri, 27 Oct 2006 08:23:26 GMT
Author: ningjiang
Date: Fri Oct 27 01:23:25 2006
New Revision: 468314

URL: http://svn.apache.org/viewvc?view=rev&rev=468314
Log:
fixed last commit error

Modified:
    incubator/cxf/trunk/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java
    incubator/cxf/trunk/jca/src/main/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandler.java
    incubator/cxf/trunk/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionFactoryImplTest.java
    incubator/cxf/trunk/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionTestBase.java
    incubator/cxf/trunk/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandlerTest.java

Modified: incubator/cxf/trunk/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java?view=diff&rev=468314&r1=468313&r2=468314
==============================================================================
--- incubator/cxf/trunk/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java
(original)
+++ incubator/cxf/trunk/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java
Fri Oct 27 01:23:25 2006
@@ -162,7 +162,7 @@
                 obj = service.getPort(arReqInfo.getPortQName(), arReqInfo.getInterface());
             } else {
                 obj = service.getPort(arReqInfo.getInterface());
-                //obj = bus.createClient(wsdlLocationUrl, serviceName, arReqInfo.getInterface());
+                
             }
 
             setSubject(subject);

Modified: incubator/cxf/trunk/jca/src/main/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/jca/src/main/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandler.java?view=diff&rev=468314&r1=468313&r2=468314
==============================================================================
--- incubator/cxf/trunk/jca/src/main/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandler.java
(original)
+++ incubator/cxf/trunk/jca/src/main/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandler.java
Fri Oct 27 01:23:25 2006
@@ -22,10 +22,10 @@
 import java.lang.reflect.Method;
 import java.util.logging.Logger;
 
-//import org.apache.cxf.Bus;
+
+import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactoryHelper;
 import org.apache.cxf.jca.cxf.CXFInvocationHandlerData;
-//import org.apache.cxf.jca.cxf.ManagedConnectionFactoryImpl;
 import org.apache.cxf.jca.cxf.ManagedConnectionFactoryImpl;
 
 /**
@@ -50,7 +50,8 @@
         Object o = getData().getManagedConnection().getManagedConnectionFactory();
         ManagedConnectionFactoryImpl mcf = (ManagedConnectionFactoryImpl)o;
         //NOTE reset the inited bus to current ,so CXF-rt can play with JCA setup bus
-        BusFactoryHelper.newInstance().setDefaultBus(mcf.getBus());        
+        Bus bus = mcf.getBus();        
+        BusFactoryHelper.newInstance().setDefaultBus(bus);        
         return invokeNext(proxy, method, args);
     }
 }

Modified: incubator/cxf/trunk/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionFactoryImplTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionFactoryImplTest.java?view=diff&rev=468314&r1=468313&r2=468314
==============================================================================
--- incubator/cxf/trunk/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionFactoryImplTest.java
(original)
+++ incubator/cxf/trunk/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionFactoryImplTest.java
Fri Oct 27 01:23:25 2006
@@ -193,11 +193,9 @@
 
     
         Subject subj = new Subject();
-        BusFactory bf = BusFactoryHelper.newInstance();
-
-        //        Bus bus = Bus.init();
-        Bus bus = bf.getDefaultBus();
-        
+        BusFactory bf = BusFactoryHelper.newInstance();        
+        Bus bus = bf.createBus();
+        bf.setDefaultBus(bus);
         ManagedConnectionFactoryImpl factory = EasyMock.createMock(ManagedConnectionFactoryImpl.class);
         factory.getBus();
         // In ManagedConnectionImpl:

Modified: incubator/cxf/trunk/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionTestBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionTestBase.java?view=diff&rev=468314&r1=468313&r2=468314
==============================================================================
--- incubator/cxf/trunk/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionTestBase.java
(original)
+++ incubator/cxf/trunk/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionTestBase.java
Fri Oct 27 01:23:25 2006
@@ -49,8 +49,8 @@
     protected ManagedConnectionFactoryImpl factory = 
         EasyMock.createMock(ManagedConnectionFactoryImpl.class);
 
-    protected Bus mockBus;
-    //EasyMock.createMock(Bus.class);
+    protected Bus bus;
+    
 
     protected ConnectionEventListener mockListener = 
         EasyMock.createMock(ConnectionEventListener.class);
@@ -78,14 +78,15 @@
         cri2 = new CXFConnectionRequestInfo(Greeter.class, wsdl, serviceName2, portName2);
         
         BusFactory bf = BusFactoryHelper.newInstance();
-        mockBus = bf.getDefaultBus();
+        bus = bf.createBus();
+        bf.setDefaultBus(bus);
         
         
         EasyMock.reset(factory); 
         
         factory.getBus();
         
-        EasyMock.expectLastCall().andReturn(mockBus).anyTimes();
+        EasyMock.expectLastCall().andReturn(bus).anyTimes();
         EasyMock.replay(factory);
         
         

Modified: incubator/cxf/trunk/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandlerTest.java?view=diff&rev=468314&r1=468313&r2=468314
==============================================================================
--- incubator/cxf/trunk/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandlerTest.java
(original)
+++ incubator/cxf/trunk/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandlerTest.java
Fri Oct 27 01:23:25 2006
@@ -57,15 +57,16 @@
 
    
     public void testInvokeSetsBusCurrent() throws Throwable {
+        BusFactory bf = BusFactoryHelper.newInstance();
+        Bus oldBus = bf.getDefaultBus();
         
         testObject.invoke(target, testMethod, new Object[] {});
 
-        BusFactory bf = BusFactoryHelper.newInstance();
-        Bus b = bf.getDefaultBus();
+        Bus  newBus = bf.getDefaultBus();
        
-        assertSame("Current Bus has been set and is as expected, val=" + b, b, mockBus);
-         // set back the JVM current local variable
-        bf.setDefaultBus(null);
+        assertSame("Current Bus has been set and is as expected, val=" + newBus, newBus,
mockBus);
+         // set back the JVM current local variable        
+        bf.setDefaultBus(oldBus);
     }
 
     public static Test suite() {



Mime
View raw message