Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add "Deploy RAR in EAR for JBoss APP" section.

...

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

Deploy RAR to JBOSS.

...

Deploy the standalone RAR.

  1. You need to put below jars in the $JBOSS_HOME/lib/endorsed.
    • geronimo-activation_1.1_spec-1.0-M1.jar
    • geronimo-annotation_1.0_spec-1.1.jar
    • geronimo-ws-metadata_2.0_spec-1.1.1.jar
    • jaxb-api-2.1.jar
    • jaxb-impl-2.1.4.jar
    • jaxb-xjc-2.1.4.jar
    • jsr181-api-1.0-MR1.jar
    • saaj-api-1.3.jar
    • saaj-impl-1.3.jar
    • stax-api-1.0.1.jar
    • stax-utils-20060502.jar
  2. Copy the rar to the $JBOSS_HOME/server/default
  3. Create the cxfj2ee_1_5-ds.xml as below, and copy it to $JBOSS_HOME/server/default
    Code Block
    xml
    xml
    <!DOCTYPE connection-factories
        PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
        "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
    <connection-factories>
      <no-tx-connection-factory>
        <jndi-name>CXFConnector</jndi-name>
        <rar-name>cxf.rar</rar-name>
        <connection-definition>org.apache.cxf.connector.CXFConnectionFactory</connection-definition>
      </no-tx-connection-factory>
    </connection-factories>
    

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

Deploy the RAR in EAR.

  • Having application.xml
    Code Block
    xml
    xml
    
    <?xml version="1.0" encoding="UTF-8"?>
    <application>
    	<display-name>cxf-jca</display-name>
    	<module>
    		<connector>cxf.rar</connector>
    	</module>
    </application>
    
  • Having jboss-app.xml to configure the classloader.
    Code Block
    xml
    xml
    
    <?xml version="1.0" encoding="UTF-8"?>
    <jboss-app>
    	<loader-repository>
    		apache.cxf:loader=cxf.ear
    		<loader-repository-config>
    			java2ParentDelegation=false
    		</loader-repository-config>
    	</loader-repository>
    	<module>
    		<service>cxf-ds.xml</service>
    	</module>
    </jboss-app>
    
  • Having cxf-ds for jca outbound in JBoss.
    Code Block
    xml
    xml
    
     <?xml version="1.0" encoding="UTF-8"?>
    <connection-factories>
      <no-tx-connection-factory>
        <jndi-name>CXFConnector</jndi-name>
        <rar-name>cxf.ear#cxf.rar</rar-name>
        <connection-definition>org.apache.cxf.connector.CXFConnectionFactory</connection-definition>
      </no-tx-connection-factory>
    </connection-factories>
    
    Tip

    The rar name should be full name, which is ear-name#rar-name, instead of rar-name alone.

  • put the application.xml and jboss-app.xml in the META-INF folder.
  • put the cxf.rar and the cxf-ds.xml in an EAR.
    • 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.

TBD

...