[jboss-user] [JBoss Seam] - Having problems looking up a Seam component in the JNDI ENC

zzzz8 do-not-reply at jboss.com
Sun Oct 1 04:41:40 EDT 2006


I'm running Seam in Tomcat (EJB 3 embedded) and my client program cannot perform the lookup.  I'm not sure if I'm missing something in my configuration files.  My jndi.properties has the following (which is the default content in the jndi.properties file given in the Seam examples):

java.naming.factory.initial org.jnp.interfaces.LocalOnlyContextFactory
  | java.naming.factory.url.pkgs org.jboss.naming:org.jnp.interfaces

My stateless session bean is defined like this:

@Name("TestConnection")
  | @Stateless
  | public final class TestConnectionBean implements TestConnectionLocal {
  | ...
  | }

In my client code which is used to lookup the Seam component, I have the following:

TestConnectionLocal connection = null;
  | try {
  |     InitialContext ctx = new InitialContext();
  |     connection = (TestConnectionLocal) ctx.lookup("java:comp/env/ejb/TestConnectionBean/local");
  | ....
  | }

When I try invoking it from my client code, I get the typical NameNotFoundException error:

javax.naming.NameNotFoundException: Name TestConnectionBean is not bound in this Context

I've noticed the following on startup on the Tomcat console:

INFO  30-09 18:54:08,523 (Component.java:<init>:217) -Component: TestConnection, scope: STATELESS, type: STATELESS_SESSION_BEAN, class: test.TestConnectionBean, JNDI: TestConnectionBean/local

I've tried a couple of different contexts without success:

java:comp/env/TestConnectionBean/local
TestConnectionBean/local
etc...

The Tomcat JMX console (and I'm also using MC4J) don't seem to show the Seam components anywhere...  What am I doing wrong?  Thanks!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975318#3975318

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975318



More information about the jboss-user mailing list