Java 

JavaTM RMI ¥ê¥ê¡¼¥¹¥Î¡¼¥È
for J2SETM 5.0

RMI  ¤ÎÌܼ¡
J2SETM 5.0 ¤Î³ÈÄ¥µ¡Ç½
¥¹¥¿¥Ö¥¯¥é¥¹¤ÎưŪ¤ÊÀ¸À®
¤³¤Î¥ê¥ê¡¼¥¹¤Ç¤Ï¡¢¼Â¹Ô»þ¤Ë¥¹¥¿¥Ö¥¯¥é¥¹¤òưŪ¤ËÀ¸À®¤¹¤ë¤¿¤á¤Î¥µ¥Ý¡¼¥È¤¬Äɲ䵤줿¤Î¤Ç¡¢¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥ÈÍѤΥ¹¥¿¥Ö¥¯¥é¥¹¤ò»öÁ°¤ËÀ¸À®¤¹¤ë Java(TM) Remote Method Invocation (Java RMI) ¥¹¥¿¥Ö¥³¥ó¥Ñ¥¤¥é (rmic) ¤ò»È¤¦É¬Íפ¬¤Ê¤¯¤Ê¤ê¤Þ¤·¤¿¡£°ÊÁ°¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¼Â¹Ô¤µ¤ì¤ë¥¯¥é¥¤¥¢¥ó¥È¤ò¥µ¥Ý¡¼¥È¤¹¤ëɬÍפ¬¤¢¤ë¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¤ËÂФ·¤Æ¤Ï¡¢rmic ¤ò»ÈÍѤ·¤Æ»öÁ°¤Ë¥¹¥¿¥Ö¥¯¥é¥¹¤òÀ¸À®¤¹¤ëɬÍפ¬¤¢¤ë¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£

¥³¥ó¥¹¥È¥é¥¯¥¿¡¢¤Þ¤¿¤Ï java.rmi.server.UnicastRemoteObject ¥¯¥é¥¹¤Þ¤¿¤Ï java.rmi.activation.Activatable ¥¯¥é¥¹¤Î static ¥á¥½¥Ã¥É exportObject 1 ¤ò»ÈÍѤ·¤Æ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¤ò¥¨¥¯¥¹¥Ý¡¼¥È¤·¤Æ¤â¡¢¤½¤Î¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¯¥é¥¹¤ËÂбþ¤¹¤ëÀ¸À®ºÑ¤ß¥¹¥¿¥Ö¥¯¥é¥¹¤¬Æɤ߹þ¤Þ¤ì¤Ê¤¤¾ì¹ç¡¢¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¹¥¿¥Ö¤Ï¡¢¸Æ¤Ó½Ð¤·¥Ï¥ó¥É¥é¤È¤·¤Æ java.rmi.server.RemoteObjectInvocationHandler ÉÕ¤­¤Î java.lang.reflect.Proxy ¥¤¥ó¥¹¥¿¥ó¥¹¤È¤Ê¤ê¤Þ¤¹¡£¤½¤Î¥¯¥é¥¹¤Ï¡¢Æ°Åª¤ËºîÀ®¤µ¤ì¤Þ¤¹¡£

java.rmi.server.ignoreStubClasses ¥·¥¹¥Æ¥à¥×¥í¥Ñ¥Æ¥£¤ò true ¤ËÀßÄꤹ¤ë¤³¤È¤Ç¡¢Æ°Åª¤ËºîÀ®¤µ¤ì¤¿¥¹¥¿¥Ö¥¯¥é¥¹¤ò´û¸¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬Ìµ¾ò·ï¤Ç»ÈÍѤ¹¤ë¤è¤¦¤ËÇÛÃ֤Ǥ­¤Þ¤¹¡£¤Ä¤Þ¤ê¡¢¥¹¥¿¥Ö¥¯¥é¥¹¤¬»öÁ°¤ËÀ¸À®¤µ¤ì¤Æ¤¤¤¿¤«¤É¤¦¤«¤Ë¤«¤«¤ï¤é¤º»ÈÍѤǤ­¤ë¤È¤¤¤¦¤³¤È¤Ç¤¹¡£¤³¤Î¥×¥í¥Ñ¥Æ¥£¤¬ true ¤ËÀßÄꤵ¤ì¤Æ¤¤¤ë¤È¡¢À¸À®ºÑ¤ß¥¹¥¿¥Ö¥¯¥é¥¹¤¬»ÈÍѤµ¤ì¤ë¤³¤È¤Ï¤¢¤ê¤Þ¤»¤ó¡£

