views:

20

answers:

1

Hi, is there a way to lookup an EJB in weblogic if it implements only local interface?

If I use this

@Remote public interface TestSessionRemote { 
    public void businessMethod();
}

@Stateless(mappedName = "A")
public class TestSessionBean implements TestSessionRemote 
{
    public void businessMethod() 
    {

    }
}

the EJB can be looked up using this name:

"A#" + TestSessionRemote.class.getName()

If I change the annotation for TestSessionRemote from @Remote to @Local the EJB disappears from JNDI. Is there a way around this?

A: 

It should still be in the java:comp/env namespace.

Archimedes Trajano
Can you elaborate on that? How the JNDI name should look like? I forgot to mention that I am quite new to EJB3 so maybe I am missing something obvious ...
stalker