Hi Ahmed,
Ahmed Mohombe wrote:
> Does this approach work on a wide range of Application Servers (with
> different versions) and different settings?
Well it should work on all Servlet containers. Here is the code:
Set jars = servletContext.getResourcePaths("/WEB-INF/lib");
If users specify jars outside this location, they have to use the
onDeploy I guess. It is also possible to deploy from the classpath but
that should be rare and is more difficult to cater for.
> This looks pretty like the "convention based" deployment I asked for a very very
> long time ago (before #onDeploy was even introduced) :) .
> AFAIK the reason against the convention based approach was that it was not working
> on all widely used application servers (Malcolm knows more about this), hence
> the explicit approach of #onDeploy was introduced.
I vaguely remember something like this. But the above should work on
all containers. I think deploying from the classpath is more difficult.
>
> There are also a few things not clear to me:
> #1 - what is the order of override for resources?
There is no order currently.
Right now it's
> determined by the order of controls specified in click.xml (and the referencing XML files with list
> of controls). If the user extends a control, can simply override the resource only (without the need
> to hack the click source).
> In you approach, if you parse all jars in alphabetic order than there's no way to change the
> override order?
Something can be built for ordering scenario's e.g. provide the order
to deploy jars.
>
> #2 - doesn't the files (other than the standard) in MET-INF have "collateral" effects (on
> performance or something else)?
The code just iterates the entries in the jar and checks for
'META-INF/web/*'. It does not touch the classes. As for performance I
don't have any numbers yet. But scanning through jars should not have
much effect on startup performance.
>
> #3 - what's the performance gain for "convention based deploy" vs. "explicit #onDeploy" ?
It depends on how many resources you deploy. The more resources is
deployed, the more the gain. I tested the deployment approach with
JQuery project in ClickClick and its much easier than manually listing
the resources and creating control.jar files and listing them in
click.xml.
kind regards
bob
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at
http://www.sourceforge.net/community/cca08_______________________________________________
Click-development mailing list
Click-development@...
https://lists.sourceforge.net/lists/listinfo/click-development