Jboss-web.xml configuration instructions
Jbosswebxmlcache
In the JBoss web project, in order to use some of the features provided by the container, you need to use the jboss-web.xml for configuration. The following is an example of a configured jboss-web.xml.
XML Code
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd"> <jboss-web> <!-- For load class independently --> <class-loading java2ClassLoadingCompliance='true'> <loader-repository> com.example:archive=unique-archive-name <loader-repository-config> java2ParentDelegaton=true </loader-repository-config> </loader-repository> </class-loading> <!-- For context --> <context-root>test</context-root> <!-- For session copy --> <replication-config> <cache-name>standard-session-cache</cache-name> </replication-config> <!-- For session time --> <max-active-sessions>20</max-active-sessions> <passivation-config> <use-session-passivation>true</use-session-passivation> <passivation-min-idle-time>60</passivation-min-idle-time> <passivation-max-idle-time>600</passivation-max-idle-time> </passivation-config> </jboss-web>
<! Doctype JBoss-web public "-// JBoss // DTD web application 5.0 //" http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd "> <JBoss-web> <! -- For Load class independently --> <class-loading java2classloadingcompliance = 'true'> <loader-repository> com. example: archive = unique-archive-name <loader-repository-config> java2parentdelegaton = true </loader-repository-config> </loader-repository> </class-loading> <! -- For context --> <context-root> test </context-root> <! -- For session copy --> <replication-config> <cache-Name> standard-session-Cache </cache-Name> </replication-config> <! -- For session time --> <max-active-sessions> 20 </max-active-sessions> <passivation-config> <use-session-passivation> true </use-session -passivation> <passivation-Min-idle-time> 60 </passivation-Min-idle-time> <passivation-max-idle-time> 600 </passivation-max-idle -Time> </passivation-config> </JBoss-web>
<Class-loading> it is used to configure JBoss class loader to avoid class loading conflicts.
<Context-root> Configure the actual directory used by the website
<Replication-config> set the cluster session replication function.
<Max-active-sessions> <passivation-config> is used to set the cluster session Activation Control.