JNDI Lookup in JCA (Connector)
I have developed an inbound connector following the JCA specification, which runs fine in Glassfish v2. What I would like to do is to get some additional configuration parameters, for which we have developed a Configuration EJB to manage all settings and store/read them from the database.
Now I'm trying to do a JNDI lookup in the "start()" method of the connector, but whatever I try I cannot get a reference to the Configuration EJB. Naturally I want to get it using the local interface. I tried putting the @EJB annotation on class level:
and am doing the lookup as follows:
this.config = (ConfigurationService) ctx.lookup("java:comp/env/configService");
As I said, this does not seem to work. Does anybody have any idea. I would very much like to hear your thoughts.