System.setProperty("jboss.ejb.client.properties.file.path", "C:\\jboss-ejb-client.properties"); // Content of the file I posted already.
Properties properties = new Properties();
properties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
Context jndiContext = new InitialContext(properties);
Object ref = jndiContext.lookup( "ejb:/MtzWebComm//CommEJB!de.miditec.communication.ejb.CommEJBHome");
CommEJBHome commEJBHome = (CommEJBHome) PortableRemoteObject.narrow(ref, CommEJBHome.class);
CommEJB commEJB = commEJBHome.create(1);
System.out.println( commEJB.getHello() );
commEJB.remove();
So, it's similar to your code.