Hi,
i got a simple problem:
I got an interface:
public interface SomeInterface {
public void doIt();
}
and two beans with local interfaces:
@Local
public interface SomeBean1Local extends SomeInterface {
}
@Local
public interface SomeBean2Local extends SomeInterface {
}
@Stateful
public SomeBean1 implements SomeBean1Local {
...
}
@Stateful
public SomeBean2 implements SomeBean2Local {
...
}
Within the same application, i got a third bean that has to use one of the
other beans but i do want to use polymorphism.
Simply using a field annotated with @EJB is no option here since i would
have to decide what concrete class to use.
Is there a way to get an instance of a bean by using JNDI?
Best regards
T.Jungblut