Versions Compared

Key

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

WSO2 AS leverages a concept called runtime environments to separately maintain different runtimes for loading the relevant classes for your web applications. The WSO2 web application management feature provides the capability to load classes from different locations to your applications.

Info

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. With the Javaee runtime environment, you can now deploy Javaee web applications (that uses Apache TomEE) in WSO2 AS.

Most web applications that are deployed in production environments depend on external, third-party libraries for different functionality. Through the WSO2 Application Server's runtime environment, you can control class loading per server or application. The following runtimes that are available with WSO2 AS are sufficient for most users, but you can also define your own runtimes. There are four default runtime environments available in AS 5.3.0, which are as follows:

...

To configure class loading, you should add the class loading configuration in a file named webapp-classloading.xml and place it in the META-INF directory folder of a web application. This folder should be created inside the src/main/webapp folder of you web application. All  All the artifacts related to a web application are saved in the following directory: <PRODUCT_HOME>/repository/deployment/server/<Web_Application_Type>/<Web_Application_Name>. For example: <PRODUCT_HOME>/repository/deployment/server/webapps/SampleApp.

...

  • 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>
  • You might want to access some Carbon features in a CXF application. To achieve this, specify a comma-separated list of environments in the webapp-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>
  • From AS 5.3.0 onwards, JavaEE6 Java EE 6 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 Java EE 6 Web Profile for detailed step-by-step instructions on how to configure the JavaEE 6 runtimeconfiguring the Java EE runtime.

Extending the runtime environments

...