Skip to main content

Posts

Showing posts from March, 2009

VirtualHost in Tomcat (Make Tomcat a standalone web server)

Problem: I want to bind a registered domain name to my web application using Apache Tomcat as a standalone web server(means NO Apache web Server, HTTPD), simple :) Environment: Windows Server (64) 2003 Apache Tomcat 6.0.18 IIS 6 Still recently what were we doing to access the web application is, we are binding domain name "xyz.com" to the IIS which is running on port 80, and then this IIS redirects the page to local instance of tomcat, which is running on port 8080, as http://localhost:8080/WebApp So when someone hits www.xyz.com the server redirects to the URL as http://xyz.com:8080/WebApp. Now we need some changes into it 1. Remove port 8080 from URL (pretty easy) Open CATLINA_HOME/conf/server.xml and search for number 8080 and replace by 80, save it and you're done. But wait, if you restarted the tomcat, it will throw exception, like ‘JVM_bind: port 80 is a...

Job storage in Quartz using Files, A FileJobStore Class

Quartz supports mainly two types of Job Storage for Scheduler information. • Memory (non persistent) storage The memory job storage facility for Quartz is provided by a class called org.quartz.simpl.RAMJobStore , The RAMJobStore is the default, i.e unless you change the configuration, and this is the JobStore that will be used for any Quartz application. Using this JobStore has some advantage 1. Easy to configure, because already configured by Scheduler as a default 2. It’s fast - a plain old simple memory access But, as a computer memory is volatile, when your Quartz application is stopped, it releases the memory back to the operating system. Of course, along with everything else stored in that released memory is the scheduling information. • Persistent storage Second is using database for Job storage which implements JobStoreSupport abstract class Quartz offers two different types of concrete persistent JobStores, each one designed for a specific database environment and co...