You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ni...@apache.org on 2007/09/20 11:17:25 UTC

svn commit: r577649 - in /incubator/cxf/trunk/integration/jca/src: main/java/org/apache/cxf/jca/core/resourceadapter/ main/java/org/apache/cxf/jca/cxf/ main/java/org/apache/cxf/jca/cxf/handlers/ test/java/org/apache/cxf/jca/cxf/

Author: ningjiang
Date: Thu Sep 20 02:17:24 2007
New Revision: 577649

URL: http://svn.apache.org/viewvc?rev=577649&view=rev
Log:
CXF-1045 applied the patch of JCA, thaks Jeff

Modified:
    incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionFactoryImpl.java
    incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionImpl.java
    incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/Handler.java
    incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImpl.java
    incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/CXFInvocationHandler.java
    incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ConnectionFactoryImpl.java
    incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/JCABusFactory.java
    incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionFactoryImpl.java
    incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java
    incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ResourceAdapterImpl.java
    incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/handlers/CXFInvocationHandlerBase.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/JCABusFactoryTest.java

Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionFactoryImpl.java?rev=577649&r1=577648&r2=577649&view=diff
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionFactoryImpl.java (original)
+++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionFactoryImpl.java Thu Sep 20 02:17:24 2007
@@ -100,18 +100,12 @@
         boolean result = false;
         final ConnectionRequestInfo canditate = canditateConn.getConnectionRequestInfo();
 
-        if (canditate.equals(crInfo)) {
-            LOG.fine("found match canditate=" + canditate + ", info=" + crInfo);
-            LOG.fine("Checking Subjects Match " + subject + " " + canditateConn.getSubject());
-
-            if ((subject == null) 
-                || (subject.equals(((AbstractManagedConnectionImpl)canditateConn).getSubject()))) {
-                try {
-                    validateReference(canditateConn, subject);
-                    result = true; 
-                } catch (Exception thrown) {
-                    result = false;
-                }
+        if (canditate.equals(crInfo) && (subject == null || subject.equals(canditateConn.getSubject()))) {
+            try {
+                validateReference(canditateConn, subject);
+                result = true; 
+            } catch (Exception thrown) {
+                result = false;
             }
         }
 

Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionImpl.java?rev=577649&r1=577648&r2=577649&view=diff
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionImpl.java (original)
+++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionImpl.java Thu Sep 20 02:17:24 2007
@@ -76,7 +76,6 @@
         LOG.fine("closing handle: " + closingHandle);
 
         ConnectionEvent coEvent = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
-
         coEvent.setConnectionHandle(closingHandle);
         sendEvent(coEvent);
     }

Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/Handler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/Handler.java?rev=577649&r1=577648&r2=577649&view=diff
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/Handler.java (original)
+++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/Handler.java Thu Sep 20 02:17:24 2007
@@ -33,7 +33,6 @@
     private static final Logger LOG = LogUtils.getL7dLogger(Handler.class);
 
     public URLConnection openConnection(URL someUrl) {
-        LOG.fine("URL=" + someUrl);
 
         return new URLConnection(someUrl) {
             public void connect() {

Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImpl.java?rev=577649&r1=577648&r2=577649&view=diff
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImpl.java (original)
+++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImpl.java Thu Sep 20 02:17:24 2007
@@ -34,19 +34,15 @@
 public class AssociatedManagedConnectionFactoryImpl 
     extends ManagedConnectionFactoryImpl implements ResourceAdapterAssociation {
 
-    private static final Logger LOG = 
-        LogUtils.getL7dLogger(AssociatedManagedConnectionFactoryImpl.class);
+    private static final Logger LOG = LogUtils.getL7dLogger(AssociatedManagedConnectionFactoryImpl.class);
     private ResourceAdapter ra;
 
     public AssociatedManagedConnectionFactoryImpl() {
         super();
-        LOG.info("AssociatedManagedConnectionFactoryImpl constructed without props by appserver...");
     }
 
     public AssociatedManagedConnectionFactoryImpl(Properties props) {
         super(props);
-        LOG.info("AssociatedManagedConnectionFactoryImpl constructed with props by appserver."
-                 + " props = " + props);
     }
 
     public Object createConnectionFactory(ConnectionManager connMgr) throws ResourceException {
@@ -68,7 +64,11 @@
     public ResourceAdapter getResourceAdapter() {
         return ra;
     }
-
+    
+    /**
+     * If outbound-resourceAdapter and the resourceAdapter has same property,
+     * the outbound-resourceAdapter property's value would take precedence.
+     */
     protected void mergeResourceAdapterProps() {
         Properties raProps = ((ResourceAdapterImpl)ra).getPluginProps();
         Properties props = getPluginProps();
@@ -78,8 +78,7 @@
             if (!props.containsKey(key)) {
                 setProperty(key, raProps.getProperty(key));
             } else {
-                LOG.info("ManagedConnectionFactory's props already contains "
-                            + key + ". No need to merge");
+                LOG.fine("ManagedConnectionFactory's props already contains [" + key + "]. No need to merge");
             }
         }
     }
@@ -96,6 +95,7 @@
         return ((ResourceAdapterImpl)ra).getBootstrapContext();
     }
 }
+
 
 
 

Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/CXFInvocationHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/CXFInvocationHandler.java?rev=577649&r1=577648&r2=577649&view=diff
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/CXFInvocationHandler.java (original)
+++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/CXFInvocationHandler.java Thu Sep 20 02:17:24 2007
@@ -22,7 +22,8 @@
 
 public interface CXFInvocationHandler extends InvocationHandler {
 
-    void setNext(CXFInvocationHandler next); 
+    void setNext(CXFInvocationHandler next);
+    
     CXFInvocationHandler getNext(); 
 
     CXFInvocationHandlerData getData(); 

Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ConnectionFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ConnectionFactoryImpl.java?rev=577649&r1=577648&r2=577649&view=diff
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ConnectionFactoryImpl.java (original)
+++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ConnectionFactoryImpl.java Thu Sep 20 02:17:24 2007
@@ -21,7 +21,6 @@
 
 import java.io.Serializable;
 import java.net.URL;
-import java.util.logging.Logger;
 
 import javax.naming.NamingException;
 import javax.naming.Reference;
@@ -33,14 +32,12 @@
 import javax.xml.namespace.QName;
 
 
-import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.connector.CXFConnectionFactory;
 import org.apache.cxf.jca.core.resourceadapter.ResourceAdapterInternalException;
 
 public class ConnectionFactoryImpl implements CXFConnectionFactory, 
                                               Referenceable, 
                                               Serializable {
-    private static final Logger LOG = LogUtils.getL7dLogger(ConnectionFactoryImpl.class);
     private ManagedConnectionFactory managedConnectionFactory;
     private ConnectionManager connectionManager;
     private Reference reference;
@@ -48,16 +45,13 @@
     public ConnectionFactoryImpl(ManagedConnectionFactory aMCF, ConnectionManager aCM) {
         managedConnectionFactory = aMCF;
         connectionManager = aCM;
-        LOG.info("this=" + this);
     }
 
     public void setReference(Reference ref) {
-        LOG.info("Reference : " + ref + " is set");
         reference = ref;
     }
 
     public Reference getReference() throws NamingException {
-        LOG.info("Reference : " + reference + " is returned");
         return reference;
     }
     
@@ -86,9 +80,7 @@
                     "The first argument to getConnection must be an Interface",
                     new IllegalArgumentException(iface.toString() + " is not an Interface."));
         }
-
-        LOG.info("connecting to: " + iface);
-
+        
         CXFConnectionRequestInfo reqInfo = 
             new CXFConnectionRequestInfo(iface, wsdlLocation, serviceName, portName);
 
@@ -101,6 +93,7 @@
         }
     }
 }
