Aug
26
2009
I am going to go over setting up Glassfish Enterprise v2.1 in a windows clustered high availability environment. For this we will be using two Windows 2003 servers with two network interface cards (NIC) in each server that are network loadbalanced, 2 instances of IIS as the web container and 4 instances of glassfish with HADB behind IIS. You may ask why, and the reason is simply those were the technologies I had to work with; my task was to move from JBOSS to Glassfish. I will attempt to go over this setup in great detail, so as anyone with a basic understanding of these technologies should be able to get this running. For all of the images in the post, click on them for a full size version.
Continue reading
1 comment | tags: Cluster, Glassfish, HADB, IIS, JAVA, NLB, Server, windows | posted in Software
Jul
18
2009
There are many reasons you may want some of your content outside of the application server root. Perhaps you wish to share the content between applications or even webservers, or maybe you temporarily write data from a database to be served. Regardless, serving static content in glassfish is extremely easy. There are two ways to accomplish this; at the server level and at the application level.
Server level
First we will look at the server level, this will make your information available server wide, outside of any application context. Lets say you have images you wish to serve in the directory C:\media. In the glassfish admin console expand configuration > http service > virtual servers. Select ‘server’ then scroll to the bottom and select ‘add property’.
For name use: alternatedocroot_1, for value use: from=/media/* dir=C:/
Keep in mind that glassfish expects the directory in the URL pattern to exist, so the from= is not just the URL pattern, but it is also the path relative to the dir=.
Continue reading
5 comments | tags: Glassfish, JAVA, Server, virtual directory | posted in Software