Did you not look at what I put together? I've already got all the injection stuff (and conversations) working and I've got example applications illustrating it.
On Mon, Apr 5, 2010 at 3:47 PM, Erik Brakkee <erik.brak...@gmail.com> wrote: >> >> I wonder what the use would be for the request, session, and conversation >> scopes in wicket since these are already managed expiicitly in wicket. At >> least, I wouldn't see a great need for such scopemanagement by the >> container. It would be nice however if CDI could be used to inject EJBs, >> resources, and OSGI services into pages. >> >> > > Sorry for the mail bombing but just got @EJB injection to work based on the > weld-wicket integration. With this setup the only thing I am missing is > probably the long-lived convesations support, but that is not essential for > me. Essential is the link to ejbs and container resources and the converged > container support in Java EE6 which will simplify a lot. > > The main trick is to register only the component instantiation listener from > weld-wicket in the application class. > > class WicketApplication extends WebApplication { > > private NonContextual<WeldComponentInstantiationListener> > weldComponentInstantiationListener; > > /** > * Constructor > */ > public WicketApplication() { > // Empty. > } > > �...@override > protected void init() { > BeanManager mgr = BeanManagerLookup.getBeanManager(); > System.out.println("BeanManager '" + mgr + "'"); > this.weldComponentInstantiationListener = new > NonContextual<WeldComponentInstantiationListener>(BeanManagerLookup.getBeanManager(), > WeldComponentInstantiationListener.class); > > addComponentInstantiationListener(weldComponentInstantiationListener.newInstance().produce().inject().get()); > } > ... > } > > > Next is simply the use of @EJB in a regular page object. > > This works without having to patch the application server. > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org