At 11:09 AM 10/26/2001, brian moseley wrote:
>On Thu, 25 Oct 2001, Chris Winters wrote:
>
> > Someone could download this application and install it
> > by either running a few commands or dropping it into a
> > directory. And then they could start having real fun :-)
>
>right. reduce the amount of effort needed to make the
>standard webapp stuff happen, and remove the assumption that
>people who know the application code are deploying the
>application. make applications easily distributable. ideally
>make them deployable in more environments than just
>mod_perl. these are the goals.

While I agree this is admirable as a goal, I am not sure that WAR files are 
the model to follow (and so I am a skeptic).

Having used war files I can tell you that they are not all they are cracked 
up to be except in the most generic way and you still have the standard 
deployment issues.

1) if you develop an application at home with some config describing the 
database connection parameters in the web.xml file in WEB-INF, then you jar 
up the WAR File and send it to your client, they will still need to edit 
the web.xml to change the username and password.

Each time you give the client the new war file, it will also overwrite the 
change they made to web.xml saying that the JDBC connection info was.

2) The main nice thing about war files is that images and HTML related to 
an application can also be stored with the application.

However, this too is not all that it's cracked up to be. Servlet Engines 
are much slower at deliverying image data than the native web server 
(netscape or apache), so you would never in production really have the 
client want to keep the images with the servlet.

---

I will however, say that JNDI is definitely the bomb. If a servlet engine 
allows me to configure JDBC connections and other objects using JNDI, then 
I can make sure my web application gets the JDBC connection not from 
web.xml but instead from the JNDI interface that was configured for the 
server itself.

I really wish more servlet engines in Java supported JNDI but they don't or 
they only support it for JDBC connections.  Of course, the downside on 
reliance on JNDI is that configuration is no longer just "drop the war file 
and run" because the JNDI namings have to be setup.

Later,
    Gunther



Reply via email to