struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig McClanahan <craig...@gmail.com>
Subject Re: Validator question
Date Tue, 04 Jan 2005 18:43:57 GMT
If you install Struts and its dependencies in each of your ten
webapps's /WEB-INF/lib directories, it will indeed require more memory
than a single shared installation, because each class will get loaded
once per webapp instead of only once.

The downside of sharing, of course, is that the code you are sharing
has to be deliberately designed to work inside a parent class loader,
and not all the code in Struts (or its dependencies) has been audited
to ensure that it will actually work.  Indeed, the user guide has this
to say on the subject:

  http://struts.apache.org/userGuide/configuration.html#config_add

While progress has been made in improving the abililty of the various
libraries to work this way, I've never personally tried to examine
validator for this kind of problem.

Craig


On Tue, 4 Jan 2005 11:37:04 -0700, Jim Barrows <jbarrows@sssc.com> wrote:
> 
> 
> > -----Original Message-----
> > Wrom: XOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZU
> > Sent: Tuesday, January 04, 2005 11:30 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Validator question
> >
> >
> > Agree 100%. My comment was purely theoretical.
> >
> > On a side note though... Does it consume more RAM if you have 10 apps
> > running on the same server all having their own validator jar
> > in their lib?
> 
> No, the jar is just where it looks for the definition of the class.
> 
> > If it does, this might not be as theoretical as I think.
> >
> > Of course, hopefully, I'll never be in a situation where such
> > things matter
> > enough for me to start doing these tricks.
> >
> > Thanks,
> > Yaakov.
> >
> > -----Original Message-----
> > Wrom: IVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGD
> > Sent: Tuesday, January 04, 2005 1:05 PM
> > To: Struts Users Mailing List
> > Subject: RE: Validator question
> >
> >
> > > -----Original Message-----
> > > Wrom: GVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAUT
> > > Sent: Tuesday, January 04, 2005 10:52 AM
> > > To: 'Struts Users Mailing List'
> > > Subject: RE: Validator question
> > >
> > >
> > > Although I agree with you that it's much easier to keep it
> > > all in the lib of
> > > the webapp, I think it should still be ok to keep
> > > common-validator.jar in
> > > the server's shared lib directory.
> > >
> > > The classloader problem would only apply to struts.jar since
> > > it tries to
> > > load classes dynamically and therefore needs to be in the
> > > same (or below)
> > > classloader. I don't think validator framework does the
> > same, does it?
> >
> > I have no idea.  I consider it to be a complete waste of my
> > time trying to
> > figure out classpath issues like this, so I just keep
> > everything a web app
> > needs in it's lib directory.  My time is worth more then
> > extra disk space,
> > so it doesn't make sense from a financial point of view.
> > Then, you have upgrade issues... the new web app needs the
> > latest jar, but
> > the old app blows up on the latest jar... so now your back to
> > where you
> > were, plus the added time of finding out (probably after install to
> > production) that the latest jar blows up old applications.
> >
> > Uggh.
> >
> >
> >
> > >
> > > Thanks,
> > > Yaakov.
> > >
> > > -----Original Message-----
> > > Wrom: FJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHV
> > > Sent: Tuesday, January 04, 2005 12:00 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: Validator question
> > >
> > >
> > > > -----Original Message-----
> > > > Wrom: IBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKS
> > > > Sent: Tuesday, January 04, 2005 2:02 AM
> > > > To: user@struts.apache.org
> > > > Subject: Validator question
> > > >
> > > >
> > > > I just started learning validator (struts) and developed one
> > > > small form with one single field. I used Javascript and
> > > > serverside validatin both.
> > > >
> > > > Till now i used to put all my jar files inside {Tomcat
> > > > home}/common/lib and it was all ok. (I do not want to keep
> > > > too many copies of jar files inside different application
> > > > directories). Till now this seems to be not working.
> > >
> > > Nope it won't work.  Classloader issues.  See archive for details.
> > > Keep each wars jars in the lib.  Much easier.
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message