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

Glassfish example source code file (domain.xml)

This example Glassfish source code file (domain.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 - Glassfish tags/keywords

app, cddl, cddl, copyright, gpl, gpl, header, if, license, license, oracle, version, version, you

The Glassfish domain.xml source code

<!--

    DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

    Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.

    The contents of this file are subject to the terms of either the GNU
    General Public License Version 2 only ("GPL") or the Common Development
    and Distribution License("CDDL") (collectively, the "License").  You
    may not use this file except in compliance with the License.  You can
    obtain a copy of the License at
    https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
    or packager/legal/LICENSE.txt.  See the License for the specific
    language governing permissions and limitations under the License.

    When distributing the software, include this License Header Notice in each
    file and include the License file at packager/legal/LICENSE.txt.

    GPL Classpath Exception:
    Oracle designates this particular file as subject to the "Classpath"
    exception as provided by Oracle in the GPL Version 2 section of the License
    file that accompanied this code.

    Modifications:
    If applicable, add the following below the License Header, with the fields
    enclosed by brackets [] replaced by your own identifying information:
    "Portions Copyright [year] [name of copyright owner]"

    Contributor(s):
    If you wish your version of this file to be governed by only the CDDL or
    only the GPL Version 2, indicate your decision by adding "[Contributor]
    elects to include this software in this distribution under the [CDDL or GPL
    Version 2] license."  If you don't indicate a single choice of license, a
    recipient has the option to distribute your version of this file under
    either the CDDL, the GPL Version 2 or to extend the choice of license to
    its licensees as provided above.  However, if you add GPL Version 2 code
    and therefore, elected the GPL Version 2 license, then the option applies
    only if the new code is made subject to such option by the copyright
    holder.

-->

<domain log-root="${com.sun.aas.instanceRoot}/logs" application-root="${com.sun.aas.instanceRoot}/applications">
  <applications>
    <web-module context-root="/web1" location="${com.sun.aas.installRoot}/lib/install/applications/adminapp/adminapp_war" directory-deployed="true" name="adminapp" object-type="system-admin">
    <web-module context-root="" location="${com.sun.aas.installRoot}/lib/install/applications/admingui/adminGUI_war" directory-deployed="true" name="admingui" object-type="system-admin">
    <web-module context-root="/__wstx-services" location="${com.sun.aas.installRoot}/lib/install/applications/wstx-services" directory-deployed="true" name="WSTXServices" object-type="system-all">
    <lifecycle-module name="JBIFramework" object-type="system-all" class-name="com.sun.jbi.framework.sun.SunASJBIBootstrap" classpath="${com.sun.aas.installRoot}/jbi/lib/jbi_framework.jar">
      <description>"JBI Framework LifecycleModule"
      <property name="com.sun.jbi.home" value="${com.sun.aas.installRoot}/jbi">
      <property name="com.sun.jbi.defaultLogLevel" value="INFO">
    </lifecycle-module>
    <lifecycle-module name="WSTCPConnectorLCModule" object-type="system-all" class-name="com.sun.xml.ws.transport.tcp.server.glassfish.WSTCPLifeCycleModule" classpath="${com.sun.aas.installRoot}/lib/webservices-rt.jar">
  </applications>
  <resources>
    <jdbc-resource pool-name="__TimerPool" jndi-name="jdbc/__TimerPool" object-type="system-admin">
    <jdbc-resource pool-name="__CallFlowPool" jndi-name="jdbc/__CallFlowPool" object-type="system-all">
    <jdbc-resource pool-name="DerbyPool" jndi-name="jdbc/__default">
    <jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.EmbeddedXADataSource" res-type="javax.sql.XADataSource" name="__CallFlowPool">
      <property name="databaseName" value="${com.sun.aas.instanceRoot}/lib/databases/sun-callflow">
      <property name="connectionAttributes" value=";create=true">
    </jdbc-connection-pool>
    <jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.EmbeddedXADataSource" res-type="javax.sql.XADataSource" name="__TimerPool">
      <property name="databaseName" value="${com.sun.aas.instanceRoot}/lib/databases/ejbtimer">
    </jdbc-connection-pool>
    <jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.ClientDataSource" is-isolation-level-guaranteed="false" res-type="javax.sql.DataSource" name="DerbyPool">
      <property name="PortNumber" value="1527">
      <property name="Password" value="APP">
      <property name="User" value="APP">
      <property name="serverName" value="localhost">
      <property name="DatabaseName" value="sun-appserv-samples">
      <property name="connectionAttributes" value=";create=true">
    </jdbc-connection-pool>
  </resources>
  <servers>
    <server name="server" config-ref="server-config">
      <application-ref ref="adminapp" virtual-servers="__asadmin">
      <application-ref ref="admingui" virtual-servers="__asadmin">
      <application-ref ref="JBIFramework">
      <application-ref ref="WSTXServices">
      <application-ref ref="WSTCPConnectorLCModule">
      <resource-ref ref="jdbc/__TimerPool">
      <resource-ref ref="jdbc/__CallFlowPool">
      <resource-ref ref="jdbc/__default">
    </server>
  </servers>
  <configs>
    <config name="server-config">
      <http-service>
        <access-log rotation-suffix="yyyy-MM-dd" rotation-interval-in-minutes="15">
        <virtual-server id="server" network-listeners="http-listener-1,http-listener-2">
        <virtual-server id="__asadmin" network-listeners="admin-listener">
      </http-service>
      <iiop-service>
        <orb use-thread-pool-ids="thread-pool-1">
        <iiop-listener port="3700" id="orb-listener-1" address="0.0.0.0">
        <iiop-listener port="3820" id="SSL" address="0.0.0.0" security-enabled="true">
          <ssl cert-nickname="s1as">
        </iiop-listener>
        <iiop-listener port="3920" id="SSL_MUTUALAUTH" address="0.0.0.0" security-enabled="true">
          <ssl cert-nickname="s1as" client-auth-enabled="true">
        </iiop-listener>
      </iiop-service>
      <admin-service system-jmx-connector-name="system" type="das-and-server">
        <jmx-connector port="8686" address="0.0.0.0" security-enabled="false" name="system" auth-realm-name="admin-realm">
        <das-config dynamic-reload-enabled="true" deploy-xml-validation="full" autodeploy-dir="${com.sun.aas.instanceRoot}/autodeploy" autodeploy-enabled="true">
      </admin-service>
      <web-container>
        <session-config>
          <session-manager>
            <manager-properties>
            <store-properties>
          </session-manager>
          <session-properties>
        </session-config>
      </web-container>
      <ejb-container max-pool-size="32" pool-resize-quantity="8" steady-pool-size="0" session-store="${com.sun.aas.instanceRoot}/session-store">
        <ejb-timer-service>
      </ejb-container>
      <mdb-container max-pool-size="32" pool-resize-quantity="8" steady-pool-size="0">
      <jms-service default-jms-host="default_JMS_host" type="EMBEDDED">
        <jms-host host="laturbie.sfbay.sun.com" name="default_JMS_host">
      </jms-service>
      <log-service log-rotation-limit-in-bytes="2000000" file="${com.sun.aas.instanceRoot}/logs/server.log">
        <module-log-levels>
      </log-service>
      <security-service>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm">
          <property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile">
          <property name="jaas-context" value="fileRealm">
        </auth-realm>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
          <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile">
          <property name="jaas-context" value="fileRealm">
        </auth-realm>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate">
        <jacc-provider policy-provider="com.sun.enterprise.security.provider.PolicyWrapper" name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl">
          <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy">
        </jacc-provider>
        <audit-module classname="com.sun.enterprise.security.Audit" name="default">
          <property name="auditOn" value="false">
        </audit-module>
        <message-security-config auth-layer="SOAP">
          <provider-config provider-type="client" provider-id="XWS_ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
            <request-policy auth-source="content">
            <response-policy auth-source="content">
            <property name="encryption.key.alias" value="s1as">
            <property name="signature.key.alias" value="s1as">
            <property name="dynamic.username.password" value="false">
            <property name="debug" value="false">
          </provider-config>
          <provider-config provider-type="client" provider-id="ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
            <request-policy auth-source="content">
            <response-policy auth-source="content">
            <property name="encryption.key.alias" value="s1as">
            <property name="signature.key.alias" value="s1as">
            <property name="dynamic.username.password" value="false">
            <property name="debug" value="false">
            <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml">
          </provider-config>
          <provider-config provider-type="server" provider-id="XWS_ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
            <request-policy auth-source="content">
            <response-policy auth-source="content">
            <property name="encryption.key.alias" value="s1as">
            <property name="signature.key.alias" value="s1as">
            <property name="debug" value="false">
          </provider-config>
          <provider-config provider-type="server" provider-id="ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
            <request-policy auth-source="content">
            <response-policy auth-source="content">
            <property name="encryption.key.alias" value="s1as">
            <property name="signature.key.alias" value="s1as">
            <property name="debug" value="false">
            <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml">
          </provider-config>
        </message-security-config>
      </security-service>
      <transaction-service tx-log-dir="${com.sun.aas.instanceRoot}/logs">
      <monitoring-service>
        <module-monitoring-levels>
      </monitoring-service>
      <diagnostic-service>
      <java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009" system-classpath="${com.sun.aas.installRoot}/lib/appserv-launch.jar" classpath-suffix="">
        <jvm-options>-client
        <jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/lib/endorsed
        <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy
        <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf
        <jvm-options>-Dsun.rmi.dgc.server.gcInterval=3600000
        <jvm-options>-Dsun.rmi.dgc.client.gcInterval=3600000
        <jvm-options>-Xmx512m
        <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks
        <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks
        <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext${path.separator}${com.sun.aas.derbyRoot}/lib
        <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
        <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
        <jvm-options>-XX:NewRatio=2
      </java-config>
      <thread-pools>
        <thread-pool thread-pool-id="thread-pool-1">
      </thread-pools>
      <management-rules enabled="true">
      <network-config>
        <protocols>
          <protocol name="http-listener-1">
            <http header-buffer-length="8192" forced-response-type="text/plain; charset=iso-8859-1" default-virtual-server="server" max-connections="250" server-name="" default-response-type="text/plain; charset=iso-8859-1">
              <file-cache enabled="false">
            </http>
          </protocol>
          <protocol security-enabled="true" name="http-listener-2">
            <http header-buffer-length="8192" forced-response-type="text/plain; charset=iso-8859-1" default-virtual-server="server" max-connections="250" server-name="" default-response-type="text/plain; charset=iso-8859-1">
              <file-cache enabled="false">
            </http>
          </protocol>
          <protocol name="admin-listener">
            <http header-buffer-length="8192" forced-response-type="text/plain; charset=iso-8859-1" default-virtual-server="__asadmin" max-connections="250" server-name="" default-response-type="text/plain; charset=iso-8859-1">
              <file-cache enabled="false">
            </http>
          </protocol>
        </protocols>
        <network-listeners>
          <thread-pool max-thread-pool-size="20" min-thread-pool-size="2" thread-pool-id="http-thread-pool" max-queue-size="4096">
          <network-listener port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool">
          <network-listener port="8181" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool">
          <network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="http-thread-pool">
        </network-listeners>
        <transports>
          <transport name="tcp">
        </transports>
      </network-config>
    </config>
  </configs>
  <property name="administrative.domain.name" value="domain1">
</domain>

Other Glassfish examples (source code examples)

Here is a short list of links related to this Glassfish domain.xml source code file:

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

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 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.