Do I understand your comment correctly that you are worried about wasting resources, i.e. mounted mappers that don't get garbage collected?

Or do you also expect that after #internalDestroy() #init() the application doesn't work as expected anymore?

-- Reinhard

On 09/15/2011 05:08 PM, Martin Grigorov wrote:
Hi,

I've heart about problems with Wicket page reload and component tree
before but this question about reloading the configuration
(Application class) is new for me.

I haven't tried it but before calling #init() I would call
#internalDestroy(). But even with this I think it wont work because
destroy method calls different destroy callbacks for the configurable
parts of Wicket but it doesn't clean data structures like the list of
mounted mappers. We leave this to the garbage collector.
The mount problem can be solved with #umount(String) but only if you
know the mount path, so again it is not enough...

On Thu, Sep 15, 2011 at 5:56 PM, Reinhard Pötz<[email protected]>  wrote:

Yesterday I started with a new Wicket 1.5 project and since the
ReloadingClassLoader didn't work for me I gave JRebel a try. AFAICT JRebel
worked great when you change existing classes. But then I run into a problem
when I added a mount to the Wicket application.

I contacted the JRebel support and they answered promptly. You can find our
conversation below.
The mentioned code sample can be found at
https://github.com/reinhard/wicket-jrebel

In short, they are asking whether it is ok to call the init() method of the
WebApplication object again when the class file was changed.

Unfortunately I'm not an expert in how Wicket works internally and whether
it is save what they propose.

It would be great if somebody else with a better understanding of possible
implications of this call could share his thoughts with us.
Please keep the ZeroTurnaround Support Team in the loop by CCing them.

-- Reinhard

On 09/15/2011 01:07 PM, ZeroTurnaround Support Team wrote:

Hello,

Thank you very much for the demo application.

As the page is mounted in the init() method the only solution for
this problem would be to call this method when a class extending
org.apache.wicket.Application is changed. Can you predict what
problems may arise if we do this? It seems that if multiple pages are
mounted to same path the last one is used, so there should be no
problems with remounting pages. What else can be done in the init()
method except mounting pages?

-- Aleksei Sosnovski [email protected]


-----Original Message----- From: "Reinhard
Pötz"<[email protected]>  Reply-To: "Reinhard
Pötz"<[email protected]>  Date: Wed, 14 Sep 2011 22:58:17 +0200 To:
"ZeroTurnaround Support Team"<[email protected]>  Subject:
Re: (Case 16581) JRebel Wicket-Integration

Hello Anton!

Thanks for your really fast answer! I've created a small
test-project based on the Wicket Quickstart archetype, which is
attached to this mail.

Run 'mvn package eclipse:eclipse' in order to get a working
project configuration for Eclipse and JRebel. Then run the main
method of the class com.example.Start with JRebel being activated.
The reload of existing pages works fine AFAICS (at least some
simple experiments worked well for me).

Then go to the class com.example.WicketApplication and uncomment
the commented line that mounts a page. As I explained in my mail
before, the new page isn't found although the log and the console
output confirm that the WicketApplication class has been reloaded
before.

If you have any further questions, don't hesitate to contact me!

Best regards, Reinhard Pötz

On 09/14/2011 06:18 PM, ZeroTurnaround Support Team wrote:

Hello!

It might be the case that this particular functionality is not
covered with our integration. JRebel picks up the new version of
the class but probably it is required to reinitialize some of the
Wicket internals.

Can you provide me the sample test case for this issue?

-- Anton Arhipov [email protected]

--
Reinhard Pötz         Founder&  Managing Director, Indoqa and Deepsearch
                        http://www.indoqa.com/people/reinhard-poetz.html

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member                  [email protected]
________________________________________________________________________

      Furthermore, I think Oracle has to honor the JSPA agreement.
    http://s.apache.org/JCPIsDead       http://s.apache.org/tck-trap






--
Reinhard Pötz         Founder & Managing Director, Indoqa and Deepsearch
                        http://www.indoqa.com/people/reinhard-poetz.html

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member                  [email protected]
________________________________________________________________________

      Furthermore, I think Oracle has to honor the JSPA agreement.
    http://s.apache.org/JCPIsDead       http://s.apache.org/tck-trap

Reply via email to