Hello,

I am a bit puzzled with the JNDI. I have a bean that has the following entries in the log file:

24-jun-2012 22:15:52 org.apache.openejb.assembler.classic.JndiBuilder bind
INFO: Jndi(name=I18nTekstManagerLocal) --> Ejb(deployment-id=I18nTekstManager)
24-jun-2012 22:15:52 org.apache.openejb.assembler.classic.JndiBuilder bind
INFO: Jndi(name=global/localhost/doos-web/I18nTekstManager!eu.debooy.doosutils.components.business.II18nTekst) --> Ejb(deployment-id=I18nTekstManager)
24-jun-2012 22:15:52 org.apache.openejb.assembler.classic.JndiBuilder bind
INFO: Jndi(name=global/localhost/doos-web/I18nTekstManager) --> Ejb(deployment-id=I18nTekstManager)

After long trying I managed to get it working a bit. I understand that there are 3 ways to find the EJB. I want to use this bean in more applications since it replaces the language dependent resource bundle. Therefore I do not like the second and third option because it has the application in the search string. The first one fits my needs. In the 'own' (doos-web) application all works fine but when I search the bean from another application I get the error message:

$Proxy91 cannot be cast to eu.debooy.doosutils.components.business.II18nTekst

When I check in the 'own' application then this one uses the same $Proxy91 which is also found when searching the JNDI with I18nTekstManagerLocal.

The definition of the bean is:
@Singleton()
@ConcurrencyManagement(ConcurrencyManagementType.CONTAINER)
public class I18nTekstManager implements II18nTekst {

The interface has no annotations so it is local: eu.debooy.doosutils.components.II18nTekst. It is in the application classpath.

What do I do wrong?

Regards,

Marco

Reply via email to