Hi friends
I use WSAD 5.1.2 and
test environment 5.
I have a problem in locating a CMP from a
Session bean (Stateless) .
There is one package in my project named cmps
and two
ejb 1-SessionBean : Usermanagement.
2-CMP : User.
I used UTC to check my CMP it works fine and has no problem
but my lookup code in SessionBean could not find it in JNDI
my code is :
public UserLocalHome getUserHome()throws NamingException
{
Context ctx = new InitialContext();
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL,"corbaloc::127.0.0.1:9810");
return (UserLocalHome)ctx.lookup("ejb/cmps/UserLocalHome");
}
Also I tried to use local lookup (previus code without env) but it doesnt works.
can some one tell me what is problem here?
thank you.