org.wicketstuff.javaee.injection
Class JavaEEComponentInjector

java.lang.Object
  extended by org.apache.wicket.injection.Injector
      extended by org.wicketstuff.javaee.injection.JavaEEComponentInjector
All Implemented Interfaces:
IComponentInstantiationListener

public class JavaEEComponentInjector
extends Injector
implements IComponentInstantiationListener

This injection must be initialized in the Wicket WebApplication in order to enable Java EE 5 resource injection in Wicket Pages Add the initialization in WebApplication's init() method, e.g.

protected void init() { addComponentInstantiationListener(new JavaEEComponentInjector(this)); }

Author:
Filippo Diotalevi

Constructor Summary
JavaEEComponentInjector(WebApplication webapp)
          Constructor
JavaEEComponentInjector(WebApplication webapp, IJndiNamingStrategy namingStrategy)
          Constructor
 
Method Summary
 void inject(Object object)
           
 void onInstantiation(Component component)
           
 
Methods inherited from class org.apache.wicket.injection.Injector
bind, get, inject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaEEComponentInjector

public JavaEEComponentInjector(WebApplication webapp)
Constructor

Parameters:
webapp - wicket web application

JavaEEComponentInjector

public JavaEEComponentInjector(WebApplication webapp,
                               IJndiNamingStrategy namingStrategy)
Constructor

Parameters:
webapp - - wicket web application
namingStrategy - - a jndi naming strategy to lookup ejb references
Method Detail

inject

public void inject(Object object)
Specified by:
inject in class Injector

onInstantiation

public void onInstantiation(Component component)
Specified by:
onInstantiation in interface IComponentInstantiationListener


Copyright © 2013. All Rights Reserved.