embedded@glassfish.java.net

Embedded Server without a domain.xml file possible?

From: Joey Jarosz <joey_at_cadence.com>
Date: Mon, 4 Jan 2010 08:58:54 -0800

I've been reading the "Sun GlassFish Enterprise Server v3 Embedded Server Guide" and the embedded source code - I cannot find a way to run the embedded server without a domain.xml file except for the most trivial cases. I have a feeling it's possible and I just need a gentle shove in the right direction.

Here is a snippet from the domain.xml file that I am currently using with the old v3-prelude (incomplete) embedded API. Among details such as the access log information other required configuration information includes things like a single virtual server listening on two ports.


  <configs>
    <config name="server-config">
      <http-service>
        <http-listener address="0.0.0.0" default-virtual-server="vserver-secure" id="http-listener-1" port="8080" server-name=""/>

        <http-listener address="0.0.0.0" default-virtual-server="vserver-secure" id="http-listener-2" port="8282" security-enabled="true" server-name="">
          <ssl cert-nickname="cadence" ssl3-enabled="true"/>
        </http-listener>

        <virtual-server http-listeners="http-listener-1,http-listener-2" id="vserver-secure">
          <property name="docroot" value="${com.sun.aas.instanceRoot}/docroot"/>
          <property name="accesslog" value="${com.sun.aas.instanceRoot}/../logs/access"/>
          <property name="sso-enabled" value="false"/>
        </virtual-server>

        <request-processing initial-thread-count="5" thread-count="40" thread-increment="5"/>
        <keep-alive max-connections="0"/>

        <http-protocol default-response-type="text/plain; charset=iso-8859-1" forced-response-type="text/plain; charset=iso-8859-1"/>
        <http-file-cache file-caching-enabled="true" globally-enabled="true"/>

        <property name="use-nio-direct-buffer" value="false"/>
        <property name="accessLoggingEnabled" value="true"/>

        <access-log rotation-interval-in-minutes="1440" rotation-suffix="yyyy-MM-dd"/>
      </http-service>

      . . .


--------------------------------------------
Joey Jarosz
Senior Architect
Chip Planning Solutions
Cadence Design Systems, Inc.
(408) 914-6269

Need some IP? Check out www.chipestimate.com<http://www.chipestimate.com>