Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Shown below is the webapp-classloading.xml file configuration to specify CXF as the runtime environment:

    Code Block
    languagehtml/xml
    <Classloading xmlns="http://wso2.org/projects/as/classloading">
       <Environments>CXF</Environments>
    </Classloading>
  • Shown below is the configuration to specify 'Javaee' as the runtime environment. The support for Javaee is provided along with Apache TomEE. If you use the Javaee runtime, then TomEE should also be configured in AS as explained here.

    Code Block
    languagehtml/xml
    <Classloading xmlns="http://wso2.org/projects/as/classloading">
       <Environments>Javaee</Environments>
    </Classloading>
  • You might want to access some Carbon features in a CXF application. To achieve this, specify a comma-separated list of environments in inwebapp-classloading.xml file. The following example specifies both CXF and Carbon as the runtime environments:

    Code Block
    languagehtml/xml
    <Classloading xmlns="http://wso2.org/projects/as/classloading">
       <Environments>Spring,Carbon</Environments>
    </Classloading>

Configuring TomEE

The following configurations are required if the Javaee runtime is enabled for your AS as explained above. There are two Apache TomEE configurations:

  • Setting the default Tomee configurations: 

    1. Open the tomee.xml file located in the <AS_HOME>/repository/conf/tomee/ directory.

    2.  In this file, you can configure the Datasources, Resources etc. See the following example where the "myDerbyDatasource" datasource is configured as a resource.

      Code Block
      <Resource id="myDerbyDatasource" type="DataSource" classpath="/path/to/driver.jar">
       . . . .
      <Resource>
    3. See the documentation on Apache TomEE configurations for more examples on how to configure the tomee.xml file.

  • Setting the jvm system properties that will be used by TomEE:

  • Open the system.properties file located in the <AS_HOME>/repository/conf/tomee/ directory. 

  • Update the required properties. For a comprehensive list of system properties, see http://tomee.apache.org/properties-listing.html

    From AS 5.3.0 onwards, JavaEE6 Web Profile support is available as a feature, which allows you to enable the Javaee runtime environment, in addition to TomcatCarbon and CXF runtime environments. See the topic on enabling JavaEE 6 Web Profile for detailed instructions on how to configure the JavaEE 6 runtime.

Extending the runtime environments

...