Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Deploy CXF-JCA RAR.

cxf-integration-jca module has implemented the JCA1.5 outbound connection. You can see samples in $CXF_HOME/samples/integration/jca.

Table of Contents
indent20px
styledisc

Build CXF-JCA RAR

The jca rar package structure would be:

No Format
    |---META-INF
    |---META-INF/ra.xml
    |---cxf-api-2.1-incubator.jar
    |---cxf-integration-jca-2.1-incubator.jar
    |---.....
    

Refer to this build.xml "generate.rar" target for building rar detail.

Deploy RAR to JBOSS.

Deploy the standalone RAR.

(Note: This has been tested against JBoss4.0.5)

...

You can refer to jca sample's README for detail.

Deploy the RAR in EAR.

(Note: This has been tested against JBoss4.0.5 and JBoss4.2.1)

...

    • For the JBoss4.0.5, Need to put the geronimo-ws-metadata_2.0_spec-1.1.1.jar in the $JBOSS_HOME/lib/endorsed folder.
      Make sure the cxf.rar library does not contain xml-apis.jar and xml-resolver.jar.
    • For the JBoss4.2.1, Doesn't need to put any jars in the endorsed folder, but need to make sure cxf.rar library
      does not contain xml-api.jar.

Deploy RAR to Weblogic

...

.

(Note: this has been tested against WebLogic9.1)

Package RAR in an EAR.

  • Add a weblogic-ra.xml in the META-INF folder.
    Code Block
    xml
    xml
    
    <weblogic-connector xmlns="http://www.bea.com/ns/weblogic/90">
        <outbound-resource-adapter>
            <connection-definition-group>
    	   <connection-factory-interface>org.apache.cxf.connector.CXFConnectionFactory</connection-factory-interface>
               <connection-instance>    
    		<jndi-name>CXFConnector</jndi-name>
               </connection-instance>
            </connection-definition-group>
        </outbound-resource-adapter>
    </weblogic-connector>
    
  • Package the RAR in an EAR with application.xml.
  • Put the geronimo-ws-metadata_2.0_spec-1.1.1.jar in the $WebLogic_HOME/$JDK_Home/jre/lib/endorsed

Deploy RAR to WebSphere.

TBD

Using JCA Connection.

Get Connection from ManagedConnectionFactory.

Below is the code snippet to get the Connection.

...

Code Block
java
java

        CXFConnectionRequestInfo requestInfo = new CXFConnectionRequestInfo();
        requestInfo.setInterface(Greeter.class);
        requestInfo.setAddress("http://localhost:9000/SoapContext/SoapPort");
        
        ManagedConnectionFactory factory = new ManagedConnectionFactoryImpl();
        ManagedConnection mc = factory.createManagedConnection(null, requestInfo);
        Object client = mc.getConnection(null, requestInfo);

Using CXF-JCA RAR to access the Stateless Session Bean.

By using cxf-jca RAR, the EIS is able to access the Stateless Session Bean by CXF Interal API or JAXWS API.
If you want to deploy the Stateless Session Bean, you need to modify the ejb_servant.properties file.

Activate the ejb_servant.properties file.

Code Block
xml
xml
# Format: 
# jndi_name={namespace}ServiceName@url_to_swdl
#   
# jndi_name: The JNDI name that an external client uses to contact the bean.
# ServiceName: The string form of the QName for the Artix service in the WSDL file.
# @url_to_wsdl: The string form of a URL that identifies the WSDL file.
#
# Example:
# GreeterBean={http://apache.org/hello_world_soap_http}Greeter@file:c:/wsdl/hello_world.wsdl

...