Archive

Author Archive

How to run JBoss Application Server as a Windows Service?

December 31st, 2012 No comments

Recently I was helping a client to install an application on JBoss 4.2.2 server and the client wanted the start and stop operation to be setup as a windows service. The answer was not straight forward and I thought of documenting all the steps I followed.

1) Download JBoss Web Native Connectors (Windows binary)
http://www.jboss.org/jbossweb/downloads


2) Unzip the Native Connector download, and copy jbosssvc.exe and service.bat to JBOSS_HOME/bin folder.


3) Edit FOUR parts of service.bat. Only 3.a is required. Other steps are optional.
3.a
Default service configuration is for JBoss 5.0 (JBAS50SVC). Change this to appropriate version of your server. In my case the server version was 4.2.2 and I have the following overrides.

 
set SVCNAME=JBAS422SVC
set SVCDISP=JBoss Application Server 4.2.2.
set SVCDESC=JBoss Application Server 4.2.2 GA/Platform: Windows x86

3.b
Override start command. In my case, I was starting a specific server with appropriate JDK and allocating enough memory before calling the run.bat program.

 
#call run.bat < .r.lock >> run.log 2>&1
#### CUSTOM START SETTING #####
set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_22
set JAVA_OPTS=-Xms256m -Xmx512m -XX:MaxPermSize=1024m
call run.bat -c MyDefaultServer -b 0.0.0.0 < .r.lock >> run.log 2>&1
#########

3.c
Override shutdown command

 
#call shutdown -S < .s.lock >> shutdown.log 2>&1
#### CUSTOM SHUTDOWN SETTING #####
call shutdown -s jnp://localhost:11099 -S < .s.lock >> shutdown.log 2>&1
#########

3.b
Override restart

 
#call run.bat < .r.lock >> run.log 2>&1
#### CUSTOM START SETTING #####
set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_22
set JAVA_OPTS=-Xms256m -Xmx512m -XX:MaxPermSize=1024m
call run.bat -c MyDefaultServer -b 0.0.0.0 < .r.lock >> run.log 2>&1
#########





4) Now just go to JBOSS_HOME/bin folder and install service.bat. More instructions are included in README-service.txt which came with JBoss Web Native Connectors download.

C:\> service.bat install


5) Now if you access windows services you should see JBoss Application Server listed as a service. Default start type will be ‘Manual’. Change this to ‘Automatic’ if you want the JBoss server to be started with the machine.
JBoss_Service_Setting


Note that you can also use a wrapper service to achieve the same and I did not explore that path. Newer versions of JBoss might have this option built in and native connectors may not be required. I tested this only with Jboss versions 4.2.2 and 4.2.3.




Check the link below for more documentation
http://something-about-tech.blogspot.com/2009/01/running-jboss-as-windows-service.html

Share
Categories: Tech Tips Tags:

Upload Multiple Videos to Youtube – Free & Easy

January 12th, 2011 No comments

If you search for an option to upload multiple videos to youtube.com in a batch, you will find more suggestions than you ever want to see. You will also find both free and paid tools or software that claim to upload multiple videos to youtube.com.

Believe it or not, the easiest way to upload multiple videos at a time is to use the default interface provided by youtube.com.

Youtube-file-upload-screen

Here you could drag and drop multiple videos to the screen or you could click on the button “upload video” and select multiple videos in the popup window. In order to select multiple videos while using Windows, you should select the first video, then keep the “ctrl” key pressed and select additional files.

youtube-select-multiple-videos-to-upload

If you know an easier way to batch upload videos to youtube.com, please feel free to add a comment.

Share
Categories: Tech Tips Tags:

How to increase server timeout in eclipse?

February 4th, 2010 No comments

If you are running JBOSS or other servers within eclipse, and your application takes more than 50 seconds to launch, then you might see a similar exception – “Server JBOSS was unable to start within 50 seconds. If the server requires more time try increasing the timeout in the server editor”

To fix this timeout in eclipse (Galilieo), go to Window -> Show View -> Servers -> Click on server name -> Increase start timeout.
eclipse_server_view

If you are using an older eclipse build (Europa or below), then go to Window -> Preferences -> Server

Share
Categories: Tech Tips Tags: , ,