0

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?

1 Answers1

0

I haven't used EJB, nor wicketstuff-javaee-inject but maybe you need https://github.com/wicketstuff/core/blob/master/jdk-1.7-parent/javaee-inject-parent/javaee-inject/src/main/java/org/wicketstuff/javaee/naming/global/ModuleJndiNamingStrategy.java instead of GlobalJndiNamingStrategy

martin-g
  • 17,243
  • 2
  • 23
  • 35