You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Maurizio Pillitu (JIRA)" <ji...@apache.org> on 2006/10/06 20:07:24 UTC

[jira] Created: (COCOON-1929) [PATCH] Reloading classloader in Cocoon 2.2

[PATCH] Reloading classloader in Cocoon 2.2
-------------------------------------------

                 Key: COCOON-1929
                 URL: http://issues.apache.org/jira/browse/COCOON-1929
             Project: Cocoon
          Issue Type: Task
          Components: * Cocoon Core
    Affects Versions: 2.2-dev (Current SVN)
            Reporter: Maurizio Pillitu


The attached patch provides a first implementation to enable reloading classloader configuration into the sitemap, using the sitemap syntax used in blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap.

Referring to CocoonGT 2005 Torsten's code, I moved all the JCI listener configuration into the ReloadingClassLoaderFactory class, that is in charge to parse the classloader configuration (filled by AvalonUtils class) and instanciate all the JCI listeners.

The TreeProcessor component is subscribed to the JCI listeners, in order to reload the component definitions when a file change event is triggered.

The patch provides also a sample : http://localhost:8888/blocks/cocoon-core-main-sample/reloading/
Try to change MyGenerator.java and compile it into blocks/cocoon-core-sample/cocoon-core-main-sample/target/classes (default eclipse location); if you need to change the location of the .class folder, edit the cocoon-core-main-sample sitemap.xmap.
core.

Obviously there are many parts of the code that can be optimized.

The patch has been applied on revision 453682.

NOTE!
1. I decided to provide the reloading class functionality only for dev mode, so, in order to get it working, you need to run the cocoon application with -Dorg.apache.cocoon.mode=dev
2. The patch depends on a bugfix on Commons JCI (https://issues.apache.org/jira/browse/SANDBOX-174), so it's necessary to build jci-core from trunk; the patch will update the cocoon-bootstrap dependency to jci.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Commented: (COCOON-1929) [PATCH] Reloading classloader in Cocoon 2.2

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Dec 3, 2006, at 4:50 AM, Gabriele Columbro wrote:

> Hi Mark (Maurizio is here on my side not answering due to annoying 
> mail server issues)

bummer :-/

> and we're working on reloading classloader configuration.
> You're right, the TreeProcessor already behaves like this, by checking 
> the value of
>
> org.apache.cocoon.reloading=[yes,no]
right...

> used also to control sitemap reloading. You can then easily configure 
> this value differently in the different modes, e.g. dev mode uses 
> 'yes'.
right...

> We preferred not to add yet another property since the class reloading 
> functionality is about a very similar concern (actually reloading is 
> pretty generic).
+1.

So, I misunderstood Maurizio's comment, you are not using the mode 
directly but using o.a.c.reloading?  I didn't see any reference to it 
in the patch files (but I didn't see any reference to o.a.c.mode, 
either).  I did spot a typo :-)... 
"cocoon-bootstrap-realoding-classloader-factory.xconf"

> Is this what you meant?
Yes.

> As side note, did you already try the reloading classloader sample, 
> which you can reach at [1], running cocoon-dist-samples block ?

Not yet, but I will! :-)  Thanks a lot for this.
—ml—

Re: [jira] Commented: (COCOON-1929) [PATCH] Reloading classloader in Cocoon 2.2

Posted by Gabriele Columbro <co...@gmail.com>.
Hi Mark (Maurizio is here on my side not answering due to annoying mail
server issues) and we're working on reloading classloader configuration.
You're right, the TreeProcessor already behaves like this, by checking the
value of

org.apache.cocoon.reloading=[yes,no]

used also to control sitemap reloading. You can then easily configure this
value differently in the different modes, e.g. dev mode uses 'yes'.
We preferred not to add yet another property since the class reloading
functionality is about a very similar concern (actually reloading is pretty
generic).

Is this what you meant?

As side note, did you already try the reloading classloader sample, which
you can reach at [1], running cocoon-dist-samples block ? You should be able
see automatic reloading the .class file of the generator
org.apache.cocoon.core.container.reloading.MyGenerator; at the moment you
must compile it explicitly, we tested it via Eclipse autobuilding feature
and with maven (mvn compile).

BTW, any news about javaflow [2] ? Did anyone try how it works?

Any feedback is really appreciated!

Thanks for your interest!

[1] http://localhost:8888/blocks/cocoon-core-main-sample/reloading/
[2] http://localhost:8888/blocks/cocoon-javaflow-sample/



