PageRenderTime 81ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 0ms

/src/site/xdoc/docs/app_server.xml

http://github.com/apache/axis2-java
XML | 169 lines | 151 code | 0 blank | 18 comment | 0 complexity | 1947f5e4f46bce7de619cfd3237b3c92 MD5 | raw file
Possible License(s): Apache-2.0, MPL-2.0-no-copyleft-exception, BSD-3-Clause, CPL-1.0
  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!--
  3. ~ Licensed to the Apache Software Foundation (ASF) under one
  4. ~ or more contributor license agreements. See the NOTICE file
  5. ~ distributed with this work for additional information
  6. ~ regarding copyright ownership. The ASF licenses this file
  7. ~ to you under the Apache License, Version 2.0 (the
  8. ~ "License"); you may not use this file except in compliance
  9. ~ with the License. You may obtain a copy of the License at
  10. ~
  11. ~ http://www.apache.org/licenses/LICENSE-2.0
  12. ~
  13. ~ Unless required by applicable law or agreed to in writing,
  14. ~ software distributed under the License is distributed on an
  15. ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  16. ~ KIND, either express or implied. See the License for the
  17. ~ specific language governing permissions and limitations
  18. ~ under the License.
  19. -->
  20. <document xmlns="http://maven.apache.org/XDOC/2.0"
  21. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  22. xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
  23. <properties>
  24. <title>Application Server Specific Configuration Guide</title>
  25. </properties>
  26. <body>
  27. <h1>Application Server Specific Configuration Guide</h1>
  28. <p>This document provides configuration information required for
  29. your Application Server to run Apache Axis2 to its fullest
  30. potential.</p>
  31. <section name="WebLogic">
  32. <subsection name="Use exploded configuration to deploy Axis2 WAR">
  33. <p>We recommend using the exploded configuration to deploy Axis2
  34. WAR in WebLogic application server to support the
  35. hotupdate/ hotdeployment features in Axis2. However, if you want to
  36. deploy custom WARs, say in a clustering environment, you need to
  37. add two additional files into the WEB-INF named "services.list" and
  38. "modules.list" under the modules and services directory
  39. respectively.</p>
  40. <ul>
  41. <li><b>WEB-INF/services/services.list</b> : should list all the
  42. services (aar files) that you want to expose.</li>
  43. <li><b>WEB-INF/modules/modules.list</b> : should list all the
  44. modules (mar files) that you want to use.</li>
  45. </ul>
  46. NOTE: In both cases, please list one entry per line.
  47. <p>WebLogic ships with JARs that conflict with JARs present in
  48. Axis2. Therefore use &lt;prefer-web-inf-classes&gt; to ensure that
  49. JARs packaged in Axis2 WAR are picked up from WEB-INF/lib. You can
  50. do this by setting the &lt;prefer-web-inf-classes&gt; element in
  51. WEB-INF/weblogic.xml to true. An example of weblogic.xml is shown
  52. below:</p>
  53. <pre>
  54. &lt;weblogic-web-app&gt;
  55. &lt;container-descriptor&gt;
  56. &lt;prefer-web-inf-classes&gt;true&lt;/prefer-web-inf-classes&gt;
  57. &lt;/container-descriptor&gt;
  58. &lt;/weblogic-web-app&gt;
  59. </pre>
  60. <p>If set to true, the &lt;prefer-web-inf-classes&gt; element will
  61. force WebLogic's classloader to load classes located in the WEB-INF
  62. directory of a Web application in preference to application or
  63. system classes. This is a recommended approach since it only
  64. impacts a single Web module.</p>
  65. <p>Please refer to the following documents in WebLogic
  66. for more information:</p>
  67. <ul>
  68. <li><a href=
  69. "http://e-docs.bea.com/wls/docs81/programming/classloading.html">WebLogic
  70. ServerApplication Classloading</a>- For more information on how
  71. WebLogic's class loader works</li>
  72. <li><a href=
  73. "http://e-docs.bea.com/wls/docs81/webapp/deployment.html">Redeploying
  74. a Web Application in Exploded Directory Format</a></li>
  75. </ul>
  76. </subsection>
  77. <subsection name="Lack of namespacing on serialised items">
  78. <p>BEA WebLogic Server 9.0 comes with its own StAX implementation.
  79. This results in lack of namespacing on serialised items. In turn,
  80. WebLogic server (WLS) breaks with AXIOM on the WLS classpath. Hence
  81. a filtering classloader is required:</p>
  82. <p>Adding the following to weblogic-application.xml should resolve
  83. this issue:</p>
  84. <pre>
  85. &lt;prefer-application-packages&gt;
  86. &lt;package-name&gt;com.ctc.wstx.*&lt;/package-name&gt;
  87. &lt;package-name&gt;javax.xml.*&lt;/package-name&gt;
  88. &lt;package-name&gt;org.apache.*&lt;/package-name&gt;
  89. &lt;/prefer-application-packages&gt;
  90. </pre>
  91. <p>Note that the libraries listed--Xerces, StAX API, Woodstox--need
  92. to be on the application classpath.</p>
  93. </subsection>
  94. </section>
  95. <section name="WebSphere">
  96. <subsection name="Avoiding conflicts with WebSphere's JAX-WS runtime">
  97. <p>
  98. The JAX-WS runtime in WebSphere Application Server is based on a modified version of Axis2 and these
  99. classes are visible to application class loaders. This means that when deploying
  100. a standard version of Axis2 on WAS 7.0 (and WAS 6.1 with the Web Services feature pack installed),
  101. special configuration is required to avoid conflicts with the Axis2 classes used internally by WebSphere.
  102. In particular it is necessary to change the class loader policy of the Web module to parent last. However,
  103. this is not sufficient because Axis2 creates additional class loaders for modules and services, and
  104. these use parent first class loading by default. Therefore, two things must be done to make a standard
  105. Axis2 distribution work with WebSphere:
  106. </p>
  107. <ol>
  108. <li>
  109. Before deploying the Axis2 WAR, edit the <tt>axis2.xml</tt> file and set the
  110. <tt>EnableChildFirstClassLoading</tt> parameter to <tt>true</tt>.
  111. Please note that this parameter is only supported in Axis2 1.5.5 or higher.
  112. The parameter is already present in the default <tt>axis2.xml</tt> file included in the
  113. WAR distribution, but its value is set to <tt>false</tt>. Therefore it is enough to change
  114. the parameter value.
  115. </li>
  116. <li>
  117. After deployment, modify the application configuration to enable parent last class loading
  118. for the Web module: in the WebSphere admin console, go the the configuration page for
  119. the enterprise application, click on <em>Manage Modules</em> and locate the WAR containing
  120. Axis2 (in the default WAR distribution, the module is called <em>Apache-Axis2</em>), then
  121. change the <em>Class loader order</em> option to <em>Classes loaded with local class
  122. loader first (parent last)</em>. Note that the class loader policy for the enterprise
  123. application itself (which can be specified under <em>Class loading and update detection</em>)
  124. is irrelevant, unless a custom EAR distribution is used that includes the Axis2 libraries
  125. in the EAR instead of the WAR.
  126. </li>
  127. </ol>
  128. </subsection>
  129. <subsection name="Deploying services and modules">
  130. <p>
  131. By default (i.e. if the <em>Distribute application</em> option has not been disabled explicitly)
  132. WebSphere will deploy the application in exploded form. The standard location for these files is
  133. in the <tt>installedApps</tt> subdirectory in the WebSphere profile directory. This means that AAR
  134. and MAR files can simply be deployed by dropping them into the corresponding folders. In this
  135. scenario, hot deployment is supported and there is no need to update the <tt>services.list</tt>
  136. and <tt>modules.list</tt> files.
  137. </p>
  138. <p>
  139. However, the directory is still under control of WebSphere and manually deployed AAR and MAR files
  140. will be removed e.g. when the application is upgraded. It may therefore be a good idea to configure
  141. Axis2 to use a repository location outside of the <tt>installedApps</tt> directory.
  142. </p>
  143. </subsection>
  144. <subsection name="Deploying older Axis2 versions">
  145. <p>
  146. The instructions given above apply to Axis2 1.5.5 or higher. Older versions don't support
  147. the <tt>EnableChildFirstClassLoading</tt> parameter, and we don't provide any support for
  148. deploying these versions on WAS 6.1 (with the Web Services feature pack installed) or 7.0.
  149. However, IBM has published a <a href="https://www-304.ibm.com/support/docview.wss?uid=swg21315686">technote</a>
  150. with an alternative approach that may work for older Axis2 versions.
  151. </p>
  152. </subsection>
  153. <subsection name="Known issues">
  154. <p>
  155. On some WAS versions the following error may occur, e.g. when accessing a WSDL exposed by Axis2:
  156. </p>
  157. <pre>java.lang.VerifyError: JVMVRFY013 class loading constraint violated;
  158. class=org/apache/xerces/dom/CoreDocumentImpl, method=getDomConfig()Lorg/w3c/dom/DOMConfiguration</pre>
  159. <p>
  160. This is caused by the XmlBeans library
  161. packaged with Axis2. This library contains a set of interfaces in the <code>org.w3c.dom</code> package
  162. and this may cause issues with class loaders that don't use a simple parent-first policy.
  163. To avoid this issue, upgrade your WAS to a more recent fix pack level, remove the XmlBeans library
  164. from the Axis2 WAR or remove the content of the <code>org.w3c.dom</code> package from the XmlBeans library.
  165. </p>
  166. </subsection>
  167. </section>
  168. </body>
  169. </document>