I posted to this group how to enable TomEE with Upstart on Ubuntu. Here is
another one... So SmartOS is a derivative of Solaris. It's pretty powerful
and offers some incredibly virtualization features. It's the OS used on
Joyent cloud. The service control framework is called SMF or service
management facility. SMF requires a manifest file for each service.
This assumes you have java installed to /opt/local/java/jdk7 and tomee
installed to /opt/local/java/tomee and a user called tomee with proper disk
permissions set. This manifest gives TomEE an individual permission to open
listen ports on 'low' port numbers, while still running as a user called
tomee (Kinda a cool feature of Solaris).
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM
"/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle
type="manifest"
name="tomee">
<service
name="application/servers/tomee"
type="service"
version="1">
<create_default_instance enabled="false" />
<single_instance />
<exec_method
type="method"
name="start"
exec="/opt/local/java/tomee/bin/startup.sh"
timeout_seconds="30">
<method_context
working_directory="/opt/local/java/tomee/bin">
<method_credential
user="tomee"
group="tomee"
privileges="BASIC,PRIV_NET_PRIVADDR" />
<method_environment>
<envvar
name="CATALINA_BASE"
value="/opt/local/java/tomee" />
<envvar
name="CATALINA_HOME"
value="/opt/local/java/tomee" />
<envvar
name="JAVA_HOME"
value="/opt/local/java/jdk7" />
</method_environment>
</method_context>
</exec_method>
<exec_method
type="method"
name="stop"
exec="/opt/local/java/tomee/bin/shutdown.sh"
timeout_seconds="60">
<method_context
working_directory="/opt/local/java/tomee/bin">
<method_credential
user="tomee"
group="tomee" />
<method_environment>
<envvar
name="CATALINA_BASE"
value="/opt/local/java/tomee" />
<envvar
name="CATALINA_HOME"
value="/opt/local/java/tomee" />
<envvar
name="JAVA_HOME"
value="/opt/local/java/jdk7" />
</method_environment>
</method_context>
</exec_method>
<stability value="Unstable" />
<template>
<common_name>
<loctext xml:lang="C">tomee</loctext>
</common_name>
</template>
</service>
</service_bundle>
--
View this message in context:
http://openejb.979440.n4.nabble.com/FYI-How-to-Run-TomEE-on-Joyent-SmartOS-aka-Solaris-with-SMF-tp4663322.html
Sent from the OpenEJB User mailing list archive at Nabble.com.