javaÔ¶³ÌͨѶ¼°¼òµ¥ÊµÏÖ
ÔÚ·Ö²¼Ê½·þÎñ¿ò¼ÜÖУ¬Ò»¸ö×î»ù´¡µÄÎÊÌâ¾ÍÊÇÔ¶³Ì·þÎñÊÇÔõôͨѶµÄ£¬ÔÚJavaµ×²ãÁìÓòÖÐÓкܶà¿ÉʵÏÖÔ¶³ÌͨѶµÄ¼¼Êõ£¬ÀýÈ磺RMI¡¢MINA¡¢ESB¡¢Burlap¡¢SOAP¡¢EJBºÍJMS µÈ£¬ÔÚj2eeÖÐ,¶Ôjavaµ×²ãÔ¶³ÌͨѶµÄ¼¼Êõ½øÐÐÁË·â×°,ÐγÉÁË Hessian ¡¢ HttpInvoker ¡¢ XFire ¡¢ Axis µÈ¶àÖÖÐÎʽµÄÔ¶³Ìµ÷Óü¼Êõ¡£ µ«¶Ô¸ß¼¶³ÌÐòÔ±¶øÑÔÈÔÐèÒªÕÆÎÕJavaµ×²ãÁìÓòÖÐÔ¶³ÌͨѶµÄ¼¼Êõ,ÓÈÆäÊÇrmi,xml-rpc,JMS¡£
1.Ô¶³Ì·þÎñ»ù±¾ÔÀí
1)µ×²ãÐÒé
¡¡¡¡ÒªÊµÏÖÍøÂç»úÆ÷¼äµÄͨѶ£¬Ê×ÏȵÃÀ´¿´¿´¼ÆËã»úϵͳÍøÂçͨÐŵĻù±¾ÔÀí£¬Ôڵײã²ãÃæÈ¥¿´£¬ÍøÂçͨÐÅÐèÒª×öµÄ¾ÍÊǽ«Á÷´Óһ̨¼ÆËã»ú´«Êäµ½ÁíÍâһ̨¼ÆËã»ú£¬»ùÓÚ´«ÊäÐÒéºÍÍøÂçIOÀ´ÊµÏÖ£¬ÆäÖд«ÊäÐÒé±È½Ï³öÃûµÄÓÐhttp¡¢tcp¡¢udpµÈµÈ£¬http¡¢tcp¡¢udp¶¼ÊÇÔÚ»ùÓÚSocket¸ÅÄîÉÏΪijÀàÓ¦Óó¡¾°¶øÀ©Õ¹³öµÄ´«ÊäÐÒ飬ÍøÂçIO£¬Ö÷ÒªÓÐbio¡¢nio¡¢aioÈýÖÖ·½Ê½£¬ËùÓеķֲ¼Ê½Ó¦ÓÃͨѶ¶¼»ùÓÚÕâ¸öÔÀí¶øʵÏÖ£¬Ö»ÊÇΪÁËÓ¦ÓõÄÒ×Ó㬸÷ÖÖÓïÑÔͨ³£¶¼»áÌṩһЩ¸üΪÌù½üÓ¦ÓÃÒ×ÓõÄÓ¦ÓòãÐÒé¡£
2)Ó¦Óü¶ÐÒé
¡¡¡¡Ô¶³Ì·þÎñͨѶ£¬ÐèÒª´ïµ½µÄÄ¿±êÊÇÔÚһ̨¼ÆËã»ú·¢ÆðÇëÇó£¬ÁíÍâһ̨»úÆ÷ÔÚ½ÓÊÕµ½ÇëÇóºó½øÐÐÏàÓ¦µÄ´¦Àí²¢½«½á¹û·µ»Ø¸øÇëÇó¶Ë£¬ÕâÆäÖÐÓÖ»áÓÐÖîÈçone way request¡¢Í¬²½ÇëÇó¡¢Òì²½ÇëÇóµÈµÈÇëÇó·½Ê½£¬°´ÕÕÍøÂçͨÐÅÔÀí£¬ÐèҪʵÏÖÕâ¸öÐèÒª×öµÄ¾ÍÊǽ«ÇëÇóת»»³ÉÁ÷£¬Í¨¹ý´«ÊäÐÒé´«ÊäÖÁÔ¶¶Ë£¬Ô¶¶Ë¼ÆËã»úÔÚ½ÓÊÕµ½ÇëÇóµÄÁ÷ºó½øÐд¦Àí£¬´¦ÀíÍê±Ïºó½«½á¹ûת»¯ÎªÁ÷£¬²¢Í¨¹ý´«ÊäÐÒé·µ»Ø¸øµ÷Óöˡ£
ÔÚjavaÁìÓòÖÐÖªÃûµÄÔ¶³ÌͨÐŵÄÓ¦Óü¶ÐÒéÓУºRMI¡¢XML-RPC¡¢Binary-RPC¡¢SOAP¡¢JMS
¡¡¡¡
2.RMI
2.1RMIÔÀí
RMI£¬¼´Java RMI£¨Java Remote Method Invocation£©,JavaÔ¶³Ì·½·¨µ÷ÓÃ.ÊÇJava±à³ÌÓïÑÔÀһÖÖÓÃÓÚʵÏÖÔ¶³Ì¹ý³Ìµ÷ÓõÄÓ¦ÓóÌÐò±à³Ì½Ó¿Ú¡£Ëüʹ¿Í»§»úÉÏÔËÐеijÌÐò¿ÉÒÔµ÷ÓÃÔ¶³Ì·þÎñÆ÷ÉϵĶÔÏó¡£Ô¶³Ì·½·¨µ÷ÓÃÌØÐÔʹJava±à³ÌÈËÔ±Äܹ»ÔÚÍøÂç»·¾³Öзֲ¼²Ù×÷¡£
¡¡¡¡RMIÊǸöµäÐ͵ÄΪjava¶¨ÖƵÄÔ¶³ÌͨÐÅÐÒ飬RMIÈ«²¿µÄ×ÚÖ¼¾ÍÊǾ¡¿ÉÄܼò»¯Ô¶³Ì½Ó¿Ú¶ÔÏóµÄʹÓá£
RMIµÄ»ù´¡Êǽӿڣ¬RMI¹¹¼Ü»ùÓÚÒ»¸öÖØÒªµÄÔÀí£º¶¨Òå½Ó¿ÚºÍ¶¨Òå½Ó¿ÚµÄ¾ßÌåʵÏÖÊÇ·Ö¿ªµÄ¡£
¡¡¡¡À´¿´Ï»ùÓÚRMIµÄÒ»´ÎÍêÕûµÄÔ¶³ÌͨÐŹý³ÌµÄÔÀí£º
¡¡¡¡1)¿Í»§¶Ë·¢ÆðÇëÇó£¬ÇëÇóת½»ÖÁRMI¿Í»§¶ËµÄstubÀà;
¡¡¡¡2)stubÀཫÇëÇóµÄ½Ó¿Ú¡¢·½·¨¡¢²ÎÊýµÈÐÅÏ¢½øÐÐÐòÁл¯;
¡¡¡¡3)»ùÓÚsocket½«ÐòÁл¯ºóµÄÁ÷´«ÊäÖÁ·þÎñÆ÷¶Ë;
¡¡¡¡
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
ÔÎijö´¦£ºhttp://developers.sun.com/techtopics/mobility/midp/articles/wtk23beta/
Sun Java Wireless ToolkitÔ½À´Ô½ºÃ£¬2.3beta°æ±¾Ôö¼ÓÁ˶ÔÓÚÈýÖÖеÄAPIµÄÖ§³Ö£º
l The Security and Trust Services APIs (SATSA, ......
Ò»Ö±±»Í¬²½¸ãµÃÔÎͷתÏò£¬½ñÌìÓöµ½ÁËҪд¾²Ì¬·½·¨£¬×ܵ£ÐĻ᲻»áÓÐͬ²½ÎÊÌ⣬½á¹û¿´ÁËÒÔÏÂһϯ»°£¬»íÈ»¿ªÀÊ~~
Every method of java will have a stack, and every invokation on that
method will have it's own 'stack frame'. So the locale data of one
method invokation will not affect others.
Please do not c ......
StrutsME Ò»¸öÇáÁ¿¼¶µÄÐòÁл¯ÐÒ飬ʹJ2ME¿Í»§¶ËÄܵ÷ÓÃStruts WebÓ¦ÓóÌÐò¡£
http://www.strutsme.org/
JsonME ÇáÁ¿¼¶ÊµÏÖJ2ME Json¡£
http://www.json.org/java/org.json.me.zip
MicroLog ÇáÁ¿¼¶µÄLOG
http://microlog.sourceforge.net/snapshot
Mobile Ajax for Java ME °üÀ¨ÁËXmlHttpRequest£¬jsonµÄÒ ......
/**
* »ñµÃʵЧʱ¼ä,µ±Ç°Ê±¼äÍƳÙ1¸öÔµÄʱ¼ä<br>
*
* @return
*/
private String getInvalidationTime() {
String invalidationTime ......