I am creating a wicket (7.0.0-M5) application and I want to use the standard EJB framework.
So I created a multi modul project with an ear modul EAR_NAME, a web modul WICKET_NAME, an ejb module BUSINESS_EJB_NAME and an ejb module COMMON_EJB_NAME.
I use GlobalJndiNamingStrategy class from wicketstuff-javaee-inject library to import the business and the common ejb modules into the wicket web module.
In Wicket WebApplication Class:
protected void init() {
getComponentInstantiationListener.add(new JavaEEComponentInjector(this,
new GlobalJndiNamingStrategy(EAR_NAME, BUSINESS_EJB_NAME)));
getComponentInstantiationListener.add(new JavaEEComponentInjector(this,
new GlobalJndiNamingStrategy(EAR_NAME, COMMON_EJB_NAME)));
}
All services from the business ejb are available. But when I try to call a service from common module, I always get a NamingException and it says:
Can not find "EAR_NAME/BUSINESS_EJB_NAME/CommonService!commonServiceMethod"…
I searched the internet, and I can not find any wicket example with my setup. Is it not possible to lookup more than one module in a wicket application?