diff options
author | Greg Larkin <glarkin@FreeBSD.org> | 2010-03-02 19:21:49 +0000 |
---|---|---|
committer | Greg Larkin <glarkin@FreeBSD.org> | 2010-03-02 19:21:49 +0000 |
commit | 247d4a992a9659368f8e077d1c24b39a90a01523 (patch) | |
tree | 46337771bfb4ee099d0739a44235b1046939faaf /net/openmq/files | |
parent | Move conversion tables from canna-server to canna-lib. (diff) |
Open Message Queue is a complete message-oriented middle-ware
platform. High quality, enterprise ready messaging.
WWW: https://mq.dev.java.net/
PR: ports/141411
Submitted by: Radim Kolar <hsn at sanatana.iol.cz>
Feature safe: yes
Notes
Notes:
svn path=/head/; revision=250506
Diffstat (limited to 'net/openmq/files')
-rw-r--r-- | net/openmq/files/imq.in | 104 | ||||
-rw-r--r-- | net/openmq/files/patch-imqbrokerd | 16 | ||||
-rw-r--r-- | net/openmq/files/patch-imqinit | 20 | ||||
-rw-r--r-- | net/openmq/files/pkg-message.in | 10 |
4 files changed, 150 insertions, 0 deletions
diff --git a/net/openmq/files/imq.in b/net/openmq/files/imq.in new file mode 100644 index 000000000000..6bb06708561b --- /dev/null +++ b/net/openmq/files/imq.in @@ -0,0 +1,104 @@ +#!/bin/sh +# +# Copyright (c) 2009 Radim Kolar. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +# $Id$ + +# PROVIDE: imq +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable Open MQ: +# +# imq_enable="YES" +# # optional +# imq_data="/var/spool/imq" +# imq_vmargs="-Xms192m -Xmx192m -Xss128k -XX:MaxGCPauseMillis=5000" + +name="imq" +. %%RC_SUBR%% + +# set defaults +imq_enable=${imq_enable:-"NO"} +imq_data=${imq_data:-"/var/spool/imq"} + +rcvar=`set_rcvar` +load_rc_config $name +pidfile=/var/run/imq.pid +start_cmd="${name}_start" +command=/usr/local/imq/bin/imqbrokerd +command_args="-bgnd -silent" +command_interpreter="/bin/sh" +sigstop=INT +CONF_FILE=%%PREFIX%%/etc/mq/imqbrokerd.conf + +#Check if we have enabled AUTOSTART feature, which overrides rcvar=NO +if ! checkyesno ${rcvar}; then + if [ -f $CONF_FILE -a -r $CONF_FILE ]; then + autostart=`grep "^AUTOSTART=" $CONF_FILE | cut -c11-` + if checkyesno autostart; then + eval ${rcvar}=YES + fi + fi +fi + +#check if RESTART feature is enabled +if [ -f $CONF_FILE -a -r $CONF_FILE ]; then + autorestart=`grep "^RESTART=" $CONF_FILE | cut -c9-` + autoargs=`grep "^ARGS=" $CONF_FILE | cut -c6-` + if checkyesno autorestart; then + command_args="$command_args -autorestart" + fi +fi + +#add vmargs if needed +if [ -n "$imq_vmargs" ]; then + command_args="$command_args -vmargs \"$imq_vmargs\"" +fi + +#load aditional command line arguments from broker config file +if [ -n $autoargs ]; then + echo "$autoargs" | grep -q -- '-varhome' + if [ ! $? -eq 0 ]; then + command_args="$command_args -varhome $imq_data $autoargs" + else + command_args="$command_args $autoargs" + fi +fi + +imq_start() +{ + if [ -z "$rc_pid" ]; then + echo -n "Starting $name" + ${command} ${command_args} & + echo -n $! > $pidfile + echo "." + else + echo "imq is already running with pid=$rc_pid." + fi +} + +run_rc_command "$1" diff --git a/net/openmq/files/patch-imqbrokerd b/net/openmq/files/patch-imqbrokerd new file mode 100644 index 000000000000..c65ee2db2225 --- /dev/null +++ b/net/openmq/files/patch-imqbrokerd @@ -0,0 +1,16 @@ +--- src/solaris/bin/imqbrokerd.sh.orig 2009-09-11 20:39:07.000000000 +0200 ++++ src/solaris/bin/imqbrokerd.sh 2009-12-09 23:42:43.000000000 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/sh -T + ############################################################################# + # + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. +@@ -53,6 +53,7 @@ + # The broker's shutdown hooks will make sure it exits cleanly + if [ -n "$_javapid" ]; then + kill -TERM $_javapid ++ wait $_javapid + fi + } + diff --git a/net/openmq/files/patch-imqinit b/net/openmq/files/patch-imqinit new file mode 100644 index 000000000000..94011d40b48b --- /dev/null +++ b/net/openmq/files/patch-imqinit @@ -0,0 +1,20 @@ +--- src/solaris/etc/imqinit.bak 2009-12-05 23:16:02.000000000 +0100 ++++ src/solaris/etc/imqinit.sh 2009-12-07 19:50:34.000000000 +0100 +@@ -149,7 +149,16 @@ + /usr \ + " + ;; +- ++ FreeBSD) ++ _j2se_locations="\ ++/usr/local/openjdk6 \ ++/usr/local/diablo-jdk1.6.0 \ ++/usr/local/diablo-jre1.6.0 \ ++/usr/local/jdk1.5.0 \ ++/usr/local/diablo-jdk1.5.0 \ ++/usr/local/diablo-jre1.5.0 \ ++" ++ ;; + *) + _j2se_locations="\ + /usr/jdk/entsys-j2se \ diff --git a/net/openmq/files/pkg-message.in b/net/openmq/files/pkg-message.in new file mode 100644 index 000000000000..ba3bed93cbd4 --- /dev/null +++ b/net/openmq/files/pkg-message.in @@ -0,0 +1,10 @@ +To use imq-client in your Java application you need to add following jars +to your classpath: + +%%JAVAJARDIR%%/imq.jar - Connector to IMQ broker. REQUIRED. +%%JAVAJARDIR%%/jms.jar - JMS 1.1 API classes. MOST LIKELY NEEDED + If you have only one jms provider used in + your application or not using application + server you will need this. Otherwise other + jms provider will most likely to ship this. +%%JAVAJARDIR%%/fscontext.jar - JDNI file based lookups. OPTIONAL |