Search |
||||||||||||||||
One TCP port to rule them allPosted by jfarcand on November 7, 2006 at 6:56 PM PST
One thing I hate when I install an application server is the process of determining which and how many TCP ports the application is reserving. On a shared machine, It's even worse because you need to manually change all the reserved ports to start the application server. Since GlassFish define a lot of ports, I sometime gives up and find another machine. There is still pain because I always have to learn which port support which protocol and under which transport etc. Naaa that sucks. I would like to have a single port to change and run all my requests by that port. The good news is with the help of Grizzly, GlassFish v2 can now define a single port that can be used to serve several protocols and transports(not all yet). Even better, its is easy extend the Grizzly Port Unification mechanism to do whatever you want with the request. Welcome to the Grizzly Port Unification mechanism!
The pluggable mechanism is based on two interfaces: ProtocolFinder and ProtocolHandler.
Below is some possible scenarios:
I know I know, in some scenario you wouldn't want to redirect from https to http :-). As usual, this feature is not "officially" supported in GlassFish's domain.xml (we have a very strict process in place internally....not sure it is as open as I would like it to be....OK I stop whining as I needed the property for Grizzly standalone support anyway :-)). To add your own ProtocolFinder and ProtocolHandler, you need to manually add two jvm-options, in domain.xml: The above configuration will configure Grizzly Port Unification to first look for the http protocol, then for the https transport, and then try again the http protocol. Eventually, we gonna consolidate all GlassFish ports to a single one by writing the appropriate ProtocolFinder and ProtocolHandler. Looks promising, does it? At least just for me, having one port to modify will saves my time... The mechanism will most probably be officially enabled in build 25 if all my testing goes well, and this include making sure the performance of Grizzly is not reduced by such mechanism. technorati: grizzly port unification glassfish
»
Related Topics >>
Java Enterprise Comments
Comments are listed in date ascending order (oldest first)
|
||||||||||||||||
|
|