this is my way. Maybe you can try it

  | import java.util.*;
  | import javax.naming.*;
  | 
  | public class FileServer 
  | {
  |     public static void main(String argv[]) 
  |     {
  |         try {
  |             //System.setSecurityManager(new RMISecurityManager());
  |             Properties properties = new Properties();
  |             properties.put(Context.INITIAL_CONTEXT_FACTORY,
  |                            "org.jnp.interfaces.NamingContextFactory");
  |             properties.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
  |             properties.put(Context.PROVIDER_URL, "jnp://localhost:1099");
  |             InitialContext ctx = new InitialContext(properties);
  |             ctx.rebind("rmi/FileTransfer", new FileTransferImpl());
  |              //FileTransferImpl  -->  rmi implement class
  |             
  |         } catch(Exception e) {
  |             e.printStackTrace();
  |         }
  |     }
  | }

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3937415#3937415

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3937415


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to