[ 
http://jira.codehaus.org/browse/MAPPASM-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=157236#action_157236
 ] 

Erik Drolshammer edited comment on MAPPASM-73 at 12/8/08 6:14 AM:
------------------------------------------------------------------

After some discussion with Trygve I tried using a wrapper script around the JSW 
script. This seems to work because ulimit and other environment properties are 
inherited when spawning the new shells. This solves my problem without adding 
more responsibility/pollution/noise to the appassembler and seems like better 
than my patch. 

A wrapper script can look something like: 
(remember to enable maven filtering to resolve properties from the pom)

#!/bin/sh

# The following two lines are used by the chkconfig command. Change as is
#  appropriate for your application.  They should remain commented.
# chkconfig: 2345 20 80
# description: ${pom.name}

echo 'Running wrapper for ${pom.name}'

if [ "$1" = "start" ] || [ "$1" = "console" ]; then
    ulimit -n 65000
    echo "ulimit set to $(ulimit -n)"    
fi



echo 'Calling JSW script'
exec ${rpm.path}/bin/${rpm.appname} $1


The issue can thus be converted to a documentation issue. 


      was (Author: sherriff):
    After some discussion with Trygve I tried using a wrapper script around the 
JSW script. This seems to work because ulimit and other environment properties 
are inherited when spawning the new shells. This solves my problem without 
adding more responsibility/pollution/noise to the appassembler and seems like 
better than my patch. The issue can thus be closed. 

A wrapper script can look something like: 
(remember to enable maven filtering to resolve properties from the pom)

#!/bin/sh

# The following two lines are used by the chkconfig command. Change as is
#  appropriate for your application.  They should remain commented.
# chkconfig: 2345 20 80
# description: ${pom.name}

echo 'Running wrapper for ${pom.name}'

if [ "$1" = "start" ] || [ "$1" = "console" ]; then
    ulimit -n 65000
    echo "ulimit set to $(ulimit -n)"    
fi



echo 'Calling JSW script'
exec ${rpm.path}/bin/${rpm.appname} $1

  
> Add support for setting ulimit open files 
> ------------------------------------------
>
>                 Key: MAPPASM-73
>                 URL: http://jira.codehaus.org/browse/MAPPASM-73
>             Project: Mojo AppAssembler Plugin
>          Issue Type: New Feature
>    Affects Versions: 1.0
>         Environment: linux, fedora
>            Reporter: Erik Drolshammer
>            Priority: Minor
>         Attachments: addSupportForSettingUlimit.patch
>
>
> We need to run ulimit -n 65000 in the same shell as the application is 
> started in. This patch adds support for this functionality. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to