Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 72033 invoked from network); 6 Oct 2008 14:23:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Oct 2008 14:23:00 -0000 Received: (qmail 78465 invoked by uid 500); 6 Oct 2008 14:22:58 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 78411 invoked by uid 500); 6 Oct 2008 14:22:57 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 78400 invoked by uid 99); 6 Oct 2008 14:22:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Oct 2008 07:22:57 -0700 X-ASF-Spam-Status: No, hits=2.1 required=10.0 tests=DNS_FROM_SECURITYSAGE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jaw981@gmail.com designates 72.14.220.152 as permitted sender) Received: from [72.14.220.152] (HELO fg-out-1718.google.com) (72.14.220.152) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Oct 2008 14:21:55 +0000 Received: by fg-out-1718.google.com with SMTP id l27so2147018fgb.27 for ; Mon, 06 Oct 2008 07:22:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=k5rTerN4UMS8uM21DFHIBniGymyj0j2yefLOFL+wU08=; b=ghdBW/I4dzadP1vNw63T4xM/sAdi57FhzhOITeRdNRraT9g7I6q23UnRwOaudurGRM T50pQMf6TC37PbCp3gNVkGUkd6NqVjmeaurEWqOBe01rKd5rrDohQ8h7aflib9lom6BE ZzexEez8wvsunWJptjK6AJcetVLQ/5NT3ILag= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=V+rBlH1QCnB1+Pnd5kkGV2I17JxmEkW+ANaPHp7HniASOsxrSRb+q15poE1kO1etIe xdAvA4FhigTFE37/dYynBo202D4wKtckSFwwFmciLj9iImQ1ljEukJzofprPHQmBpKi+ Ysn/0kU1beon9tATwpQjgnu5ZZMR1BBAMXxgw= Received: by 10.187.251.11 with SMTP id d11mr980371fas.31.1223302932492; Mon, 06 Oct 2008 07:22:12 -0700 (PDT) Received: by 10.187.232.11 with HTTP; Mon, 6 Oct 2008 07:22:12 -0700 (PDT) Message-ID: <73a75e430810060722n5c120cc5p48ab3379c123ccb9@mail.gmail.com> Date: Mon, 6 Oct 2008 10:22:12 -0400 From: "Jason Warner" To: dev@geronimo.apache.org Subject: Re: An idea for defining custom valves in config.xml In-Reply-To: <8F55CEC0-B313-43F8-8F1A-E9CABB15AF93@yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_37089_17164075.1223302932493" References: <73a75e430810031251y3f58ae04he694d836f02386f9@mail.gmail.com> <8F55CEC0-B313-43F8-8F1A-E9CABB15AF93@yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_37089_17164075.1223302932493 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Fri, Oct 3, 2008 at 6:55 PM, David Jencks wrote: > > On Oct 3, 2008, at 12:51 PM, Jason Warner wrote: > > Hey all. I'm working on an idea for allowing custom valves to be defined > in config.xml. Currently this isn't possible since the tomcat classloader > would not contain the custom classes for the valve. I've create a jira for > tracking this issue [1] and it contains a few links to workarounds. IMHO, > The solution we should be looking for is a way to add classes to a module > without having to undeploy, modify the module config, and redeploying. > > > People have suggested stuff like this before. IMO it pretty much goes > against the fundamental idea of geronimo of having fairly fixed plugins with > only a few knobs to turn to adjust things in config.xml and > config-substitutions.properties. > > Why is changing the classloader contents in config.xml a good idea? What > is so hard about redeploying the app if you want to change its classloader > significantly? If you want to change a class in the app you have to > redeploy it.... why is this situation different? > The specific instance I have in mind for this change is using a custom valve for tomcat, so I think the scope really should be limited to just the tomcat module. I can't think of another instance where this would be useful, so it's probably not necessary or desirable to expand it further. I believe this situation is different because the structure of geronimo is causing a disconnect between the functionality of tomcat and the functionality of tomcat as it is embedded in geronimo. As Don just said in the middle of my typing this, I don't believe we should expect the average user to have to rebuild one of our modules to add something that can be added in a much simpler way within tomcat itself. Thanks! > > thanks > david jencks > > > I think this can be done by allowing a user to indicate jars that should be > loaded by a module within the config.xml. These jars can then be added to > the module's classloader for use by the module. I'm not extremely familiar > with how our classloader works, but I've taken a look through the code and I > think the ability to add to the classloader can be implemented without too > much difficulty. I'm not quite sure what type of scope to give this change, > though. Should I leave it as a change aimed solely at tomcat valves or > should it be expanded to encompass any configuration? I realize this is > only a rough idea of what i plan to do, but I'm still working out the > details of how to proceed. I'm hoping for some feedback on what I intend to > do and possibly some alternate ideas if anyone has some. > > Thanks! > > > [1] https://issues.apache.org/jira/browse/GERONIMO-4335 > > -- > ~Jason Warner > > > -- ~Jason Warner ------=_Part_37089_17164075.1223302932493 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline


On Fri, Oct 3, 2008 at 6:55 PM, David Jencks <david_jencks@yahoo.com> wrote:

On Oct 3, 2008, at 12:51 PM, Jason Warner wrote:

  Hey all.  I'm working on an idea for allowing custom valves to be defined in config.xml.  Currently this isn't possible since the tomcat classloader would not contain the custom classes for the valve.  I've create a jira for tracking this issue [1] and it contains a few links to workarounds.  IMHO, The solution we should be looking for is a way to add classes to a module without having to undeploy, modify the module config, and redeploying. 

People have suggested stuff like this before.  IMO it pretty much goes against the fundamental idea of geronimo of having fairly fixed plugins with only a few knobs to turn to adjust things in config.xml and config-substitutions.properties.

Why is changing the classloader contents in config.xml a good idea?  What is so hard about redeploying the app if you want to change its classloader significantly?  If you want to change a class in the app you have to redeploy it.... why is this situation different?

The specific instance I have in mind for this change is using a custom valve for tomcat, so I think the scope really should be limited to just the tomcat module.  I can't think of another instance where this would be useful, so it's probably not necessary or desirable to expand it further.  I believe this situation is different because the structure of geronimo is causing a disconnect between the functionality of tomcat and the functionality of tomcat as it is embedded in geronimo.  As Don just said in the middle of my typing this, I don't believe we should expect the average user to have to rebuild one of our modules to add something that can be added in a much simpler way within tomcat itself. 

Thanks!

thanks
david jencks


I think this can be done by allowing a user to indicate jars that should be loaded by a module within the config.xml.  These jars can then be added to the module's classloader for use by the module.  I'm not extremely familiar with how our classloader works, but I've taken a look through the code and I think the ability to add to the classloader can be implemented without too much difficulty.  I'm not quite sure what type of scope to give this change, though.  Should I leave it as a change aimed solely at tomcat valves or should it be expanded to encompass any configuration?  I realize this is only a rough idea of what i plan to do, but I'm still working out the details of how to proceed.  I'm hoping for some feedback on what I intend to do and possibly some alternate ideas if anyone has some.

Thanks!
 

[1]  https://issues.apache.org/jira/browse/GERONIMO-4335

--
~Jason Warner




--
~Jason Warner
------=_Part_37089_17164075.1223302932493--