W3C home > Mailing lists > Public > www-jigsaw@w3.org > July to August 2004

Re: adding a new filter

From: Panos Georgantas <pgeor@dblab.ntua.gr>
Date: Fri, 2 Jul 2004 19:49:22 -0400 (EDT)
Message-ID: <40E5F55D.7020707@dblab.ntua.gr>
To: Juraj Bednar <juraj@bednar.sk>
Cc: www-jigsaw@w3.org




Hello Juraj.
The filter class just has to be in the classpath. Jigsaw keeps a list of 
the installed filters in the 
JIGSAW_HOME\Jigsaw\config\jigadmin.zip\frames.p file but it is used just 
for creating the drop-down list when you add a filter. If you don't want 
to edit this file every time you add/remove a filter you can simply 
write down the name of your class (e.g. FiltersPackage.MyFilter) instead 
of choosing one from the list.
As far as the dynamic adding or removing of filter classes is concerned, 
it is more a "java" issue than a "Jigsaw" issue. As far as I know (but 
without being absolutely certain) java cannot load classes that did not 
exist in its classpath when the JVM started. You will have to modify 
(override, wrap) java˘s class loader in order to achieve this. Even if 
you succeed in this, you will have to pay big attention in whether the 
JVM has already loaded in memory your class when you modify it.
I can't see though, why would you ever need to do such a thing. You can 
always add and remove already compiled filters through jigadmin. In a 
production environment you don't change your software every now and 
then, in a testing environment you don't care if the server restarts. 
Where do you find this useful?
--
Panos.



Juraj Bednar wrote:

>
>
>Hello,
>
>
>  I've read the documentation on filters and I'm trying to write a new
>  Jigsaw filter. The problem is: how do I install the filter? Do I have
>  to compile it to a jar and put it into classpath before running
>  jigsaw? 
>
>  How does jigadm know the list of filters?
>
>  Perhaps, what would make me very happy: is there a way to add and
>  remove filters (compiled java classes and jars) without the need to
>  restart the server? I would like to dynamically add or remove the
>  jigsaw filters. Is this possible?
>
>  I've browsed lots of documentation I found online, but none answered
>  my questions. I really like the jigsaw design and I want to experiment
>  with some new filter ideas using it. 
>
>   Thanks,
>
>    Juraj.
>
>P.S.: Please Cc: me, as I'm not on the list yet.
>  
>
Received on Sunday, 4 July 2004 05:38:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:37 GMT