+
 
 
 

Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/JCABusFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/JCABusFactory.java?rev=577649&r1=577648&r2=577649&view=diff
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/JCABusFactory.java (original)
+++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/JCABusFactory.java Thu Sep 20 02:17:24 2007
@@ -49,9 +49,6 @@
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
 import org.apache.cxf.BusFactory;
-import org.apache.cxf.binding.BindingFactoryManager;
-import org.apache.cxf.binding.soap.SoapBindingFactory;
-import org.apache.cxf.binding.soap.SoapTransportFactory;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.endpoint.Server;
@@ -63,12 +60,6 @@
 import org.apache.cxf.jca.core.resourceadapter.UriHandlerInit;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
-import org.apache.cxf.transport.ConduitInitiatorManager;
-import org.apache.cxf.transport.DestinationFactoryManager;
-import org.apache.cxf.transport.http.AbstractHTTPTransportFactory;
-import org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory;
-import org.apache.cxf.wsdl.WSDLManager;
-import org.apache.cxf.wsdl11.WSDLManagerImpl;
 
 
 public class JCABusFactory {
@@ -90,7 +81,7 @@
     protected String[] getBusArgs() throws ResourceException {
         //There is only setting up the BUSID        
         String busId = mcf.getConfigurationScope();
-        LOG.config("BUSid=" + busId);
+        LOG.fine("BUSid=" + busId);
 
         String busArgs[] = new String[2];
         busArgs[0] = "-BUSid";
@@ -98,56 +89,20 @@
         return busArgs;
     }
 
-    protected Bus createBus(ClassLoader loader) throws ResourceException {
+    protected Bus createCXFBus() throws ResourceException {
         try {
-            //REVISIT we need to use the CXF defualt BusFactory
-            bf = org.apache.cxf.BusFactory.newInstance(getBusClassName());
+            bf = BusFactory.newInstance();
             bus = bf.createBus();
         } catch (Exception ex) {
             throw new ResourceAdapterInternalException("Failed to initialize cxf runtime", ex);
         }
-
         return bus;
-    }
-    
-    protected void initBus() throws ResourceException {
-        //REVISIT The Bus need to be init with context for better configuration
-        try {
-            SoapBindingFactory bindingFactory = new SoapBindingFactory();
-            bus.getExtension(BindingFactoryManager.class)
-                .registerBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/", bindingFactory);
-
-            DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
-
-            SoapTransportFactory soapDF = new SoapTransportFactory();
-            soapDF.setBus(bus);
-            dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/", soapDF);
-            dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/", soapDF);
-            
-            AbstractHTTPTransportFactory httpTransport = new JettyHTTPTransportFactory();
-            dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/http", httpTransport);
-            //dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/http", httpTransport);
-            //dfm.registerDestinationFactory("http://cxf.apache.org/bindings/xformat", httpTransport);
-
-            ConduitInitiatorManager extension = bus.getExtension(ConduitInitiatorManager.class);
-            //extension.registerConduitInitiator(LocalTransportFactory.TRANSPORT_ID, httpTransport);
-            extension.registerConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/http", httpTransport);
-            extension.registerConduitInitiator("http://schemas.xmlsoap.org/http/http", httpTransport);
-            //extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/", httpTransport);
-            
-            bus.setExtension(new WSDLManagerImpl(), WSDLManager.class);
-
-        } catch (Exception ex) {
-            throw new ResourceAdapterInternalException("Failed to initialize cxf runtime", ex);
-        }
-    }
-    
-
+    }    
     
     protected synchronized void init() throws ResourceException {
-        LOG.config("initialising... the bus");
+        LOG.info("Initializing the CXF BUS....");
+        
         new UriHandlerInit();
-
         ClassLoader original = Thread.currentThread().getContextClassLoader();
         try {
             ClassLoader cl = this.getClass().getClassLoader();
@@ -158,10 +113,8 @@
             //TODO Check for the managed connection factory properties
             //TODO We may need get the configuration file from properties 
             //mcf.validateProperties();     
-            bus = createBus(cl);
-            initBus();
-            
-            initialiseServants();
+            bus = createCXFBus();
+            initializeServants();
         } catch (Exception ex) {
             if (ex instanceof ResourceAdapterInternalException) {
                 throw (ResourceException)ex;
@@ -175,7 +128,7 @@
     }
 
     
-    void initialiseServants() throws ResourceException {
+    void initializeServants() throws ResourceException {
         if (isMonitorEJBServicePropertiesEnabled()) {            
             LOG.info("ejb service properties update enabled. ");
             startPropertiesMonitorThread();
@@ -203,14 +156,14 @@
 
         deregisterServants(bus);
 
-        LOG.config("Initialising EJB endpoints...");
+        LOG.info("Initialising EJB endpoints...");
        
         Enumeration keys = ejbServants.keys();
 
         while (keys.hasMoreElements()) {
             String jndiName = (String)keys.nextElement();
             String serviceName = (String)ejbServants.getProperty(jndiName);
-            LOG.config("Found ejb endpoint: jndi name=" + jndiName + ", wsdl service=" + serviceName);
+            LOG.fine("Found ejb endpoint: jndi name=" + jndiName + ", wsdl service=" + serviceName);
             
             try {
                 initialiseServant(jndiName, serviceName);      
@@ -514,10 +467,6 @@
         return wloc;
     }
     
-    
-    private String getBusClassName() {
-        return System.getProperty("test.bus.class", "org.apache.cxf.bus.spring.SpringBusFactory");
-    }
 
     protected List getRegisteredServants() {
         return servantsCache;

Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionFactoryImpl.java?rev=577649&r1=577648&r2=577649&view=diff
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionFactoryImpl.java (original)
+++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionFactoryImpl.java Thu Sep 20 02:17:24 2007
@@ -125,7 +125,6 @@
                         + "the ConnectionManager argument can not be null");
         }
         init(connMgr.getClass().getClassLoader());
-        //jcaBusFactory.setAppserverClassLoader(connMgr.getClass().getClassLoader());
         LOG.fine("Setting AppServer classloader in jcaBusFactory. " + connMgr.getClass().getClassLoader());
         return new ConnectionFactoryImpl(this, connMgr);
     }
@@ -138,7 +137,6 @@
     }
 
     public void close() throws javax.resource.spi.ResourceAdapterInternalException {
-        LOG.info("close, this=" + this);
     }
 
     protected synchronized void init(ClassLoader appserverClassLoader) throws ResourceException {

Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java?rev=577649&r1=577648&r2=577649&view=diff
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java (original)
+++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java Thu Sep 20 02:17:24 2007
@@ -62,14 +62,10 @@
 
     public void associateConnection(Object arg0) throws ResourceException {
         try {           
-            CXFInvocationHandler handler = (CXFInvocationHandler)Proxy
-                .getInvocationHandler((Proxy)arg0);
+            CXFInvocationHandler handler = (CXFInvocationHandler)Proxy.getInvocationHandler((Proxy)arg0);
             Object managedConnection = handler.getData().getManagedConnection();
-            LOG.fine("previously associated managed connection: " + managedConnection.hashCode());
 
             if (managedConnection != this) {
-                LOG.fine("associate handle " + arg0 + " with  managed connection " + this
-                            + " with hashcode: " + hashCode());
                 handler.getData().setManagedConnection(this);
                 ((ManagedConnectionImpl)managedConnection).disassociateConnectionHandle(arg0);
 
@@ -98,8 +94,6 @@
 
     final void initialiseCXFService(ConnectionRequestInfo crInfo, Subject subject)
         throws ResourceException {
-        LOG.fine("initialiseCXFService, this=" + this + ", info=" + crInfo + ", subject=" + subject);
-
         this.crinfo = crInfo;
         this.subject = subject;
 
@@ -108,7 +102,6 @@
 
     public Object getConnection(Subject subject, ConnectionRequestInfo crInfo) throws ResourceException {
 
-        LOG.fine("getConnection: this=" + this + ", info=" + crInfo + ", subject=" + subject);
         Object connection = null;
 
         if (getCXFService() == null) {
@@ -130,55 +123,38 @@
         throws ResourceException {
 
         CXFConnectionRequestInfo arReqInfo = (CXFConnectionRequestInfo)crInfo;
+        
         ClassLoader orig = Thread.currentThread().getContextClassLoader();
-
-//         Bus bus = getBus();
-
-        //Thread.currentThread().setContextClassLoader(bus.getClass().getClassLoader());
-
         QName serviceName = arReqInfo.getServiceQName();
         URL wsdlLocationUrl = arReqInfo.getWsdlLocationUrl();
-        if (wsdlLocationUrl == null) { 
-            // if the wsdlLocationUrl is null, set the default wsdl
-            try {
-                Object obj = null;
-                Service service = Service.create(serviceName);
-            
-                QName port = arReqInfo.getPortQName();
-                if (port == null) {
-                    obj = service.getPort(arReqInfo.getInterface());
-                } else {
-                    obj = service.getPort(arReqInfo.getPortQName(), arReqInfo.getInterface());
-                }
-                setSubject(subject);
-                return createConnectionProxy(obj, arReqInfo, subject);
-            } catch (WebServiceException wse) {
-                throw new ResourceAdapterInternalException("Failed to create proxy client for service "
-                                                           + crInfo, wse);
-            } finally {
-//                Thread.currentThread().setContextClassLoader(orig);
-            }
-
-        }
-
+        
         try {
             Object obj = null;
-            Service service = Service.create(wsdlLocationUrl, serviceName);
-            if (arReqInfo.getPortQName() != null) {                
-                obj = service.getPort(arReqInfo.getPortQName(), arReqInfo.getInterface());
+            Service service = null;
+            if (wsdlLocationUrl == null) {    
+                service = Service.create(serviceName);
             } else {
+                service = Service.create(wsdlLocationUrl, serviceName);
+            }
+        
+            QName port = arReqInfo.getPortQName();
+            if (port == null) {
                 obj = service.getPort(arReqInfo.getInterface());
-                
+            } else {
+                obj = service.getPort(arReqInfo.getPortQName(), arReqInfo.getInterface());
             }
-
+            
             setSubject(subject);
+            
             return createConnectionProxy(obj, arReqInfo, subject);
-
         } catch (WebServiceException wse) {
-            throw new ResourceAdapterInternalException("Failed to getPort for " + crInfo, wse);
+            throw new ResourceAdapterInternalException("Failed to create proxy client for service " 
+                                                       + arReqInfo, wse);
         } finally {
             Thread.currentThread().setContextClassLoader(orig);
         }
+
+ 
     }
 
     public ManagedConnectionMetaData getMetaData() throws ResourceException {
@@ -209,7 +185,7 @@
 
         Class classes[] = {Connection.class, cri.getInterface()};
 
-        return Proxy.newProxyInstance(cri.getInterface().getClassLoader(), classes,
+        return Proxy.newProxyInstance(cri.getInterface().getClassLoader(), classes, 
                                       createInvocationHandler(obj, subject));
     }
 

Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ResourceAdapterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ResourceAdapterImpl.java?rev=577649&r1=577648&r2=577649&view=diff
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ResourceAdapterImpl.java (original)
+++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ResourceAdapterImpl.java Thu Sep 20 02:17:24 2007
@@ -35,7 +35,6 @@
 import javax.transaction.xa.XAResource;
 
 import org.apache.cxf.Bus;
-//import org.apache.cxf.BusException;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.jca.core.resourceadapter.ResourceBean;
 
@@ -47,12 +46,10 @@
    
     public ResourceAdapterImpl() {
         super();
-        LOG.fine("Resource Adapter is constructed without props");
     }
 
     public ResourceAdapterImpl(Properties props) {
         super(props);
-        LOG.fine("Resource Adapter is constructed with props");
     }
     
     public void registerBus(Bus bus) {
@@ -79,26 +76,11 @@
     public void stop() {
         LOG.fine("Resource Adapter is stopping by appserver...");
         if (!busCache.isEmpty()) {
-
             Iterator busIterator = busCache.iterator();
             Bus bus = null;
-//             int busCounter = 0;
-
             while (busIterator.hasNext()) {
-
-//                 busCounter++;
                 bus = (Bus)busIterator.next();
-
-//                 try {
-//                     if (bus != null) {
                 bus.shutdown(true);
-//                         LOG.fine("Number " + busCounter + " Bus: " + bus + " has been shut down");
-//                     } else {
-//                         LOG.fine("Number " + busCounter + " Bus is null");
-//                     }
-//                 } catch (BusException be) {
-//                     LOG.fine("Failed to shutdown bus when stop ResourceAdapter, reason: " + be);
-//                 }
             }
         }   
     }
@@ -120,6 +102,7 @@
         return ctx;
     }
 }
+
 
 
 

Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/handlers/CXFInvocationHandlerBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/handlers/CXFInvocationHandlerBase.java?rev=577649&r1=577648&r2=577649&view=diff
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/handlers/CXFInvocationHandlerBase.java (original)
+++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/handlers/CXFInvocationHandlerBase.java Thu Sep 20 02:17:24 2007
@@ -75,7 +75,6 @@
             //get the exception when call the method
             RuntimeException re = new RuntimeException("Unexpected exception from method " + targetMethod,
                                                       targetException);
-            LOG.info(re.toString());
             ret = re;
         }
         return ret;

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/JCABusFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/JCABusFactoryTest.java?rev=577649&r1=577648&r2=577649&view=diff
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/JCABusFactoryTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/JCABusFactoryTest.java Thu Sep 20 02:17:24 2007
@@ -295,7 +295,7 @@
         try {
             Bus mockBus = EasyMock.createMock(Bus.class);
             jcaBusFactory.setBus(mockBus);
-            jcaBusFactory.initialiseServants();
+            jcaBusFactory.initializeServants();
             fail("exception expected");
         } catch (ResourceAdapterInternalException re) {
             assertTrue("EJBServiceProperties is not set.", re.getMessage()
@@ -314,7 +314,7 @@
         Bus mockBus = EasyMock.createMock(Bus.class);
 
         jcaBusFactory.setBus((Bus)mockBus);
-        jcaBusFactory.initialiseServants();
+        jcaBusFactory.initializeServants();
         
     }
     
@@ -324,7 +324,6 @@
         
         JCABusFactory jcaBusFactory = new JCABusFactory(null);
         jcaBusFactory.setBus(springBus);
-        jcaBusFactory.initBus();
         
         ReflectionServiceFactoryBean bean = new JaxWsServiceFactoryBean();
         Service service = jcaBusFactory.createService(HelloInterface.class, bean);
@@ -363,7 +362,6 @@
         
         JCABusFactory jcaBusFactory = new JCABusFactory(null);
         jcaBusFactory.setBus(bus);
-        jcaBusFactory.initBus();
         
         ReflectionServiceFactoryBean bean = new JaxWsServiceFactoryBean();
         Service service = jcaBusFactory.createService(HelloInterface.class, bean);



Re: svn commit: r577649 - in /incubator/cxf/trunk/integration/jca/src: main/java/org/apache/cxf/jca/core/resourceadapter/ main/java/org/apache/cxf/jca/cxf/ main/java/org/apache/cxf/jca/cxf/handlers/ test/java/org/apache/cxf/jca/cxf/

Posted by Willem Jiang <ni...@iona.com>.
Hi Glen ,

Thanks for pointing me out the errors,
I will fix them with my next commit.

Willem.

Glen Mazza wrote:
> Am Donnerstag, den 20.09.2007, 09:17 +0000 schrieb ningjiang@apache.org:
>   
>> Author: ningjiang
>> Date: Thu Sep 20 02:17:24 2007
>> New Revision: 577649
>>     
>
>   
>> Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionFactoryImpl.java
>> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionFactoryImpl.java?rev=577649&r1=577648&r2=577649&view=diff
>> ==============================================================================
>> --- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionFactoryImpl.java (original)
>> +++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionFactoryImpl.java Thu Sep 20 02:17:24 2007
>> @@ -100,18 +100,12 @@
>>          boolean result = false;
>>          final ConnectionRequestInfo canditate = canditateConn.getConnectionRequestInfo();
>>     
>
> candidate
>
>   
>> -        if (canditate.equals(crInfo)) {
>> -            LOG.fine("found match canditate=" + canditate + ", info=" + crInfo);
>>     
>
> (again)
>
>
>   
>> +        if (canditate.equals(crInfo) && (subject == null || subject.equals(canditateConn.getSubject()))) {
>>     
>
> (subject != null && subject.equals(canditateConn.getSubject()) instead?
> (I'm not sure if you want to call validateReference() below if the
> subject is null)
>
>
>   
>> +            try {
>> +                validateReference(canditateConn, subject);
>> +                result = true; 
>> +            } catch (Exception thrown) {
>> +                result = false;
>>              }
>>          }
>>  
>>
>> Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionImpl.java
>> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionImpl.java?rev=577649&r1=577648&r2=577649&view=diff
>> ==============================================================================
>> --- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionImpl.java (original)
>> +++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionImpl.java Thu Sep 20 02:17:24 2007
>> @@ -76,7 +76,6 @@
>>          LOG.fine("closing handle: " + closingHandle);
>>     
>
> "Closing handle: " (I would recommend capitalizing the first letter of
> each logging statement)
>
>
>   
>> Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImpl.java
>> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImpl.java?rev=577649&r1=577648&r2=577649&view=diff
>> ==============================================================================
>> --- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImpl.java (original)
>> +++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImpl.java Thu Sep 20 02:17:24 2007
>> @@ -34,19 +34,15 @@
>>  public class AssociatedManagedConnectionFactoryImpl 
>>      extends ManagedConnectionFactoryImpl implements ResourceAdapterAssociation {
>>  
>>              if (!props.containsKey(key)) {
>>                  setProperty(key, raProps.getProperty(key));
>>              } else {
>> -                LOG.info("ManagedConnectionFactory's props already contains "
>> -                            + key + ". No need to merge");
>> +                LOG.fine("ManagedConnectionFactory's props already contains [" + key + "]. No need to merge");
>>     
>
> "already contain"
>
>
>   
>>              }
>>          }
>>      }
>> @@ -96,6 +95,7 @@
>>          return ((ResourceAdapterImpl)ra).getBootstrapContext();
>>      }
>>  }
>> +
>>  
>>
>>
>>
>> Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/JCABusFactory.java
>> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/JCABusFactory.java?rev=577649&r1=577648&r2=577649&view=diff
>> ==============================================================================
>> --- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/JCABusFactory.java (original)
>> +++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/JCABusFactory.java Thu Sep 20 02:17:24 2007
>> @@ -49,9 +49,6 @@
>> +    }    
>>      
>>      protected synchronized void init() throws ResourceException {
>> -        LOG.config("initialising... the bus");
>> +        LOG.info("Initializing the CXF BUS....");
>>     
>
> Should be "bus" (or "Bus") (else people may think BUS is an acronym)
>
>
>   
>> +        
>>          new UriHandlerInit();
>> -
>>          ClassLoader original = Thread.currentThread().getContextClassLoader();
>>          try {
>>              ClassLoader cl = this.getClass().getClassLoader();
>> @@ -158,10 +113,8 @@
>>              //TODO Check for the managed connection factory properties
>>              //TODO We may need get the configuration file from properties 
>>              //mcf.validateProperties();     
>> -            bus = createBus(cl);
>> -            initBus();
>> -            
>> -            initialiseServants();
>> +            initializeServants();
>>     
>
> Good!
>
>
>   
>>          deregisterServants(bus);
>>  
>> -        LOG.config("Initialising EJB endpoints...");
>> +        LOG.info("Initialising EJB endpoints...");
>>     
>
> Bad!
>
>
>   
>>              
>>              try {
>>                  initialiseServant(jndiName, serviceName);      
>>     
>
> Bad!
>
>
>   
>> Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ResourceAdapterImpl.java
>> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ResourceAdapterImpl.java?rev=577649&r1=577648&r2=577649&view=diff
>> ==============================================================================
>> --- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ResourceAdapterImpl.java (original)
>> +++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ResourceAdapterImpl.java Thu Sep 20 02:17:24 2007
>> @@ -35,7 +35,6 @@
>>      public void registerBus(Bus bus) {
>> @@ -79,26 +76,11 @@
>>      public void stop() {
>>          LOG.fine("Resource Adapter is stopping by appserver...");
>>     
>
> ("stopping by" means to visit)
> better options:
> "Resource Adapter is being stopped by appserver..."  
> "Resource Adapter is being terminated by appserver..."  
> "Appserver is stopping Resource Adapter..."
> "Appserver is terminating Resource Adapter..."
>
>
> Regards,
> Glen
>
>
>   

Re: svn commit: r577649 - in /incubator/cxf/trunk/integration/jca/src: main/java/org/apache/cxf/jca/core/resourceadapter/ main/java/org/apache/cxf/jca/cxf/ main/java/org/apache/cxf/jca/cxf/handlers/ test/java/org/apache/cxf/jca/cxf/

Posted by "Jeff.Yu" <je...@iona.com>.
Thanks for your comments. I will update below typo in next patch.

> +        if (canditate.equals(crInfo) && (subject == null || subject.equals(canditateConn.getSubject()))) {
>   

(subject != null && subject.equals(canditateConn.getSubject()) instead?
(I'm not sure if you want to call validateReference() below if the
subject is null)


Yes, we need call validateReference() when subject is null. If subject is null, it means in non-managed app server.


Thanks
Jeff


Glen Mazza wrote:
> Am Donnerstag, den 20.09.2007, 09:17 +0000 schrieb ningjiang@apache.org:
>   
>> Author: ningjiang
>> Date: Thu Sep 20 02:17:24 2007
>> New Revision: 577649
>>     
>
>   
>> Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionFactoryImpl.java
>> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionFactoryImpl.java?rev=577649&r1=577648&r2=577649&view=diff
>> ==============================================================================
>> --- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionFactoryImpl.java (original)
>> +++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionFactoryImpl.java Thu Sep 20 02:17:24 2007
>> @@ -100,18 +100,12 @@
>>          boolean result = false;
>>          final ConnectionRequestInfo canditate = canditateConn.getConnectionRequestInfo();
>>     
>
> candidate
>
>   
>> -        if (canditate.equals(crInfo)) {
>> -            LOG.fine("found match canditate=" + canditate + ", info=" + crInfo);
>>     
>
> (again)
>
>
>   
>> +        if (canditate.equals(crInfo) && (subject == null || subject.equals(canditateConn.getSubject()))) {
>>     
>
> (subject != null && subject.equals(canditateConn.getSubject()) instead?
> (I'm not sure if you want to call validateReference() below if the
> subject is null)
>
>
>   
>> +            try {
>> +                validateReference(canditateConn, subject);
>> +                result = true; 
>> +            } catch (Exception thrown) {
>> +                result = false;
>>              }
>>          }
>>  
>>
>> Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionImpl.java
>> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionImpl.java?rev=577649&r1=577648&r2=577649&view=diff
>> ==============================================================================
>> --- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionImpl.java (original)
>> +++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionImpl.java Thu Sep 20 02:17:24 2007
>> @@ -76,7 +76,6 @@
>>          LOG.fine("closing handle: " + closingHandle);
>>     
>
> "Closing handle: " (I would recommend capitalizing the first letter of
> each logging statement)
>
>
>   
>> Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImpl.java
>> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImpl.java?rev=577649&r1=577648&r2=577649&view=diff
>> ==============================================================================
>> --- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImpl.java (original)
>> +++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImpl.java Thu Sep 20 02:17:24 2007
>> @@ -34,19 +34,15 @@
>>  public class AssociatedManagedConnectionFactoryImpl 
>>      extends ManagedConnectionFactoryImpl implements ResourceAdapterAssociation {
>>  
>>              if (!props.containsKey(key)) {
>>                  setProperty(key, raProps.getProperty(key));
>>              } else {
>> -                LOG.info("ManagedConnectionFactory's props already contains "
>> -                            + key + ". No need to merge");
>> +                LOG.fine("ManagedConnectionFactory's props already contains [" + key + "]. No need to merge");
>>     
>
> "already contain"
>
>
>   
>>              }
>>          }
>>      }
>> @@ -96,6 +95,7 @@
>>          return ((ResourceAdapterImpl)ra).getBootstrapContext();
>>      }
>>  }
>> +
>>  
>>
>>
>>
>> Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/JCABusFactory.java
>> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/JCABusFactory.java?rev=577649&r1=577648&r2=577649&view=diff
>> ==============================================================================
>> --- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/JCABusFactory.java (original)
>> +++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/JCABusFactory.java Thu Sep 20 02:17:24 2007
>> @@ -49,9 +49,6 @@
>> +    }    
>>      
>>      protected synchronized void init() throws ResourceException {
>> -        LOG.config("initialising... the bus");
>> +        LOG.info("Initializing the CXF BUS....");
>>     
>
> Should be "bus" (or "Bus") (else people may think BUS is an acronym)
>
>
>   
>> +        
>>          new UriHandlerInit();
>> -
>>          ClassLoader original = Thread.currentThread().getContextClassLoader();
>>          try {
>>              ClassLoader cl = this.getClass().getClassLoader();
>> @@ -158,10 +113,8 @@
>>              //TODO Check for the managed connection factory properties
>>              //TODO We may need get the configuration file from properties 
>>              //mcf.validateProperties();     
>> -            bus = createBus(cl);
>> -            initBus();
>> -            
>> -            initialiseServants();
>> +            initializeServants();
>>     
>
> Good!
>
>
>   
>>          deregisterServants(bus);
>>  
>> -        LOG.config("Initialising EJB endpoints...");
>> +        LOG.info("Initialising EJB endpoints...");
>>     
>
> Bad!
>
>
>   
>>              
>>              try {
>>                  initialiseServant(jndiName, serviceName);      
>>     
>
> Bad!
>
>
>   
>> Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ResourceAdapterImpl.java
>> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ResourceAdapterImpl.java?rev=577649&r1=577648&r2=577649&view=diff
>> ==============================================================================
>> --- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ResourceAdapterImpl.java (original)
>> +++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ResourceAdapterImpl.java Thu Sep 20 02:17:24 2007
>> @@ -35,7 +35,6 @@
>>      public void registerBus(Bus bus) {
>> @@ -79,26 +76,11 @@
>>      public void stop() {
>>          LOG.fine("Resource Adapter is stopping by appserver...");
>>     
>
> ("stopping by" means to visit)
> better options:
> "Resource Adapter is being stopped by appserver..."  
> "Resource Adapter is being terminated by appserver..."  
> "Appserver is stopping Resource Adapter..."
> "Appserver is terminating Resource Adapter..."
>
>
> Regards,
> Glen
>
>
>   

Re: svn commit: r577649 - in /incubator/cxf/trunk/integration/jca/src: main/java/org/apache/cxf/jca/core/resourceadapter/ main/java/org/apache/cxf/jca/cxf/ main/java/org/apache/cxf/jca/cxf/handlers/ test/java/org/apache/cxf/jca/cxf/

Posted by Glen Mazza <gl...@verizon.net>.
Am Donnerstag, den 20.09.2007, 09:17 +0000 schrieb ningjiang@apache.org:
> Author: ningjiang
> Date: Thu Sep 20 02:17:24 2007
> New Revision: 577649

> Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionFactoryImpl.java
> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionFactoryImpl.java?rev=577649&r1=577648&r2=577649&view=diff
> ==============================================================================
> --- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionFactoryImpl.java (original)
> +++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionFactoryImpl.java Thu Sep 20 02:17:24 2007
> @@ -100,18 +100,12 @@
>          boolean result = false;
>          final ConnectionRequestInfo canditate = canditateConn.getConnectionRequestInfo();

candidate

> 
> -        if (canditate.equals(crInfo)) {
> -            LOG.fine("found match canditate=" + canditate + ", info=" + crInfo);

(again)


> +        if (canditate.equals(crInfo) && (subject == null || subject.equals(canditateConn.getSubject()))) {

(subject != null && subject.equals(canditateConn.getSubject()) instead?
(I'm not sure if you want to call validateReference() below if the
subject is null)


> +            try {
> +                validateReference(canditateConn, subject);
> +                result = true; 
> +            } catch (Exception thrown) {
> +                result = false;
>              }
>          }
>  
> 
> Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionImpl.java
> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionImpl.java?rev=577649&r1=577648&r2=577649&view=diff
> ==============================================================================
> --- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionImpl.java (original)
> +++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/resourceadapter/AbstractManagedConnectionImpl.java Thu Sep 20 02:17:24 2007
> @@ -76,7 +76,6 @@
>          LOG.fine("closing handle: " + closingHandle);

"Closing handle: " (I would recommend capitalizing the first letter of
each logging statement)


> Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImpl.java
> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImpl.java?rev=577649&r1=577648&r2=577649&view=diff
> ==============================================================================
> --- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImpl.java (original)
> +++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImpl.java Thu Sep 20 02:17:24 2007
> @@ -34,19 +34,15 @@
>  public class AssociatedManagedConnectionFactoryImpl 
>      extends ManagedConnectionFactoryImpl implements ResourceAdapterAssociation {
>  
>              if (!props.containsKey(key)) {
>                  setProperty(key, raProps.getProperty(key));
>              } else {
> -                LOG.info("ManagedConnectionFactory's props already contains "
> -                            + key + ". No need to merge");
> +                LOG.fine("ManagedConnectionFactory's props already contains [" + key + "]. No need to merge");

"already contain"


>              }
>          }
>      }
> @@ -96,6 +95,7 @@
>          return ((ResourceAdapterImpl)ra).getBootstrapContext();
>      }
>  }
> +
>  
> 
> 
> 
> Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/JCABusFactory.java
> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/JCABusFactory.java?rev=577649&r1=577648&r2=577649&view=diff
> ==============================================================================
> --- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/JCABusFactory.java (original)
> +++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/JCABusFactory.java Thu Sep 20 02:17:24 2007
> @@ -49,9 +49,6 @@
> +    }    
>      
>      protected synchronized void init() throws ResourceException {
> -        LOG.config("initialising... the bus");
> +        LOG.info("Initializing the CXF BUS....");

Should be "bus" (or "Bus") (else people may think BUS is an acronym)


> +        
>          new UriHandlerInit();
> -
>          ClassLoader original = Thread.currentThread().getContextClassLoader();
>          try {
>              ClassLoader cl = this.getClass().getClassLoader();
> @@ -158,10 +113,8 @@
>              //TODO Check for the managed connection factory properties
>              //TODO We may need get the configuration file from properties 
>              //mcf.validateProperties();     
> -            bus = createBus(cl);
> -            initBus();
> -            
> -            initialiseServants();
> +            initializeServants();

Good!


>          deregisterServants(bus);
>  
> -        LOG.config("Initialising EJB endpoints...");
> +        LOG.info("Initialising EJB endpoints...");

Bad!


>              
>              try {
>                  initialiseServant(jndiName, serviceName);      

Bad!


> Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ResourceAdapterImpl.java
> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ResourceAdapterImpl.java?rev=577649&r1=577648&r2=577649&view=diff
> ==============================================================================
> --- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ResourceAdapterImpl.java (original)
> +++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ResourceAdapterImpl.java Thu Sep 20 02:17:24 2007
> @@ -35,7 +35,6 @@
>      public void registerBus(Bus bus) {
> @@ -79,26 +76,11 @@
>      public void stop() {
>          LOG.fine("Resource Adapter is stopping by appserver...");

("stopping by" means to visit)
better options:
"Resource Adapter is being stopped by appserver..."  
"Resource Adapter is being terminated by appserver..."  
"Appserver is stopping Resource Adapter..."
"Appserver is terminating Resource Adapter..."


Regards,
Glen