I'm using Wicket on Glassfish v3, injecting stateless session beans (using the 
no-interface view) into my Wicket components.

For a component member

        @Inject
        private Foo foo;

Glassfish generates a proxy which is not serializable, even though my class Foo 
is.

Now the problem is that Wicket cannot serialize the page containing the given 
component. I'm not sure whether or not it is legal by the EJB 3.1 spec to have 
the proxy being not serializable when the underlying class is. Just assuming 
for the moment this is not a bug in Glassfish, what would be the best way of 
dealing with this in Wicket?

Detaching the EJBs on serialization and re-injecting them on deserialization 
might work, but I'm not sure how to do this, and of course I would like that to 
happen behind the scenes, without having to provide event handlers in each and 
every component with injected EJBs.

By the way, I'm using a ComponentInstantiationListener from 
https://wamblee.org/viewvc/wicket-cdi/ to deal with CDI, but the same issue 
occurs with old style @EJB injection as well.

Any ideas?

Best regards,

Harald


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

Reply via email to