Re: webapp shutdown listeners

2010-12-02 Thread alex shubert
Why dont you add you very own listener to servlet container?



-- 
Best regards
Alex

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: webapp shutdown listeners

2010-12-02 Thread Sebastian
we are working on an extension for wicket apps and want to make the 
usage as easy as possible for users. When in usage, the extension should 
be able to register itself to a webapp shutdown event transparently 
without requiring the user do modify their webapps onDestroy method or 
need to add a ServletContextListener. because this has the potential 
that the user forgets to add this potentially resulting in memory leaks 
on webapp restart.



On 02.12.2010 10:38, alex shubert wrote:

Why dont you add you very own listener to servlet container?







-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: webapp shutdown listeners

2010-12-02 Thread Rodolfo Hansen
The correct way, I believe is using the IDestryer (and Iinitializer) along
with the correct wicket.properties in the classpath.

On Thu, Dec 2, 2010 at 3:16 AM, Sebastian nospam...@gmx.net wrote:

 we are working on an extension for wicket apps and want to make the usage
 as easy as possible for users. When in usage, the extension should be able
 to register itself to a webapp shutdown event transparently without
 requiring the user do modify their webapps onDestroy method or need to add a
 ServletContextListener. because this has the potential that the user forgets
 to add this potentially resulting in memory leaks on webapp restart.



 On 02.12.2010 10:38, alex shubert wrote:

 Why dont you add you very own listener to servlet container?






 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Rodolfo Hansen
CTO, KindleIT Software Development
Email: rhan...@kitsd.com
Mobile: +1 (809) 860-6669


Re: webapp shutdown listeners

2010-12-02 Thread Sebastian

That is cool!

From the docs at 
http://wicket.apache.org/apidocs/1.4/org/apache/wicket/IInitializer.html:


public interface IInitializer

Initializes something when application loads. ...

You don't have to pre-register package resources, as they can be 
initialized lazily.


Initializers can be configured by having a wicket.properties file in the 
class path root, with property 'initializer=${initializer class name}'. 
You can have one such properties per jar file, but the initializer that 
property denotes can delegate to other initializers of that library.


If an initializer also implements IDestroyer, the instance will be kept 
for destroying, so that it may clean up whatever it did when initializing.



On 02.12.2010 22:13, Rodolfo Hansen wrote:

The correct way, I believe is using the IDestryer (and Iinitializer) along
with the correct wicket.properties in the classpath.

On Thu, Dec 2, 2010 at 3:16 AM, Sebastiannospam...@gmx.net  wrote:


we are working on an extension for wicket apps and want to make the usage
as easy as possible for users. When in usage, the extension should be able
to register itself to a webapp shutdown event transparently without
requiring the user do modify their webapps onDestroy method or need to add a
ServletContextListener. because this has the potential that the user forgets
to add this potentially resulting in memory leaks on webapp restart.



On 02.12.2010 10:38, alex shubert wrote:


Why dont you add you very own listener to servlet container?







-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org









-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



webapp shutdown listeners

2010-12-01 Thread Sebastian

Hi,

is there a generic way to add one or multiple wicket app shutdown 
listener to a wicket application instance without having to override the 
onDestroy method and roll my own listener registration code?


Regards,

Seb


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org