users@glassfish.java.net

Re: Setting up GlassFish v3 (Prelude) with Solaris 10 SMF

From: <glassfish_at_javadesktop.org>
Date: Mon, 06 Jul 2009 01:14:43 PDT

And here is a XML SMF service definition for GlassFish
You might need to modify your paths and service name

--Seb


<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">

<service_bundle type='manifest' name='glassfish:yajug'>

<service name='application/glassfish/yajug' type='service' version='1'>
        <create_default_instance enabled='true' />
        <single_instance />
        <dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
            <service_fmri value='svc:/system/filesystem/local' />

        </dependency>
        <dependency name='network-service' grouping='require_all' restart_on='none' type='service'>
            <service_fmri value='svc:/network/service' />
        </dependency>
        <method_context>
            <method_credential user='glassfish' group='glassfish' />

         </method_context>
        <exec_method type='method' name='start' exec='/opt/glassfish/glassfish/bin/asadmin start-domain yajug' timeout_seconds='600' />
        <exec_method type='method' name='stop' exec='/opt/glassfish/glassfish/bin/asadmin stop-domain yajug' timeout_seconds='600' />
       <property_group name='startd' type='framework'>
                <propval name='duration' type='astring' value='transient' />
        </property_group>

        <stability value='Unstable' />
        <template>
                <common_name>
                        <loctext xml:lang='C'>Glassfish V3 Simple non-root user SMF</loctext>
                </common_name>

        </template>
</service>
</service_bundle>
[Message sent by forum member 'sebsto' (sebsto)]

http://forums.java.net/jive/thread.jspa?messageID=354211