Re: Avoid serialization troubles with static members

2009-02-19 Thread Johan Compagner
service; ... } What do we need to inject the service after de-serialization ? We have the ComponentInstantiationListener, maybe this would work also with transient ? Martin -- View this message in context: http://www.nabble.com/Avoid-serialization-troubles-with-static-members

AW: Avoid serialization troubles with static members

2009-02-19 Thread Christian Helmbold
Thanks for your answer. Wouldn't it be sufficient to use a static member to hold a reference to a service? i.e. public class SomeWicketComponent{ private static MyService service; // ... } How would you intialize these? Would you have a static getter, and force yourself

Re: Avoid serialization troubles with static members

2009-02-19 Thread Johan Compagner
but if you just use static fields then the only thing you have to do in your app is when the Application.init() is called you just set them once through a static setter on that component. (or reflection) So you have to do all your injection over your components onces at startup of your

Re: AW: Avoid serialization troubles with static members

2009-02-19 Thread Michael Sparer
For additional commands, e-mail: users-h...@wicket.apache.org - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Avoid-serialization-troubles-with-static-members-tp22082899p22097988.html Sent from the Wicket - User mailing list archive

AW: AW: Avoid serialization troubles with static members

2009-02-19 Thread Christian Helmbold
if the org.apache is missing, you're using an old version of wicket. I use Wicket 1.4 RC2. Maybe I use an old version (1.2.7) of the Spring integration. Where can I get the current version? http://cwiki.apache.org/WICKET/spring.html says nothing about where to download it (without maven)..

Re: AW: AW: Avoid serialization troubles with static members

2009-02-19 Thread Michael Sparer
- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Avoid-serialization-troubles

Re: AW: AW: Avoid serialization troubles with static members

2009-02-19 Thread James Carman
Yes, but if the frameworks and tools can make you actually more productive, why not use them? The @SpringBean annotation-based approach just works. I've never had any troubles with it and I really don't have to think about it. There's a very shallow learning curve, especially if you're already

Re: AW: Avoid serialization troubles with static members

2009-02-19 Thread Martijn Dashorst
If you don't want to use maven, then download the distribution of Wicket, and look in the lib folder. All the wicket jars are there. How did you get wicket-1.4-rc2.jar then? Martijn On Thu, Feb 19, 2009 at 12:10 PM, Christian Helmbold christian.helmb...@yahoo.de wrote: if the org.apache is

Re: AW: AW: Avoid serialization troubles with static members

2009-02-19 Thread Jeremy Thomerson
vi is not only a tool, but a whole platform, so that would exclude it. Personally, I find that echo import org.apache.wicket.* MyClass.java echo import java.util.* MyClass.java works best. :) j/k j/k -- Jeremy Thomerson http://www.wickettraining.com On Thu, Feb 19, 2009 at 10:40 AM, Igor

Re: AW: AW: Avoid serialization troubles with static members

2009-02-19 Thread John Krasnay
javac is kinda redundant too. Real men sling raw bytecode. jk On Thu, Feb 19, 2009 at 12:02:36PM -0600, Jeremy Thomerson wrote: vi is not only a tool, but a whole platform, so that would exclude it. Personally, I find that echo import org.apache.wicket.* MyClass.java echo import

Avoid serialization troubles with static members

2009-02-18 Thread Christian Helmbold
I've read http://cwiki.apache.org/WICKET/spring.html and the corresponding section in Wicket in Action about the troubles with serialization of injected services. Dependencies often have references to other dependencies in the container, and so if one is serialized it will probably serialize a

Avoid serialization troubles with static members

2009-02-18 Thread Christian Helmbold
I've read http://cwiki.apache.org/WICKET/spring.html and the corresponding section in Wicket in Action about the troubles with serialization of injected services. Dependencies often have references to other dependencies in the container, and so if one is serialized it will probably serialize a

Re: Avoid serialization troubles with static members

2009-02-18 Thread Johan Compagner
a static service inside a component? why would you have that? that sounds weird to me Then you share that services over all sessions, if that is the case then you can just as well make it a single ton class by itself (MyService.getInstance()) johan On Wed, Feb 18, 2009 at 15:52, Christian

Re: Avoid serialization troubles with static members

2009-02-18 Thread taha siddiqi
I agree with John Krasnay I am new to wicket( 2 months old) but I find @SpringBean very easy to use and it minimizes the spring-context concern while developing the application. and I think avoiding annotations is something you wont be able to do for long.. tawus On Wed, Feb 18, 2009 at

Re: Avoid serialization troubles with static members

2009-02-18 Thread Martin Sachs
to inject the service after de-serialization ? We have the ComponentInstantiationListener, maybe this would work also with transient ? Martin -- View this message in context: http://www.nabble.com/Avoid-serialization-troubles-with-static-members-tp22082899p22095373.html Sent from the Wicket