Ãí:

  • ¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¤¬¥ê¥ê¡¼¥¹ 5.0 ¤è¤ê¤âÁ°¤Î¥¯¥é¥¤¥¢¥ó¥È¤ò»ý¤Ã¤Æ¤¤¤ë¾ì¹ç¡¢¤½¤Î¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¤Ï¡¢rmic ¤Ç»öÁ°¤ËÀ¸À®¤µ¤ì¤¿¥¹¥¿¥Ö¥¯¥é¥¹¤ò»È¤¦É¬Íפ¬¤¢¤ê¤Þ¤¹¡£¤Þ¤¿¤Ï¡¢¥¯¥é¥¤¥¢¥ó¥È¤¬ ClassNotFoundException ¤òÆþ¼ê¤·¤Æ¡¢¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¹¥¿¥Ö¤ÎľÎ󲽤òÉü¸µ¤·¤Þ¤¹¡£¥ê¥ê¡¼¥¹ 5.0 ¤è¤êÁ°¤Î¥¯¥é¥¤¥¢¥ó¥È¤Ï¡¢Æ°Åª¤ËÀ¸À®¤µ¤ì¤¿¥¹¥¿¥Ö¥¯¥é¥¹¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤òÆɤ߹þ¤à¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£¤³¤Î¤è¤¦¤Ê¥¯¥é¥¹¤Ë¤Ï RemoteObjectInvocationHandler ¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢¤³¤Î¥ê¥ê¡¼¥¹¤è¤êÁ°¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤ÏÍøÍѤǤ­¤Ê¤¤¤«¤é¤Ç¤¹¡£

  • J2SE 5.0 ¥ê¥ê¡¼¥¹¤è¤êÁ°¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï¡¢¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¤ò¥¨¥¯¥¹¥Ý¡¼¥È¤¹¤ëºÝ¤Ë¤½¤Î¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¯¥é¥¹¤ËÂбþ¤¹¤ëÀ¸À®ºÑ¤ß¥¹¥¿¥Ö¥¯¥é¥¹¤òÆɤ߹þ¤à¤³¤È¤¬¤Ç¤­¤Ê¤¤¤È¡¢java.rmi.StubNotFoundException ¤¬¥¹¥í¡¼¤µ¤ì¤Þ¤¹¡£Æ°Åª¤ËÀ¸À®¤µ¤ì¤¿¥¹¥¿¥Ö¥¯¥é¥¹¤Î¥µ¥Ý¡¼¥È¤¬Äɲ䵤줿¤¿¤á¡¢À¸À®ºÑ¤ß¤Î¥¹¥¿¥Ö¥¯¥é¥¹¤ò»ý¤¿¤Ê¤¤¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¤ò¥¨¥¯¥¹¥Ý¡¼¥È¤·¤Æ¤â¡¢¤½¤Î¤Þ¤Þ½èÍý¤¬Â³¹Ô¤µ¤ì¤Þ¤¹¡£¥ê¥ê¡¼¥¹ 5.0 ¤è¤êÁ°¤Î¥Ð¡¼¥¸¥ç¥ó¤ò¥µ¥Ý¡¼¥È¤¹¤ë¥µ¡¼¥Ð¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤òÇÛÈ÷¤·¤Æ¤¤¤ë¥æ¡¼¥¶¤Ï¡¢¥¨¥¯¥¹¥Ý¡¼¥È»þ¤Ë¥¹¥¿¥Ö¥¯¥é¥¹¤¬¤Ê¤¯¤Æ¤â¥¨¥é¡¼¤ÏÊó¹ð¤µ¤ì¤Þ¤»¤ó¤¬¡¢°ú¤­Â³¤­¤½¤Î¥µ¡¼¥Ð¤Î¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¯¥é¥¹¤ËÂбþ¤¹¤ë¥¹¥¿¥Ö¥¯¥é¥¹¤òɬ¤º»öÁ°¤ËÀ¸À®¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£Âå¤ï¤ê¤Ë¤³¤Î¤è¤¦¤Ê¥¨¥é¡¼¤Ï¡¢Æ°Åª¤ËÀ¸À®¤µ¤ì¤¿¥¹¥¿¥Ö¥¯¥é¥¹¤ÎľÎ󲽤òÉü¸µ¤¹¤ë¤È¤­¤Ë¡¢5.0 ¤è¤êÁ°¤Î¥ê¥ê¡¼¥¹¤Î¥¯¥é¥¤¥¢¥ó¥È¤ËÊó¹ð¤µ¤ì¤Þ¤¹¡£

1 static ¥á¥½¥Ã¥É UnicastRemoteObject.exportObject(Remote) ¤Ï¡¢java.rmi.server.RemoteStub ¤òÊÖ¤¹¤è¤¦¤ËÀë¸À¤µ¤ì¤ë¤Î¤ÇçóûóI¤ËÀ¸À®¤µ¤ì¤¿¥¹¥¿¥Ö¥¯¥é¥¹¤ò»È¤¦¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¤ò¥¨¥¯¥¹¥Ý¡¼¥È¤¹¤ë¾ì¹ç¤Ë»ÈÍѤ¹¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£Æ°Åª¤ËÀ¸À®¤µ¤ì¤¿¥¹¥¿¥Ö¥¯¥é¥¹¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤Ï¡¢java.lang.reflect.Proxy ¥¤¥ó¥¹¥¿¥ó¥¹¤Ç¤¢¤ê¡¢RemoteStub ¤Ë³ä¤êÅö¤Æ¤é¤ì¤Þ¤»¤ó¡£

ɸ½à SSL/TLS ¥½¥±¥Ã¥È¥Õ¥¡¥¯¥È¥ê¥¯¥é¥¹
º£²ó¤Î¥ê¥ê¡¼¥¹¤Ç¤Ï¡¢É¸½à¤Î Java RMI ¥½¥±¥Ã¥È¥Õ¥¡¥¯¥È¥ê¥¯¥é¥¹¤Ç¤¢¤ë javax.rmi.ssl.SslRMIClientSocketFactory ¤È javax.rmi.ssl.SslRMIServerSocketFactory ¤¬Äɲ䵤ì¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤é¤Î¥¯¥é¥¹¤Ç¤Ï¡¢Java Secure Socket Extension (JSSE) ¤ò»È¤Ã¤Æ¡¢Secure Sockets Layer (SSL) ¥×¥í¥È¥³¥ë¤Þ¤¿¤Ï Transport Layer Security (TLS) ¥×¥í¥È¥³¥ë¤ò²ð¤·¤ÆÄÌ¿®¤·¤Þ¤¹¡£¤³¤ì¤é¤Î¥½¥±¥Ã¥È¥Õ¥¡¥¯¥È¥ê¥¯¥é¥¹¤Ç¤Ï¡¢Java RMI ¤Ç´Êñ¤Ë JSSE ¤ò»È¤¦ÊýË¡¤¬Ä󶡤µ¤ì¤ë¤Î¤Ç¡¢¥ê¥â¡¼¥È¥á¥½¥Ã¥É¸Æ¤Ó½Ð¤·¤Î¤¿¤á¤ÎÀ°¹çÀ­¡¢°Å¹æ²½¤Ë¤è¤ëµ¡Ì©À­¡¢¥µ¡¼¥Ðǧ¾Ú¡¢¤ª¤è¤Ó¥¯¥é¥¤¥¢¥ó¥Èǧ¾Ú (Ǥ°Õ) ¤ò¶¯²½¤Ç¤­¤Þ¤¹¡£Java RMI ¤Ç¤Î¥«¥¹¥¿¥à¥½¥±¥Ã¥È¥Õ¥¡¥¯¥È¥ê¤Î»È¤¤Êý¤Î¾ÜºÙ¤Ï¡¢¡ÖJava RMI ¤Ë¤è¤ë¥«¥¹¥¿¥à¥½¥±¥Ã¥È¥Õ¥¡¥¯¥È¥ê¤Î»ÈÍѡץÁ¥å¡¼¥È¥ê¥¢¥ë¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ÀßÄê¤ò´Þ¤à JSSE ¤Î¾ÜºÙ¤Ï¡¢¡ÖJSSE ¥ê¥Õ¥¡¥ì¥ó¥¹¥¬¥¤¥É¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£

inetd/xinetd ¤«¤é rmid ¤Þ¤¿¤Ï Java RMI ¥µ¡¼¥Ð¤òµ¯Æ°¤¹¤ë
System.inheritedChannel ¥á¥½¥Ã¥É¤Ë¤è¤êÄ󶡤µ¤ì¤ë¿·¤·¤¤µ¡Ç½¤Ë¤è¤Ã¤Æ¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¢²¾ÁÛ¥Þ¥·¥ó (VM) ¤òµ¯Æ°¤·¤¿¥×¥í¥»¥¹¤«¤é·Ñ¾µ¤µ¤ì¤ë¥Á¥ã¥Í¥ë ¡Êjava.nio.channels.SocketChannel ¤Þ¤¿¤Ï java.nio.channels.ServerSocketChannel¤Ê¤É) ¤ò¼èÆÀ¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤³¤Î·Ñ¾µ¥Á¥ã¥Í¥ë¤Ï¡¢SocketChannel ¤Î¾ì¹ç¤Ïñ°ì¤ÎÃå¿®Àܳ¤ò¹Ô¤¦¤¿¤á¡¢ServerSocketChannel ¤Î¾ì¹ç¤ÏÊ£¿ô¤ÎÃå¿®Àܳ¤ò¼õ¤±Æþ¤ì¤ë¤¿¤á¤Ë»ÈÍѤǤ­¤Þ¤¹¡£¤½¤Î·ë²Ì¡¢inetd (Solaris(TM) ¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à) ¤Þ¤¿¤Ï xinetd (Linux) ¤Ë¤è¤Ã¤Æµ¯Æ°¤µ¤ì¤¿ Java ¥Í¥Ã¥È¥ï¡¼¥­¥ó¥°¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¢inetd/xinetd ¤«¤é·Ñ¾µ¤µ¤ì¤¿ SocketChannel ¤Þ¤¿¤Ï ServerSocketChannel ¤ò¼èÆÀ¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡£

¤³¤Îµ¡Ç½¤ÎÄɲäˤè¤Ã¤Æ¡¢Java RMI µ¯Æ°¥Ç¡¼¥â¥ó rmid ¤Ï¡¢inetd/xinetd ¤«¤é¤Îµ¯Æ°¤ò¥µ¥Ý¡¼¥È¤¹¤ë¤è¤¦¤Ë³ÈÄ¥¤µ¤ì¤¿¤¿¤á¡¢Ãå¿®¤·¤¿ÀܳÍ×µá¤ò¼õ¤±¼è¤Ã¤¿¤È¤­¤Ë¤Î¤ß¡¢µ¯Æ°¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤³¤Îµ¡Ç½¤ò¥µ¥Ý¡¼¥È¤¹¤ë¤¿¤á¤Î rmid ¤Î³ÈÄ¥µ¡Ç½¤Ë¤Ä¤¤¤Æ¤Î¾ÜºÙ¤Ï¡¢rmid (Solaris ¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥àÍÑ) ¤Î¥Ä¡¼¥ë¥Ú¡¼¥¸¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£rmid ¤òµ¯Æ°¤¹¤ë¤è¤¦¤Ë inetd ¤ò¹½À®¤¹¤ëÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ÜºÙ¤Ï¡¢¡Örmid ¤òµ¯Æ°¤¹¤ë inetd ¤Î¹½À®¡×¥Á¥å¡¼¥È¥ê¥¢¥ë¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£

Java RMI ¤ò»ÈÍѤ¹¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¢inetd ¤Þ¤¿¤Ï xinetd ¤«¤éµ¯Æ°¤µ¤ì¤ë¤è¤¦¤ËÀ߷פ¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£¤³¤Îµ»Ë¡¤ò¼ÂÁõ¤¹¤ëÊýË¡¤ÎÎã¤Ë¤Ä¤¤¤Æ¤Ï¡¢¡Öinetd ¤«¤éµ¯Æ°¤µ¤ì¤ë¥µ¡¼¥Ó¥¹¤ÎÀ߷סץÁ¥å¡¼¥È¥ê¥¢¥ë¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£

ľÎ󲽤γÈÄ¥µ¡Ç½
J2SE 5.0 ¤Ë¤ª¤±¤ë¥ª¥Ö¥¸¥§¥¯¥ÈľÎ󲽤γÈÄ¥¤ª¤è¤Ó²þÁ±¤Î¾ÜºÙ¤Ï¡¢¡ÖľÎó²½¥ê¥ê¡¼¥¹¥Î¡¼¥È¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
J2SE 5.0 ¤Ç¤ÎÊѹ¹
rmic ¤Î¸½ºß¤Î¥Ç¥Õ¥©¥ë¥È¤Î¥¹¥¿¥Ö¥×¥í¥È¥³¥ë¤Î¥Ð¡¼¥¸¥ç¥ó -v1.2
À¸À®¤µ¤ì¤¿¥¯¥é¥¹¤Ë»ÈÍѤµ¤ì¤ë JRMP ¥¹¥¿¥Ö¥×¥í¥È¥³¥ë¤Î¥Ð¡¼¥¸¥ç¥ó¤ò»ØÄꤹ¤ë¥ª¥×¥·¥ç¥ó¤Ê¤·¤Ç rmic ¤¬¼Â¹Ô¤µ¤ì¤ë¤È¡¢Á°¤Î¥ê¥ê¡¼¥¹¤Î -vcompat ¥ª¥×¥·¥ç¥ó¤ÎÂå¤ï¤ê¤Ë -v1.2 ¥ª¥×¥·¥ç¥ó¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¤«¤Î¤è¤¦¤Ë¼Â¹Ô¤µ¤ì¤Þ¤¹¡£

¤Ä¤Þ¤ê¡¢¤³¤ÎÊѹ¹¤Ë¤è¤Ã¤Æ¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢1.2 ¥¹¥¿¥Ö¥×¥í¥È¥³¥ë¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Î¤ß¼ÂÁõ¤µ¤ì¤¿¡¢¤É¤Î¤è¤¦¤Ê¥¹¥±¥ë¥È¥ó¥¯¥é¥¹¤â¥¹¥¿¥Ö¥¯¥é¥¹¤â rmic ¤Ë¤è¤Ã¤ÆÀ¸À®¤µ¤ì¤Ê¤¤¤È¤¤¤¦¤³¤È¤Ç¤¹¡£JDK 1.1 ¤Ç¼Â¹Ô¤µ¤ì¤ë¥¯¥é¥¤¥¢¥ó¥È¤ò¥µ¥Ý¡¼¥È¤¹¤ë¤¿¤á¤Ë¥ê¥â¡¼¥È¼ÂÁõ¥¯¥é¥¹¤ò¹½ÃÛ¤¹¤ëɬÍפ¬¤¢¤ë¾ì¹ç¤Ï¡¢-vcompat ¥ª¥×¥·¥ç¥ó¤òÌÀ¼¨Åª¤Ë»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£(¤µ¤é¤Ë¡¢¾åµ­¤Î¤è¤¦¤Ë¥ê¥â¡¼¥È¼ÂÁõ¥¯¥é¥¹¤¬¥ê¥ê¡¼¥¹ 5.0 ¤è¤êÁ°¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¼Â¹Ô¤µ¤ì¤ë¥¯¥é¥¤¥¢¥ó¥È¤ò¥µ¥Ý¡¼¥È¤¹¤ëɬÍפ¬¤Ê¤¤¾ì¹ç¤Ï¡¢¤½¤Î¤è¤¦¤Ê¥¯¥é¥¹¤Î¤¿¤á¤Ë rmic ¤ò¼Â¹Ô¤¹¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó¡£)

¤³¤ì¤é¤Î¥³¥Þ¥ó¥É¹Ô¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤Æ¤Î¾ÜºÙ¤Ï¡¢rmic ¤Î¥Ä¡¼¥ë¥É¥­¥å¥á¥ó¥È (Solaris ¤ª¤è¤Ó LinuxÍÑ¡¢Windows ÍÑ) ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£

rmic ¤¬¥¯¥é¥¹¥Ñ¥¹Æâ¤ÎǤ°Õ¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò¥³¥ó¥Ñ¥¤¥ë¤¹¤ë¤³¤È¤Ï¤Ê¤¤
°ÊÁ°¤Î¥ê¥ê¡¼¥¹¤Ç¤Ï¡¢ÆþÎÏ¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤Î½èÍýÃæ¤Ë¡¢¥¯¥é¥¹¥Ñ¥¹Æâ¤Ë¤¢¤ëǤ°Õ¤Î .java ¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò rmic ¤¬¥³¥ó¥Ñ¥¤¥ë¤·¤è¤¦¤È¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤·¤¿¡£¥ê¥ê¡¼¥¹ 5.0 ¤Ç¤Ï¡¢rmic ¤Ï¼«¤éÀ¸À®¤·¤¿¥¹¥¿¥Ö¡¢¥¹¥±¥ë¥È¥ó¡¢¤Þ¤¿¤Ï¥¿¥¤¥¯¥é¥¹°Ê³°¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò¥³¥ó¥Ñ¥¤¥ë¤·¤è¤¦¤È¤¹¤ë¤³¤È¤Ï¤¢¤ê¤Þ¤»¤ó¡£

rmic ¤ËÅϤµ¤ì¤ë¥ê¥â¡¼¥È¼ÂÁõ¥¯¥é¥¹¤Ï¡¢¤½¤Î¥¯¥é¥¹¤¬°Í¸¤·¤Æ¤¤¤ë¤¹¤Ù¤Æ¤Î¥¯¥é¥¹¤ª¤è¤Ó¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ÈƱÍͤˡ¢rmic ¤¬¼Â¹Ô¤µ¤ì¤ëÁ°¤Ë¤¹¤Ç¤Ë javac ¤ÇÀµ¾ï¤Ë¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤Æ¤¤¤Þ¤¹¡£´û¸¤Î¹½ÃÛ¼ê½ç¤¬¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¤¤¤¯¤Ä¤«¤ò¥³¥ó¥Ñ¥¤¥ë¤¹¤ë rmic ¤Î»öÁ°¤ÎÆ°ºî¤Ë°Í¸¤·¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢rmic ¤ò¼Â¹Ô¤¹¤ëÁ°¤Ë¡¢É¬Íפʤ¹¤Ù¤Æ¤Î¥¯¥é¥¹¤¬ javac ¤ÇÀµ¤·¤¯¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤Æ¤¤¤ë¤³¤È¤ò³Îǧ¤¹¤ë¤¿¤á¤Ë¡¢¤½¤Î¹½ÃÛ¼ê½ç¤òÊѹ¹¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£

°ÊÁ°¤Î¥ê¥ê¡¼¥¹¤Ç¤Î³ÈÄ¥µ¡Ç½¤ÈÊѹ¹
¥µ¡¼¥Ð¦¥¹¥¿¥Ã¥¯¥È¥ì¡¼¥¹¤¬¥ê¥â¡¼¥È¤ÎÎã³°¤ËÊÝ»ý¤µ¤ì¤ë (1.4 °Ê¹ß)
Java RMI ¥é¥ó¥¿¥¤¥à¼ÂÁõ¤¬¡¢°ÊÁ°¤Î¥ê¥ê¡¼¥¹¤Ç¹Ô¤Ã¤Æ¤¤¤¿¤è¤¦¤Ë¥¯¥é¥¤¥¢¥ó¥È¦¥¹¥¿¥Ã¥¯¥È¥ì¡¼¥¹¤òµ­Æþ¤¹¤ë¤À¤±¤Ç¤Ê¤¯¡¢¥ê¥â¡¼¥È¸Æ¤Ó½Ð¤·¤«¤é¥¹¥í¡¼¤µ¤ì¤ëÎã³°¤Î¥µ¡¼¥Ð¦¥¹¥¿¥Ã¥¯¥È¥ì¡¼¥¹¾ðÊó¤òÊÝ»ý¤¹¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡£¤·¤¿¤¬¤Ã¤Æ¡¢¤½¤Î¤è¤¦¤ÊÎã³°¤¬¥¯¥é¥¤¥¢¥ó¥È¥³¡¼¥É¤Ë¥¢¥¯¥»¥¹²Äǽ¤Ë¤Ê¤ë¤È¡¢¤½¤Î¥¹¥¿¥Ã¥¯¥È¥ì¡¼¥¹¤Ë¤Ï¡¢¸µ¤Î¥µ¡¼¥Ð¦¥È¥ì¡¼¥¹¥Ç¡¼¥¿¤È¡¢¤½¤ì¤Ë³¤¯¥¯¥é¥¤¥¢¥ó¥È¦¥È¥ì¡¼¥¹¤Î¤¹¤Ù¤Æ¤¬´Þ¤Þ¤ì¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£

¤³¤Îµ¡Ç½¤Ï¡¢J2SE 1.4 ¤Î java.lang.Throwable ¤Î¿·¤·¤¤¡Ö¥¹¥¿¥Ã¥¯¥È¥ì¡¼¥¹¾ðÊó¤Ø¤Î¥×¥í¥°¥é¥à¤Ë¤è¤ë¥¢¥¯¥»¥¹¡×µ¡Ç½¤Ë¤è¤Ã¤Æ²Äǽ¤Ë¤Ê¤ê¤Þ¤·¤¿¡£¤³¤ì¤Ë¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤ÎľÎó²½·Á¼°¤Î Throwable ¤Î¥¹¥¿¥Ã¥¯¥È¥ì¡¼¥¹¥Ç¡¼¥¿Éôʬ¤ÎºîÀ®¤¬´Þ¤Þ¤ì¤Þ¤¹¡£¥¯¥é¥¤¥¢¥ó¥È¦ Java RMI ¥é¥ó¥¿¥¤¥à¼ÂÁõ¤Ï¡¢¤³¤Îµ¡Ç½¤ÈÏ¢·È¤¹¤ë¤¿¤á¤Ë¡¢°ÊÁ°¤Î¥ê¥ê¡¼¥¹¤Î¤è¤¦¤Ëñ¤Ë¥¯¥é¥¤¥¢¥ó¥È¦¥È¥ì¡¼¥¹¤Ç¾å½ñ¤­¤¹¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢¥¯¥é¥¤¥¢¥ó¥È¦¥È¥ì¡¼¥¹¤òÈóÀ°Î󲽤µ¤ì¤¿¥µ¡¼¥Ð¦¥È¥ì¡¼¥¹¤ËÄɲä·¤Þ¤¹¡£

¥µ¡¼¥Ð¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ë¤è¤Ã¤Æ¤Ï¡¢¥Ñ¥Õ¥©¡¼¥Þ¥ó¥¹¤Þ¤¿¤Ïµ¡Ì©À­¤Ë´Ø¤¹¤ëÍýͳ¤Ë¤è¤ê¡¢¥ê¥â¡¼¥È¸Æ¤Ó½Ð¤·¤Î·ë²Ì¤È¤·¤ÆÀ°Î󲽤µ¤ì¤ëÎã³°¤Ë¡¢J2SE 1.4 ¤ÎÎã³°¤Î¥Ç¥Õ¥©¥ë¥È¤ÎľÎó²½·Á¼°¤Î°ìÉô¤È¤·¤Æ¥µ¡¼¥Ð¦¥¹¥¿¥Ã¥¯¥È¥ì¡¼¥¹¥Ç¡¼¥¿¤¬Éտ魯¤ë¤³¤È¤òËɤ°É¬Íפ¬¤¢¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£¤½¤Î¤è¤¦¤Ê¾ì¹ç¤Ï¡¢¼ÂÁõ¤Ë¸ÇÍ­¤Î¥·¥¹¥Æ¥à¥×¥í¥Ñ¥Æ¥£¤Ç¤¢¤ë

sun.rmi.server.suppressStackTraces
¤ò¡Ötrue¡×¤ËÀßÄꤹ¤ë¤È¡¢¥µ¡¼¥Ð¦ Java RMI ¥é¥ó¥¿¥¤¥à¼ÂÁõ¤Ë¤è¤Ã¤Æ¡¢¥ê¥â¡¼¥È¥á¥½¥Ã¥É¤Î¸Æ¤Ó½Ð¤·¤Î·ë²Ì¡¢¸½ºß¤Î²¾ÁÛ¥Þ¥·¥ó¤«¤é¥¹¥í¡¼¤µ¤ì¤¿¤¹¤Ù¤Æ¤ÎÎã³°¤Î¥¹¥¿¥Ã¥¯¥È¥ì¡¼¥¹¤¬¾Ãµî¤µ¤ì¤Þ¤¹¡£

RMIClassLoader ÍÑ¥µ¡¼¥Ó¥¹¥×¥í¥Ð¥¤¥À¥¤¥ó¥¿¥Õ¥§¡¼¥¹ (1.4 °Ê¹ß)
java.rmi.server.RMIClassLoader ¤Î°ìÉô¤Î static ¥á¥½¥Ã¥É¤ÎÆ°ºî¤Ï¡¢¿·¤·¤¤¥µ¡¼¥Ó¥¹¥×¥í¥Ð¥¤¥À¥¤¥ó¥¿¥Õ¥§¡¼¥¹ java.rmi.server.RMIClassLoaderSpi ¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤Ë°Ñ¾ù¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¥µ¡¼¥Ó¥¹¥×¥í¥Ð¥¤¥À¤òÀßÄꤷ¤Æ¡¢»ØÄꤷ¤¿¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ËÂФ¹¤ë Java RMI ¤ÎưŪ¥¯¥é¥¹¥í¡¼¥Ç¥£¥ó¥°¤ÎÆ°ºî¤ò¶¯²½¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¥µ¡¼¥Ó¥¹¥×¥í¥Ð¥¤¥À¤Ï¡¢RMIClassLoader ¤Î static ¥á¥½¥Ã¥É¤¹¤Ù¤Æ¤Îɸ½àÆ°ºî¤ò¼ÂÁõ¤·¤Æ¤¤¤Þ¤¹¡£¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï¡¢RMIClassLoader ¤ª¤è¤Ó RMIClassLoaderSpi ¤Î¥¯¥é¥¹¥É¥­¥å¥á¥ó¥È¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£

ưŪ¤Ê¥µ¡¼¥Ð¥Û¥¹¥È̾ (1.4 °Ê¹ß)
java.rmi.server.hostname ¥×¥í¥Ñ¥Æ¥£¤¬Æ°Åª¤Ë¹¹¿·¤µ¤ì¡¢¤½¤Î¸å¤Î¥¨¥¯¥¹¥Ý¡¼¥È¤Ç¿·¤·¤¤¥Û¥¹¥È̾¤ò»ÈÍѤ¹¤ë¤è¤¦¤Ë»Ø¼¨¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡£¤·¤¿¤¬¤Ã¤Æ¡¢¿·¤·¤¤¥Û¥¹¥È̾¤ÎÃͤϡ¢¤³¤Î¥×¥í¥Ñ¥Æ¥£¤¬¹¹¿·¤µ¤ì¤¿¤¢¤È¤Ë¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤ë¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¹¥¿¥Ö¤Ë³ÊǼ¤µ¤ì¤Þ¤¹¡£

HTTP ¥Õ¥©¡¼¥ë¥Ð¥Ã¥¯¤Î¹½À®²ÄǽÀ­¤ÎÁý²Ã (1.4.1 °Ê¹ß)
¼ÂÁõ¸ÇÍ­¤Î¥·¥¹¥Æ¥à¥×¥í¥Ñ¥Æ¥£ sun.rmi.transport.proxy.eagerHttpFallback ¤¬Äɲ䵤졢Java RMI ¤Î¥Ç¥Õ¥©¥ë¥È¤Î¥½¥±¥Ã¥È¥Õ¥¡¥¯¥È¥ê¤¬ HTTP ¥È¥ó¥Í¥ê¥ó¥°¤Ë¥Õ¥©¡¼¥ë¥Ð¥Ã¥¯¤¹¤ëºÝ¤Ë¤è¤êºÙ¤«¤¯À©¸æ¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡£¤³¤Î¥×¥í¥Ñ¥Æ¥£¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Î¥½¥±¥Ã¥È¥Õ¥¡¥¯¥È¥ê¤ò¹½À®¤·¤Æ¡¢ºÇ½é¤Î (ľÀÜŪ¤Ê) Àܳ»î¹Ô¤Ë¤è¤Ã¤Æ¥¹¥í¡¼¤µ¤ì¤¿ SocketException ¤¬ HTTP ¥È¥ó¥Í¥ê¥ó¥°¤Î¥È¥ê¥¬¤Ë¤Ê¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£¤µ¤é¤Ë¡Ö¸·¤·¤¤¡×¤³¤Î¥Õ¥©¡¼¥ë¥Ð¥Ã¥¯¤Î¥¹¥È¥é¥Æ¥¸¤Ï¡¢¾µÇ§¤µ¤ì¤Æ¤¤¤Ê¤¤¥Ý¡¼¥È¤Ø¤ÎÀܳ»î¹Ô¤ò̵»ë¤¹¤ë¤Î¤Ç¤Ï¤Ê¤¯µñÈݤ¹¤ë¤è¤¦¤Ê¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤ò¼è¤ê°·¤¦¤È¤­¤ËÍ­ÍѤǤ¢¤ë²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£

java.rmi.Naming.list ¥á¥½¥Ã¥É¤ÏÊÖ¤µ¤ì¤ë̾Á°¤Ë¥¹¥­¡¼¥Þ¤òÉղ乤뤳¤È¤Ï¤Ê¤¤ (1.4.1 °Ê¹ß)
°ÊÁ°¤Î¥ê¥ê¡¼¥¹¤Ç¤Ï¡¢Naming.list ¥á¥½¥Ã¥É¤Ï¡¢ÊÖ¤µ¤ì¤¿Ê¸»úÎó¤ÎÇÛÎó¤Ë´Þ¤Þ¤ì¤ë̾Á°¤Ë¥¹¥­¡¼¥Þ rmi: ¤òÉղ䷤Ƥ¤¤Þ¤·¤¿¡£¸½ºß¤Î Naming.list ¤Î¼ÂÁõ¤Ï¤½¤Î»ÅÍͤ˹çÃפ·¤Æ¤ª¤ê¡¢URL ·Á¼°¤Î̾Á°¤ÎÇÛÎó¤òÊÖ¤·¤Þ¤¹¤¬¡¢¥¹¥­¡¼¥Þ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ï´Þ¤Þ¤ì¤Þ¤»¤ó¡£

java.rmi.activation.ActivationGroupDesc (1.3 °Ê¹ß)
¥°¥ë¡¼¥×¤Î¥¯¥é¥¹Ì¾¤òÊÖ¤¹ getClassName ¥á¥½¥Ã¥É¤¬¡¢¥·¥¹¥Æ¥à¤Î¥Ç¥Õ¥©¥ë¥È¥°¥ë¡¼¥×¼ÂÁõ¤ò¼¨¤¹ null ¤òÊÖ¤¹¤³¤È¤¬²Äǽ¤Ë¤Ê¤ê¤Þ¤·¤¿¡£¤³¤ì¤Þ¤Ç¤Ï¡¢µ­½Ò»Ò¤Î¹½ÃÛ»þ¤Ë¥Ç¥Õ¥©¥ë¥È¤Î¥°¥ë¡¼¥×¼ÂÁõ¤¬ÁªÂò¤µ¤ì¤¿¾ì¹ç¡¢getClassName ¥á¥½¥Ã¥É¤ÏÆâÉô¤Î¼ÂÁõ¥¯¥é¥¹¤Î̾Á°¤òÊÖ¤·¤Æ¤¤¤Þ¤·¤¿¡£

¤³¤ÎÊѹ¹¤ËÂбþ¤¹¤ë¤¿¤á¤Ë¡¢²¾ÁÛ¥Þ¥·¥ó 1.3 ¤Ç²ÔÆ°¤¹¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬¿·¤¿¤Êµ¯Æ°²Äǽ¥ª¥Ö¥¸¥§¥¯¥È¤ò ActivationSystem ¤ËÅÐÏ¿¤¹¤ë¾ì¹ç¡¢rmid ¤â 1.3 ¤ò¼Â¹Ô¤Ç¤­¤ë¤è¤¦¤Ë¥¢¥Ã¥×¥°¥ì¡¼¥É¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤³¤ì¤Ï¡¢1.3 ¤è¤êÁ°¤Î rmid ¤Ç¤Ï¿·¤¿¤ËÅÐÏ¿¤µ¤ì¤¿µ¯Æ°²Äǽ¥ª¥Ö¥¸¥§¥¯¥È¤òµ¯Æ°¤Ç¤­¤Ê¤¤¤¿¤á¤Ç¤¹¡£

Java RMI ¥¹¥¿¥Ö¥³¥ó¥Ñ¥¤¥é rmic (1.3 °Ê¹ß)
rmic (Solaris ¤ª¤è¤Ó Linux ÍÑ¡¢Windows ÍÑ) ¤Ç¤Ï¡¢¥¹¥¿¥Ö¤Î¥Ç¥Õ¥©¥ë¥È¤ÎÀ¸À®Àè¥Ç¥£¥ì¥¯¥È¥ê¤¬¡¢¥Ñ¥Ã¥±¡¼¥¸Ì¾¤ÎÉÕ¤¤¤¿¡¢¸½ºß¤Îºî¶È¥Ç¥£¥ì¥¯¥È¥ê¤Î¥µ¥Ö¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤Ê¤ê¤Þ¤·¤¿¡£¡Ö-d¡×¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤Ê¤¤¾ì¹ç¤Ï¡¢¸½ºß¤Îºî¶È¥Ç¥£¥ì¥¯¥È¥ê¡Ö.¡×¤¬°ú¿ô¤È¤·¤Æ»ØÄꤵ¤ì¤Æ¤¤¤ë¤È¸«¤Ê¤µ¤ì¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤ÎÀ¸À®Àè¥Ç¥£¥ì¥¯¥È¥ê¤ò¥ª¡¼¥Ð¡¼¥é¥¤¥É¤·¤Æ¤â¡¢¡Ö-d¡×¤¬»È¤ï¤ì¤Þ¤¹¡£

IDL ¤ª¤è¤Ó IIOP ¤Î¥¹¥¿¥Ö¤òÀ¸À®¤¹¤ë¤¿¤á¤Ë¡¢¡Ö-idl¡×¤È¡Ö-iiop¡×¥ª¥×¥·¥ç¥ó¤¬Äɲ䵤ì¤Þ¤·¤¿¡£

Java RMI µ¯Æ°¥Ç¡¼¥â¥ó rmid (1.3 °Ê¹ß)
¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢rmid (Solaris ¤ª¤è¤Ó Linux ÍÑ¡¢Windows ÍÑ) ¤Ï¸½ºß¡¢¥»¥­¥å¥ê¥Æ¥£¥Ý¥ê¥·¡¼¥Õ¥¡¥¤¥ë¤òÍ׵ᤷ¤Þ¤¹¡£

¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¤ÎľÎó²½ (1.2.2 °Ê¹ß)
1.2.2 ¤è¤êÁ°¤Ï¡¢¥¢¥ó¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤¿¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¤ò RMI ¸Æ¤Ó½Ð¤·¤ËÅϤ½¤¦¤È¤¹¤ë¤È¡¢java.rmi.StubNotFoundException ¤¬ÊÖ¤µ¤ì¤Þ¤·¤¿¡£RMI ¥é¥ó¥¿¥¤¥à¤Ç¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¼ÂÁõ¤òÂбþ¤¹¤ë¥¹¥¿¥Ö¤ËÃÖ´¹¤·¤Æ¤¤¤ë¤È¤­¤Ë¡¢¥¹¥¿¥Ö¥ª¥Ö¥¸¥§¥¯¥È¤Î¸¡º÷¤Ë¼ºÇÔ¤¹¤ë¤È¤³¤ÎÎã³°¤¬È¯À¸¤·¤Æ¤¤¤Þ¤·¤¿¡£1.2.2 °Ê¹ß¤Î¥ê¥ê¡¼¥¹¤Ç¤Ï¡¢¥¢¥ó¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤¿¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¤ò RMI ¸Æ¤Ó½Ð¤·¤ËÅϤ·¤Æ¤â¡¢Îã³°¤ÏȯÀ¸¤·¤Þ¤»¤ó¡£¥¹¥¿¥Ö¤ÎÂå¤ï¤ê¤Ë¡¢¤³¤Î¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¤¬Ä¾Î󲽤µ¤ì¤Þ¤¹¡£¥ê¥â¡¼¥È¥ª¥Ö¥¸¥§¥¯¥È¼ÂÁõ¤¬Ä¾Îó²½²Äǽ¤Ç¤Ê¤¤¾ì¹ç¤Ï¡¢¥¢¥ó¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤¿¥ª¥Ö¥¸¥§¥¯¥È¤ò RMI ¸Æ¤Ó½Ð¤·¤ËÅϤ½¤¦¤È¤¹¤ë¤È¡¢java.rmi.RemoteException ¤ª¤è¤ÓÆþ¤ì»Ò¤Ë¤µ¤ì¤¿Îã³° java.io.NotSerializableException ¤¬ÊÖ¤µ¤ì¤Þ¤¹¡£

Copyright © 2004 Sun Microsystems, Inc.All Rights Reserved. 
¥³¥á¥ó¥È¤ÎÁ÷ÉÕÀè: rmi-comments@java.sun.com 
Sun