Ok, using wicket-guice now, problem solved... I didn't want to depend on
guice inside my wicket components, but integration is perfect, so I
guess I'll just leave it like that, thank you Igor.
Edgar Merino
Igor Vaynberg escribió:
right. you are not keeping a reference to the injector itself
right. you are not keeping a reference to the injector itself, but you are
giving webpage a reference to a service that is not serializable...thus your
problem.
i suggest using wicket-guice, it has provisions to make serialization work
seamlessly when you pass instances of guice services into comp
This is happening when using a WebPage, but I'm not using an injector
there... I have a class that receives a service as a parameter, that
service is being fetch by the guice injector and passed to the component
in the WebApplication:
public class MyApp extends WebApplication {
private Inje
the application class is not serialized, so there should be no serializatoin
problems. can you post the stack trace?
-igor
On Wed, Oct 15, 2008 at 12:57 PM, Edgar Merino <[EMAIL PROTECTED]> wrote:
> But I only need to keep a reference to a Guice injector in my
> WebApplication to use it across s
But I only need to keep a reference to a Guice injector in my
WebApplication to use it across some methods in it, I don't need it
inside my wicket components... I think the wicket-guice integration
serves a different purpose, correct me if I'm wrong.
Edgar Merino
richardwilko escribió:
Have
t;> redeploying my application. Why didn't it work? what should I do in
>>> this case to keep a reference to my Guice injector? Thanks in advance.
>>>
>>> Edgar Merino
>>>
>>
>>
>
>
> ------
Let me correct that last response: the problem is not solved yet. I
thought it was but after redeploying my application again I got a
serialization exception, why didn't the previously supplied "solution"
didn't work? can anyone give me a hand on this? thanks in advance.
Edgar Merino
Edgar
Ok I re-read the javadoc for the GuiceInjectorHolder and found out I had
to use it as a MetaDataKey, so I did that in my application:
public void init() {
//initialization code
Injector injector = Guice.createInjector();
setMetaData(GuiceInjectorHolder.INJECTOR_KEY, new
GuiceInjectorHo
Hello,
I need to hold a reference to a Guice injector inside my
WebApplication, however since the injector is not serializable I tried
using a GuiceInjectorHolder and keeping a reference to it in my
WebApplication, but I'm still getting serialization exceptions when
redeploying my applicat