alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Jetty example source code file (jboss-service.xml)

This example Jetty source code file (jboss-service.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Jetty tags/keywords

arg, call, configurationelement, if, item, item, jaas, jetty, jetty, new, new, set, set, the

The Jetty jboss-service.xml source code

<?xml version="1.0" encoding="UTF-8"?>

<server>

  <!-- ==================================================================== -->
  <!-- Web Container                                                        -->
  <!-- ==================================================================== -->

  <!--
     | Be sure to check that the configuration values are valid for your
     | environment.
   -->

  <mbean code="org.jboss.jetty.JettyService" 
         name="jboss.web:service=WebServer" xmbean-dd="META-INF/webserver-xmbean.xml">

    <!-- ================================================================= -->
    <!-- Your webdefault.xml file - The default settings for every webapp  -->
    <!-- deployed by Jetty. Make systemwide changes here to your webapps   -->
    <!-- configurations.                                                   -->
    <!-- ================================================================= -->

    <attribute name="WebDefaultResource">webdefault.xml

    <!-- ================================================================== -->
    <!-- If true, .war files are unpacked to a temporary directory. This    -->
    <!-- is useful with JSPs.                                               -->
    <!-- ================================================================== -->

    <attribute name="UnpackWars">true

    <!-- ================================================================== -->
    <!-- If true, Jetty will register MBeans representative of every Servlet-->
    <!-- and Filter within each WebApp immediately. This will slow down your-->
    <!-- development iterations.                                            -->
    <!-- ================================================================== -->

    <attribute name="SupportJSR77">true

    <!-- ================================================================== -->
    <!-- If true, Jetty first delegates loading a class to the webapp's     -->
    <!-- parent class loader (a la Java 2). If false, Jetty follows the     -->
    <!--  Servlet 2.3 specification, and tries the webapp's own loader      -->
    <!-- first (for "non-system" classes)                                   -->
    <!-- ================================================================== -->

    <attribute name="Java2ClassLoadingCompliance">false

    <!-- ================================================================= -->
    <!-- If you require JAAS authentication, configure the name of the     -->
    <!-- attribute in which you expect to find the JAAS active subject:    -->
    <!-- ================================================================= -->

    <attribute name="SubjectAttributeName">j_subject


    <!-- ================================================================= -->
    <!-- The name of the security realm to use if none is defined in       -->
    <!-- jboss-web.xml                                                     -->
    <!-- ================================================================= -->
    <attribute name="DefaultSecurityDomain">java:/jaas/other

    <!-- ================================================================= -->
    <!-- Configuring Jetty. The XML fragment contained in the              -->
    <!-- name="ConfigurationElement" attribute is a Jetty-style            -->
    <!-- configuration specification.  It is used to configure Jetty with  -->
    <!-- a listener on port 8080, and a HTTP request log location.         -->
    <!-- The placement here of other Jetty XML configuration statements    -->
    <!-- for deploying webapps etc is not encouraged: if you REALLY NEED   -->
    <!-- something extra, place it in WEB-INF/jetty-web.xml files          -->
    <!-- ================================================================= -->

    <attribute name="ConfigurationElement">
      <Configure class="org.mortbay.jetty.Server">

    <!-- =========================================================== -->
    <!-- Server Thread Pool                                          -->
    <!-- =========================================================== -->
    <Set name="ThreadPool">
      <New class="org.mortbay.thread.BoundedThreadPool">
        <Set name="minThreads">10
        <Set name="lowThreads">50
        <Set name="maxThreads">250
      </New>
    </Set>

    <!-- =========================================================== -->
    <!-- Connectors.                                                 -->
    <!-- =========================================================== -->
    <Call name="addConnector">
      <Arg>
          <New class="org.mortbay.jetty.nio.SelectChannelConnector">
            <Set name="port">
            <Set name="maxIdleTime">30000
            <Set name="Acceptors">2
            <Set name="confidentialPort">8443
          </New>
      </Arg>
    </Call>

    <!-- Call name="addConnector">
        <Arg>
            <New class="org.mortbay.jetty.ajp.Ajp13SocketConnector">
                <Set name="port">8009
            </New>
        </Arg>
    </Call -->

    <Set name="handler">
      <New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
        <Set name="handlers">
         <Array type="org.mortbay.jetty.Handler">
           <Item>
             <New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection"/>
           </Item>
           <Item>
             <New id="DefaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/>
           </Item>
           <Item>
             <New id="RequestLog" class="org.mortbay.jetty.handler.RequestLogHandler"/>
           </Item>
         </Array>
        </Set>
      </New>
    </Set>


      </Configure>
     </attribute>
  </mbean>
</server>

Other Jetty examples (source code examples)

Here is a short list of links related to this Jetty jboss-service.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.