hi below is the solution;
1: make this change in your code
InitialContext context = getInitialContext();
ModelRemote modelRemote = (ModelRemote) context.lookup("ModelBean/remote");
private static InitialContext getInitialContext() throws NamingException
{
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
properties.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
properties.put(Context.PROVIDER_URL, "jnp://localhost:1099");
return new InitialContext(properties);
2. Add jbossall-client.jar to your classpath from jboss/client folder.