I have the following doubt..
say i have an application wherein the EJBs are deployed as a jar in 1 application server.
now say my web components are deployed in another machine as war file.
inorder to access the services of
ejb we do jndi lookup wherein i use the following
Properties prop= new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY,"some here");
prop.put(Context.PROVIDER_URL,"jnp://172.20.175.52:1099");
Context ctx = new InitialContext(prop);
now to do lookup
try
{
Object obj = ctx.lookup("some lookup url");
AddBeneficiaryEjbHome home = (AddBeneficiaryEjbHome) javax.rmi.PortableRemoteObject.narrow(obj,AddBeneficiaryEjbHome.class);
remote = (AddBeneficiaryEjb)home.create();
}
catch(Exception ex)
{
ex.printStackTrace();
}
now my doubt is to get home interface i do casting wherein to work properly i am importing it....now if the ejbs are not deployed in the machine as web components how do the lookup and import statements work?
please answer this................