On 12/2/06, Mark Lundquist (JIRA) <ji...@apache.org> wrote:
>
>     [
> http://issues.apache.org/jira/browse/COCOON-1929?page=comments#action_12455133]
>
> Mark Lundquist commented on COCOON-1929:
> ----------------------------------------
>
> hi Maurizio,
>
> w.r.t.: " I decided to provide the reloading class functionality only for
> dev mode, so, in order to get it working, you need to run the cocoon
> application with - Dorg.apache.cocoon.mode=dev "...
>
> IMHO, Cocoon itself should never look at the value of o.a.c.mode, _except_
> to decide what properties file to load from WEB-INF/cocoon/properties/ (or
> wherever it is).  Feature selection should be driven by feature-specific
> properties.  Unless I am missing something (wouldn't be the first time :)
>
> cheers, —ml—
>
> > [PATCH] Reloading classloader in Cocoon 2.2
> > -------------------------------------------
> >
> >                 Key: COCOON-1929
> >                 URL: http://issues.apache.org/jira/browse/COCOON-1929
> >             Project: Cocoon
> >          Issue Type: Task
> >          Components: * Cocoon Core
> >    Affects Versions: 2.2-dev (Current SVN)
> >            Reporter: Maurizio Pillitu
> >         Attachments: addxconf.diff, cocoon-core-r469213.diff,
> cocoon-r469167.diff, cocoon.diff
> >
> >
> > The attached patch provides a first implementation to enable reloading
> classloader configuration into the sitemap, using the sitemap syntax used in
> blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap.
>
> > Referring to CocoonGT 2005 Torsten's code, I moved all the JCI listener
> configuration into the ReloadingClassLoaderFactory class, that is in charge
> to parse the classloader configuration (filled by AvalonUtils class) and
> instanciate all the JCI listeners.
> > The TreeProcessor component is subscribed to the JCI listeners, in order
> to reload the component definitions when a file change event is triggered.
> > The patch provides also a sample :
> http://localhost:8888/blocks/cocoon-core-main-sample/reloading/
> > Try to change MyGenerator.java and compile it into
> blocks/cocoon-core-sample/cocoon-core-main-sample/target/classes (default
> eclipse location); if you need to change the location of the .class folder,
> edit the cocoon-core-main-sample sitemap.xmap.
> > core.
> > Obviously there are many parts of the code that can be optimized.
> > The patch has been applied on revision 453682.
> > NOTE!
> > 1. I decided to provide the reloading class functionality only for dev
> mode, so, in order to get it working, you need to run the cocoon application
> with - Dorg.apache.cocoon.mode=dev
> > 2. The patch depends on a bugfix on Commons JCI (
> https://issues.apache.org/jira/browse/SANDBOX-174), so it's necessary to
> build jci-core from trunk; the patch will update the cocoon-bootstrap
> dependency to jci.
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
>
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>


-- 
-----------------------------------------
Eng. Gabriele Columbro
Consultant at Sourcesense Italy
-----------------------------------------
work: g.columbro@pronetics.it
private: columbro@gmail.com
mobile: (0039)3201612846

yahoo: g.columbro
gtalk: columbro@gmail.com
AIM:   gabrielecolumbro

-----------------------------------------
"Keyboard not found.
Press F1 to continue"
-----------------------------------------

[jira] Updated: (COCOON-1929) [PATCH] Reloading classloader in Cocoon 2.2

Posted by "Maurizio Pillitu (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/COCOON-1929?page=all ]

Maurizio Pillitu updated COCOON-1929:
-------------------------------------

    Attachment: cocoon-r469167.diff

Adapted patch after cocoon-core xconf location refactoring
Added cocoon-core-sample dependency to cocoon-webapp

> [PATCH] Reloading classloader in Cocoon 2.2
> -------------------------------------------
>
>                 Key: COCOON-1929
>                 URL: http://issues.apache.org/jira/browse/COCOON-1929
>             Project: Cocoon
>          Issue Type: Task
>          Components: * Cocoon Core
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Maurizio Pillitu
>         Attachments: cocoon-r469167.diff, cocoon.diff
>
>
> The attached patch provides a first implementation to enable reloading classloader configuration into the sitemap, using the sitemap syntax used in blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap.
> Referring to CocoonGT 2005 Torsten's code, I moved all the JCI listener configuration into the ReloadingClassLoaderFactory class, that is in charge to parse the classloader configuration (filled by AvalonUtils class) and instanciate all the JCI listeners.
> The TreeProcessor component is subscribed to the JCI listeners, in order to reload the component definitions when a file change event is triggered.
> The patch provides also a sample : http://localhost:8888/blocks/cocoon-core-main-sample/reloading/
> Try to change MyGenerator.java and compile it into blocks/cocoon-core-sample/cocoon-core-main-sample/target/classes (default eclipse location); if you need to change the location of the .class folder, edit the cocoon-core-main-sample sitemap.xmap.
> core.
> Obviously there are many parts of the code that can be optimized.
> The patch has been applied on revision 453682.
> NOTE!
> 1. I decided to provide the reloading class functionality only for dev mode, so, in order to get it working, you need to run the cocoon application with -Dorg.apache.cocoon.mode=dev
> 2. The patch depends on a bugfix on Commons JCI (https://issues.apache.org/jira/browse/SANDBOX-174), so it's necessary to build jci-core from trunk; the patch will update the cocoon-bootstrap dependency to jci.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (COCOON-1929) [PATCH] Reloading classloader in Cocoon 2.2

Posted by "Maurizio Pillitu (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/COCOON-1929?page=all ]

Maurizio Pillitu updated COCOON-1929:
-------------------------------------

    Attachment: addxconf.diff

> [PATCH] Reloading classloader in Cocoon 2.2
> -------------------------------------------
>
>                 Key: COCOON-1929
>                 URL: http://issues.apache.org/jira/browse/COCOON-1929
>             Project: Cocoon
>          Issue Type: Task
>          Components: * Cocoon Core
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Maurizio Pillitu
>         Attachments: addxconf.diff, cocoon-core-r469213.diff, cocoon-r469167.diff, cocoon.diff
>
>
> The attached patch provides a first implementation to enable reloading classloader configuration into the sitemap, using the sitemap syntax used in blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap.
> Referring to CocoonGT 2005 Torsten's code, I moved all the JCI listener configuration into the ReloadingClassLoaderFactory class, that is in charge to parse the classloader configuration (filled by AvalonUtils class) and instanciate all the JCI listeners.
> The TreeProcessor component is subscribed to the JCI listeners, in order to reload the component definitions when a file change event is triggered.
> The patch provides also a sample : http://localhost:8888/blocks/cocoon-core-main-sample/reloading/
> Try to change MyGenerator.java and compile it into blocks/cocoon-core-sample/cocoon-core-main-sample/target/classes (default eclipse location); if you need to change the location of the .class folder, edit the cocoon-core-main-sample sitemap.xmap.
> core.
> Obviously there are many parts of the code that can be optimized.
> The patch has been applied on revision 453682.
> NOTE!
> 1. I decided to provide the reloading class functionality only for dev mode, so, in order to get it working, you need to run the cocoon application with -Dorg.apache.cocoon.mode=dev
> 2. The patch depends on a bugfix on Commons JCI (https://issues.apache.org/jira/browse/SANDBOX-174), so it's necessary to build jci-core from trunk; the patch will update the cocoon-bootstrap dependency to jci.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (COCOON-1929) [PATCH] Reloading classloader in Cocoon 2.2

Posted by "Maurizio Pillitu (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/COCOON-1929?page=all ]

Maurizio Pillitu updated COCOON-1929:
-------------------------------------

    Attachment: cocoon-core-r469213.diff

Last patcheset was missing some files; this is the right one.

> [PATCH] Reloading classloader in Cocoon 2.2
> -------------------------------------------
>
>                 Key: COCOON-1929
>                 URL: http://issues.apache.org/jira/browse/COCOON-1929
>             Project: Cocoon
>          Issue Type: Task
>          Components: * Cocoon Core
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Maurizio Pillitu
>         Attachments: cocoon-core-r469213.diff, cocoon-r469167.diff, cocoon.diff
>
>
> The attached patch provides a first implementation to enable reloading classloader configuration into the sitemap, using the sitemap syntax used in blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap.
> Referring to CocoonGT 2005 Torsten's code, I moved all the JCI listener configuration into the ReloadingClassLoaderFactory class, that is in charge to parse the classloader configuration (filled by AvalonUtils class) and instanciate all the JCI listeners.
> The TreeProcessor component is subscribed to the JCI listeners, in order to reload the component definitions when a file change event is triggered.
> The patch provides also a sample : http://localhost:8888/blocks/cocoon-core-main-sample/reloading/
> Try to change MyGenerator.java and compile it into blocks/cocoon-core-sample/cocoon-core-main-sample/target/classes (default eclipse location); if you need to change the location of the .class folder, edit the cocoon-core-main-sample sitemap.xmap.
> core.
> Obviously there are many parts of the code that can be optimized.
> The patch has been applied on revision 453682.
> NOTE!
> 1. I decided to provide the reloading class functionality only for dev mode, so, in order to get it working, you need to run the cocoon application with -Dorg.apache.cocoon.mode=dev
> 2. The patch depends on a bugfix on Commons JCI (https://issues.apache.org/jira/browse/SANDBOX-174), so it's necessary to build jci-core from trunk; the patch will update the cocoon-bootstrap dependency to jci.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (COCOON-1929) [PATCH] Reloading classloader in Cocoon 2.2

Posted by "Maurizio Pillitu (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/COCOON-1929?page=all ]

Maurizio Pillitu updated COCOON-1929:
-------------------------------------

    Attachment: cocoon.diff

Apply to cocoon 2.2 trunk folder

> [PATCH] Reloading classloader in Cocoon 2.2
> -------------------------------------------
>
>                 Key: COCOON-1929
>                 URL: http://issues.apache.org/jira/browse/COCOON-1929
>             Project: Cocoon
>          Issue Type: Task
>          Components: * Cocoon Core
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Maurizio Pillitu
>         Attachments: cocoon.diff
>
>
> The attached patch provides a first implementation to enable reloading classloader configuration into the sitemap, using the sitemap syntax used in blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap.
> Referring to CocoonGT 2005 Torsten's code, I moved all the JCI listener configuration into the ReloadingClassLoaderFactory class, that is in charge to parse the classloader configuration (filled by AvalonUtils class) and instanciate all the JCI listeners.
> The TreeProcessor component is subscribed to the JCI listeners, in order to reload the component definitions when a file change event is triggered.
> The patch provides also a sample : http://localhost:8888/blocks/cocoon-core-main-sample/reloading/
> Try to change MyGenerator.java and compile it into blocks/cocoon-core-sample/cocoon-core-main-sample/target/classes (default eclipse location); if you need to change the location of the .class folder, edit the cocoon-core-main-sample sitemap.xmap.
> core.
> Obviously there are many parts of the code that can be optimized.
> The patch has been applied on revision 453682.
> NOTE!
> 1. I decided to provide the reloading class functionality only for dev mode, so, in order to get it working, you need to run the cocoon application with -Dorg.apache.cocoon.mode=dev
> 2. The patch depends on a bugfix on Commons JCI (https://issues.apache.org/jira/browse/SANDBOX-174), so it's necessary to build jci-core from trunk; the patch will update the cocoon-bootstrap dependency to jci.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (COCOON-1929) [PATCH] Reloading classloader in Cocoon 2.2

Posted by "Simone Gianni (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/COCOON-1929?page=comments#action_12446402 ] 
            
Simone Gianni commented on COCOON-1929:
---------------------------------------

Tested file cocoon-core-r469213.diff, seems to work correctly.

> [PATCH] Reloading classloader in Cocoon 2.2
> -------------------------------------------
>
>                 Key: COCOON-1929
>                 URL: http://issues.apache.org/jira/browse/COCOON-1929
>             Project: Cocoon
>          Issue Type: Task
>          Components: * Cocoon Core
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Maurizio Pillitu
>         Attachments: cocoon-core-r469213.diff, cocoon-r469167.diff, cocoon.diff
>
>
> The attached patch provides a first implementation to enable reloading classloader configuration into the sitemap, using the sitemap syntax used in blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap.
> Referring to CocoonGT 2005 Torsten's code, I moved all the JCI listener configuration into the ReloadingClassLoaderFactory class, that is in charge to parse the classloader configuration (filled by AvalonUtils class) and instanciate all the JCI listeners.
> The TreeProcessor component is subscribed to the JCI listeners, in order to reload the component definitions when a file change event is triggered.
> The patch provides also a sample : http://localhost:8888/blocks/cocoon-core-main-sample/reloading/
> Try to change MyGenerator.java and compile it into blocks/cocoon-core-sample/cocoon-core-main-sample/target/classes (default eclipse location); if you need to change the location of the .class folder, edit the cocoon-core-main-sample sitemap.xmap.
> core.
> Obviously there are many parts of the code that can be optimized.
> The patch has been applied on revision 453682.
> NOTE!
> 1. I decided to provide the reloading class functionality only for dev mode, so, in order to get it working, you need to run the cocoon application with -Dorg.apache.cocoon.mode=dev
> 2. The patch depends on a bugfix on Commons JCI (https://issues.apache.org/jira/browse/SANDBOX-174), so it's necessary to build jci-core from trunk; the patch will update the cocoon-bootstrap dependency to jci.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (COCOON-1929) [PATCH] Reloading classloader in Cocoon 2.2

Posted by "Maurizio Pillitu (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/COCOON-1929?page=comments#action_12455128 ] 
            
Maurizio Pillitu commented on COCOON-1929:
------------------------------------------

After the cocoon-bootstrap block removing, all the reloading classloader stuff have been moved into cocoon-core block, except for the cocoon-bootstrap-realoding-classloader-factory.xconf, that contains the ReloadingClassLoaderFactory component configuration.

Committing patch to add the missing file (addxconf.diff)

Working on revision 481626.

> [PATCH] Reloading classloader in Cocoon 2.2
> -------------------------------------------
>
>                 Key: COCOON-1929
>                 URL: http://issues.apache.org/jira/browse/COCOON-1929
>             Project: Cocoon
>          Issue Type: Task
>          Components: * Cocoon Core
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Maurizio Pillitu
>         Attachments: cocoon-core-r469213.diff, cocoon-r469167.diff, cocoon.diff
>
>
> The attached patch provides a first implementation to enable reloading classloader configuration into the sitemap, using the sitemap syntax used in blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap.
> Referring to CocoonGT 2005 Torsten's code, I moved all the JCI listener configuration into the ReloadingClassLoaderFactory class, that is in charge to parse the classloader configuration (filled by AvalonUtils class) and instanciate all the JCI listeners.
> The TreeProcessor component is subscribed to the JCI listeners, in order to reload the component definitions when a file change event is triggered.
> The patch provides also a sample : http://localhost:8888/blocks/cocoon-core-main-sample/reloading/
> Try to change MyGenerator.java and compile it into blocks/cocoon-core-sample/cocoon-core-main-sample/target/classes (default eclipse location); if you need to change the location of the .class folder, edit the cocoon-core-main-sample sitemap.xmap.
> core.
> Obviously there are many parts of the code that can be optimized.
> The patch has been applied on revision 453682.
> NOTE!
> 1. I decided to provide the reloading class functionality only for dev mode, so, in order to get it working, you need to run the cocoon application with -Dorg.apache.cocoon.mode=dev
> 2. The patch depends on a bugfix on Commons JCI (https://issues.apache.org/jira/browse/SANDBOX-174), so it's necessary to build jci-core from trunk; the patch will update the cocoon-bootstrap dependency to jci.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (COCOON-1929) [PATCH] Reloading classloader in Cocoon 2.2

Posted by "Mark Lundquist (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/COCOON-1929?page=comments#action_12455133 ] 
            
Mark Lundquist commented on COCOON-1929:
----------------------------------------

hi Maurizio,

w.r.t.: " I decided to provide the reloading class functionality only for dev mode, so, in order to get it working, you need to run the cocoon application with -Dorg.apache.cocoon.mode=dev "...

IMHO, Cocoon itself should never look at the value of o.a.c.mode, _except_ to decide what properties file to load from WEB-INF/cocoon/properties/ (or wherever it is).  Feature selection should be driven by feature-specific properties.  Unless I am missing something (wouldn't be the first time :)

cheers, —ml—

> [PATCH] Reloading classloader in Cocoon 2.2
> -------------------------------------------
>
>                 Key: COCOON-1929
>                 URL: http://issues.apache.org/jira/browse/COCOON-1929
>             Project: Cocoon
>          Issue Type: Task
>          Components: * Cocoon Core
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Maurizio Pillitu
>         Attachments: addxconf.diff, cocoon-core-r469213.diff, cocoon-r469167.diff, cocoon.diff
>
>
> The attached patch provides a first implementation to enable reloading classloader configuration into the sitemap, using the sitemap syntax used in blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap.
> Referring to CocoonGT 2005 Torsten's code, I moved all the JCI listener configuration into the ReloadingClassLoaderFactory class, that is in charge to parse the classloader configuration (filled by AvalonUtils class) and instanciate all the JCI listeners.
> The TreeProcessor component is subscribed to the JCI listeners, in order to reload the component definitions when a file change event is triggered.
> The patch provides also a sample : http://localhost:8888/blocks/cocoon-core-main-sample/reloading/
> Try to change MyGenerator.java and compile it into blocks/cocoon-core-sample/cocoon-core-main-sample/target/classes (default eclipse location); if you need to change the location of the .class folder, edit the cocoon-core-main-sample sitemap.xmap.
> core.
> Obviously there are many parts of the code that can be optimized.
> The patch has been applied on revision 453682.
> NOTE!
> 1. I decided to provide the reloading class functionality only for dev mode, so, in order to get it working, you need to run the cocoon application with -Dorg.apache.cocoon.mode=dev
> 2. The patch depends on a bugfix on Commons JCI (https://issues.apache.org/jira/browse/SANDBOX-174), so it's necessary to build jci-core from trunk; the patch will update the cocoon-bootstrap dependency to jci.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira