[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openejb-user
Subject:    Re: Installing TomEE as a windows service
From:       "Frank Brown" <brownf () stancounty ! com>
Date:       2012-01-12 18:02:39
Message-ID: 4F0EAFBE.9680.0089.1 () stancounty ! com
[Download RAW message or body]


Thank you, Karan.  I had tried using tomcat6.exe directly, but didn't try using \
service.bat.  Your email inspired me to try again.  It turns out service.bat is \
setting a bunch of environment variables like PR_* that are needed by tomcat6.exe, \
and in executing tomcat6.exe directly I was omitting those variables.  
I have a regular Tomcat instance running as well as TomEE, so my goal was to get a \
service with the Display Name and Description more to my liking.  To achieve that, I \
just modified service.bat as follows:
 
set SERVICE_NAME=TomEE
set PR_DISPLAYNAME=Apache TomEE 6.0.29
set PR_DESCRIPTION=Apache TomEE 6.0.29 Server - http://tomcat.apache.org/ plus \
http://openejb.apache.org/   
Then executed "service.bat install"
 
Now, I have my two services, easily distinguished from one another:
 
serviceName: tomcat6
displayName: Apache Tomcat 6.0.18
description: Apache Tomcat 6.0.18 Server - http://tomcat.apache.org/ 
 
serviceName: TomEE
dsplayName:  Apache TomEE 6.0.29
description:  Apache TomEE 6.0.29 Server - http://tomcat.apache.org/ plus \
http://openejb.apache.org/   
 
Thanks, all.
 

> > > On 12/27/2011 at 11:03 PM, Karan Malhi <karan.malhi@gmail.com> wrote:
Another way you can try is :
1. Copy service.bat , tomcat7.exe and tomcat7w.exe(you may not need
this one) from an existing tomcat7 installation, and paste them into
bin directory of Tomee
2. Run the following command from the bin directory (in the console)
    service.bat install tomee

If you open "Services" , you should be able to see Apache Tomcat tomee
listed there. You should be able to start/stop the service easily.



On Sat, Dec 24, 2011 at 12:07 AM, Romain Manni-Bucau
<rmannibucau@gmail.com> wrote:
> Hi,
> 
> a script is here for openejb standalone:
> https://svn.apache.org/repos/asf/openejb/trunk/openejb/assembly/openejb-standalone/src/main/resources/service.install.as.admin.bat \
>  
> i didn't try for tomee but it shouldn't be so different. It is based on
> openejb-daemon module.
> 
> - Romain
> 
> 
> 2011/12/24 Frank Brown <brownf@stancounty.com>
> 
> > I have an instance of TomEE on which I've deployed an application.  I'd
> > like to install TomEE as a Windows Service so it will automatically start
> > after reboot.  Since TomEE is in fact (I think?) Tomcat with openejb.war
> > installed and configuration changes made, I thought I could install a TomEE
> > service as I would a Tomcat service.
> > 
> > The version of TomEE I have installed is apache-tomee-6.0.29.  I copied
> > tomcat6.exe and service.exe from apache-tomcat-6.0.32/bin to
> > apache-tomee-6.0.29/bin and tried the following:
> > 
> > Opened command prompt to "c:\opt\apache-tomee-6.0.29\bin" and entered this:
> > 
> > c:\> tomcat6 //IS//TomEE --DisplayName="Apache TomEE (openejb 3.1.4)" \
> > --Install="c:\opt\apache-tomee-6.0.29\bin\tomcat6.exe"  \
> > --Jvm=auto --StartMode=jvm --StopMode=jvm \
> > --StartClass=org.appach.catalina.startup.Bootstrap  --StartParams=start
> > \
> > --StopClass=org.appach.catalina.startup.Bootstrap  --StopParams=stop
> > 
> > It installed the service, but the service does not start.  Presumably it's
> > an issue with certain assumptions made by tomcat6.exe, but I have no clue
> > what the issue is.
> > 
> > 
> > I would guess many people have installed TomEE as a windows service.  Can
> > someone share with me how that can be done?
> > 
> > 
> > 
> > 
> > 
> > 



-- 

Karan Singh Malhi
twitter.com/KaranSinghMalhi



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic