Starting from WSO2 AS 5.3.0, AS supports JavaEE Java EE 6 Web Profile. This support is provided using Apache TomEE, which is a project developed at Apache Software Foundation, and is a Java EE 6 Web Profile certified stack. With the JavaeeJava EE runtime environment, you can now deploy Javaee Java EE web applications (that uses Apache TomEE) in WSO2 AS.
The following configurations should be in place in order to use this feature:
|Table of Contents|
Enabling the JavaEE Java EE runtime
WSO2 leverages a concept called runtime environments to maintain separate runtimes. You can enable the following runtime environments in WSO2 AS: Carbon, Tomcat, CXF and JavaeeJava EE. See the topic on configuring runtime environments for more descriptive information. Shown below is the configuration to specify 'Javaee' as the runtime environment.
- Open the
webapp-classloading.xmlfile stored in the META-INF folder of your web application. This folder should be created inside the
src/main/webappfolder of your web app. For example, check the
webapp-classloading.xmlfile of a sample web application (javaee-examples) stored in the
Enter the following class loading details to enable the Javaee Java EE runtime:
Code Block language html/xml
<Classloading xmlns="http://wso2.org/projects/as/classloading"> <Environments>Javaee</Environments> </Classloading>
You can add other runtimes , in addition to JavaeeJava EE, by entering a comma separated list for the
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 below.
The following configurations are required if the Javaee Java EE runtime is enabled for your AS as explained above. There are two Apache TomEE configurations:
Setting the default Tomee TomEE configurations:
tomee.xmlfile located in the
In this file, you can configure the Datasources, Resources etc. See the following example where the "myDerbyDatasource" datasource is configured as a resource.
<Resource id="myDerbyDatasource" type="DataSource" classpath="/path/to/driver.jar"> . . . . <Resource>
See the documentation on Apache TomEE configurations for more examples on how to configure the
Setting the jvm system properties that will be used by TomEE:
system.propertiesfile located in the
Update the required properties. For a comprehensive list of system properties, see http://tomee.apache.org/properties-listing.html.