×î¼Ñʵ¼ù £º
¡¡¡¡1¡¢Ê¼ÖÕʹÓà MVC ¿ò¼Ü¡£
¡¡¡¡2¡¢ÔÚÿһ²ã¶¼Ó¦ÓÃ×Ô¶¯µ¥Ôª²âÊԺͲâÊÔ¹ÜÀí¡£
¡¡¡¡3¡¢°´Õչ淶À´½øÐпª·¢£¬¶ø²»ÊÇ°´ÕÕÓ¦Ó÷þÎñÆ÷À´½øÐпª·¢¡£
¡¡¡¡4¡¢´ÓÒ»¿ªÊ¼¾Í¼Æ»®Ê¹Óà J2EE °²È«ÐÔ¡£
¡¡¡¡5¡¢´´½¨ÄúËùÖªµÀµÄ¡£
¡¡¡¡6¡¢µ±Ê¹Óà EJB ×é¼þʱ£¬Ê¼ÖÕʹÓûỰ Facades¡£
¡¡¡¡7¡¢Ê¹ÓÃÎÞ״̬»á»° bean£¬¶ø²»ÊÇÓÐ״̬»á»° bean.
¡¡¡¡8¡¢Ê¹ÓÃÈÝÆ÷¹ÜÀíµÄÊÂÎñ¡£
¡¡¡¡9¡¢½« JSP ×÷Ϊ±íʾ²ãµÄÊ×Ñ¡¡£
¡¡¡¡10¡¢µ±Ê¹Óà HttpSession ʱ£¬¾¡Á¿Ö»½«µ±Ç°ÊÂÎñËùÐèÒªµÄ״̬±£´æÆäÖУ¬ÆäËûÄÚÈݲ»Òª±£´æÔÚ HttpSession ÖС£
¡¡¡¡11¡¢ÔÚ WebSphere ÖУ¬Æô¶¯¶¯Ì¬»º´æ£¬²¢Ê¹Óà WebSphere servlet »º´æ»úÖÆ¡£
¡¡¡¡12¡¢ÎªÁËÌá¸ß³ÌÐòÔ±µÄ¹¤×÷ЧÂÊ£¬½« CMP ʵÌå bean ×÷Ϊ O/R Ó³ÉäµÄÊ×Ñ¡½â¾ö·½°¸¡£
¡¡¡¡1. ʼÖÕʹÓà MVC ¿ò¼Ü¡£
¡¡¡¡MVC ¿ò¼Ü¿ÉÒÔ½«ÒµÎñÂß¼£¨Java beans ºÍ EJB ×é¼þ)¡¢¿ØÖÆÆ÷Âß¼£¨Servlets/Struts ¶¯×÷£©¡¢±íʾ²ã£¨JSP¡¢XML/XSLT£©ÇåÎúµØ·ÖÀ뿪À´¡£Á¼ºÃµÄ·Ö²ã¿ÉÒÔ´øÀ´Ðí¶àºÃ´¦¡£
¡¡¡¡MVC ¿ò¼Ü¶ÔÓڳɹ¦Ê¹Óà J2EE ÊÇÈç´ËÖØÒª£¬ÒÔÖÂûÓÐÆäËû×î¼Ñʵ¼ù¿ÉÒÔÓëÆäÏàÌá²¢ÂÛ¡£Ä£ÐÍ-ÊÓͼ-¿ØÖÆÆ÷£¨MVC£©ÊÇÉè¼Æ J2EE Ó¦ÓóÌÐòµÄ»ù´¡¡£MVC ½«ÄúµÄ³ÌÐò´úÂë¼òµ¥µØ»®·ÖÏÂÃ漸¸ö²¿·Ö£º
¡¡¡¡?¸ºÔðÒµÎñÂß¼µÄ´úÂ루¼´Ä£ÐÍ----ͨ³£Ê¹Óà EJB »òÕßÆÕͨµÄ Java ¶ÔÏóÀ´ÊµÏÖ£©¡£
¡¡¡¡?¸ºÔðÓû§½çÃæÏÔʾµÄ´úÂ루¼´ÊÓͼ----ͨ³£Í¨¹ý JSP ¼°±ê¼Ç¿âÀ´ÊµÏÖ£¬ÓÐʱҲʹÓà XML ºÍ XSLT À´ÊµÏÖ£©¡£
¡¡¡¡?¸ºÔðÓ¦ÓóÌÐòÁ÷³ÌµÄ´úÂ루¼´¿ØÖÆÆ÷----ͨ³£Ê¹Óà Java Servlet »òÏñ Struts ¿ØÖÆÆ÷ÕâÑùµÄÀàÀ´ÊµÏÖ£©¡£
¡¡¡¡Èç¹ûÄú²»×ñÑ»ù±¾µÄ MVC ¿ò¼Ü£¬ÔÚ¿ª·¢¹ý³ÌÖоͻá³öÏÖÐí¶àµÄÎÊÌâ¡£×î³£¼ûµÄÎÊÌâ¾ÍÊÇÔÚÊÓͼ²¿·ÖÌí¼ÓÁËÌ«¶àµÄ³É·Ö£¬ÀýÈ磬¿ÉÄÜ´æÔÚʹÓà JSP ±ê¼ÇÀ´Ö´ÐÐÊý¾Ý¿â·ÃÎÊ£¬»òÕßÔÚ JSP ÖнøÐÐÓ¦ÓóÌÐòµÄÁ÷³Ì¿ØÖÆ£¬ÕâÔÚС¹æÄ£µÄÓ¦ÓóÌÐòÖÐÊDZȽϳ£¼ûµÄ£¬µ«ÊÇ£¬ËæןóÆڵĿª·¢£¬ÕâÑù×ö½«»á´øÀ´ÎÊÌ⣬ÒòΪ JSP Öð²½±äµÃÔ½À´Ô½ÄÑÒÔά»¤ºÍµ÷ÊÔ¡£
¡¡¡¡ÀàËƵأ¬ÎÒÃÇÒ²¾³£¿´µ½½«ÊÓͼ²ã¹¹½¨µ½ÒµÎñÂß¼µÄÇé¿ö¡£ÀýÈ磬һ¸ö³£¼ûµÄÎÊÌâ¾ÍÊǽ«ÔÚ¹¹½¨ÊÓͼʱʹÓÃµÄ XML ½âÎö¼¼ÊõÖ±½ÓÓ¦Óõ½ÒµÎñ²ã¡£ÒµÎñ²ãÓ¦¸Ã¶ÔÒµÎñ¶ÔÏó----¶ø²»Êǰ󶨵½ÊÓͼµÄÌض¨Êý¾Ý±íʾ½øÐвÙ×÷¡£
¡¡¡¡È»¶ø£¬Ö»ÊǾßÓкÏÊʵÄ×é¼þ²¢²»Ò»¶¨Òâζ×Å¿ÉÒÔʹÄúµÄÓ¦ÓóÌÐòµÃµ½ºÏÊʵķֲ㡣ÎÒÃdz£³£¼ûµ½Ò»Ð©Ó¦ÓóÌÐò°üº¬ servlet¡¢JSP ºÍ EJB ×é¼þËùÓÐÕâÈýÏȻ¶ø£¬ÆäÖ÷ÒªµÄÒµÎñÂ߼ȴÊÇÔÚ servlet ²ãʵÏֵģ¬»òÕßÓ¦ÓóÌÐòµ¼º½ÊÇÔÚ JSP Öд¦ÀíµÄ¡£Äú±ØÐë½øÐÐÑϸñµÄ´úÂë¼ì²é²¢Öع¹ÄúµÄ´úÂ룬ÒÔÈ·±£Ó¦ÓóÌÐòµÄÒµÎñÂß¼Ö»ÔÚÄ£ÐͲ㣨Model layer£©½øÐд¦Àí£¬Ó¦ÓóÌÐòµ¼º½Ö»Í¨¹ý¿ØÖÆÆ÷²ã£¨Controller layer£©½øÐд¦Àí£¬¶øÄúµÄÊÓͼ£¨Views£©Ö»Êǽ«´«µÝ¹ýÀ´µÄÄ£ÐͶÔÏóÒÔ HTML ¼° JavaScript µÄÐÎʽ±íʾ³öÀ´¡£
¡¡¡¡2. ÔÚÓ¦ÓóÌÐòµÄÿһ²ã¶¼Ê¹ÓÃ×Ô¶¯µ¥Ôª²âÊԺͲâÊÔ¹ÜÀí¡£
¡¡¡¡²»ÒªÖ»ÊDzâÊÔÄúµÄͼÐÎÓû§½çÃ棨GUI)¡£·Ö²ãµÄ²âÊÔʹ²âÊÔ¼°Î¬»¤¹¤×÷±äµÃ¼«Æä¼òµ¥¡£
¡¡¡¡ÔÚ¹ýÈ¥µÄ¼¸ÄêÖУ¬ÔÚ·½·¨Ñ§ÁìÓòÓÐÁËÏ൱´óµÄ¸ïУ¬ÀýÈçгöÏֵı»³ÆΪ Agile£¨ÀýÈç SCRUM [Schwaber] ºÍ¼«ÏÞ±à³Ì [Beck1]£©µÄÇáÁ¿¼¶·½·¨ÏÖÔÚÒѾµÃµ½Á˺ÜÆÕ±éµÄÓ¦Ó᣼¸ºõËùÓеÄÕâЩ·½·¨ÖеÄÒ»¸ö¹²Í¬µÄÌØÕ÷ÊÇËüÃǶ¼ÌᳫʹÓÃ×Ô¶¯µÄ²âÊÔ¹¤¾ß£¬ÕâЩ¹¤¾ß¿ÉÒÔ°ïÖú¿ª·¢ÈËÔ±ÓøüÉÙµÄʱ¼ä½øÐлعé²âÊÔ (regression testing)£¬²¢¿ÉÒÔ°ïÖúËûÃDZÜÃâÓÉÓÚ²»³ä·ÖµÄ»Ø¹é²âÊÔÔì³ÉµÄ´íÎó£¬Òò´Ë¿ÉÒÔÓÃÀ´Ìá¸ß³ÌÐòÔ±µÄ¹¤×÷ЧÂÊ¡£Êµ¼ÊÉÏ£¬»¹ÓÐÒ»ÖÖ±»³ÆΪ Test-First Development [Beck2] µÄ·½·¨£¬ÕâÖÖ·½·¨ÉõÖÁÌᳫÔÚ¿ª·¢Êµ¼ÊµÄ´úÂë֮ǰ¾ÍÏȱàдµ¥Ôª²âÊÔ¡£È»¶ø£¬ÔÚÄú²âÊÔ´úÂë֮ǰ£¬ÄúÐèÒª½«´úÂë·Ö¸î³ÉһЩ¿É²âÊÔµÄƬ¶Ï¡£Ò»¸ö"´óÄàÇò"ÊÇÄÑÒÔ²âÊԵģ¬ÒòΪËü²»ÊÇֻʵÏÖÒ»¸ö¼òµ¥µÄÒ×ÓÚʶ±ðµÄ¹¦ÄÜ¡£Èç¹ûÄúµÄÿ¸ö´úÂëƬ¶ÏʵÏÖ¶à¸ö·½ÃæµÄ¹¦ÄÜ£¬ÕâÑùµÄ´úÂ뽫ÄÑÒÔ±£Ö¤ÆäÍêÈ«µÄÕýÈ·ÐÔ¡£
¡¡¡¡MVC ¿ò¼Ü£¨ÒÔ¼° J2EE ÖÐµÄ MVC ʵÏÖ£©µÄÒ»¸öÓŵã¾ÍÊÇÔªËصÄ×é¼þ»¯Äܹ»£¨Êµ¼ÊÉÏ£¬Ï൱µÄ¼òµ¥£©¶ÔÄúµÄÓ¦ÓóÌÐò½øÐе¥Ôª²âÊÔ¡£Òò´Ë£¬Äú¿ÉÒÔ·½±ãµØ¶ÔʵÌå bean¡¢»á»° bean ÒÔ¼° JSP ¶ÀÁ¢±àд²âÊÔÓÃÀý£¬¶ø²»±Ø¿¼ÂÇÆäËûµÄ´úÂë¡£ÏÖÔÚÓÐÐí¶àÓÃÓÚ J2EE ²âÊԵĿò¼ÜºÍ¹¤¾ß£¬ÕâЩ¿ò¼Ü¼°¹¤¾ßʹµÃÕâÒ»¹ý³Ì¸ü¼Ó¼òµ¥¡£ÀýÈ磬JUnit£¨ÊÇÒ»ÖÖÓÉ junit.org ¿ª·¢µÄ¿ª·ÅÔ´´úÂ빤¾ß£©ºÍ Cactus£¨ÓÉ Apache ¿ª·¢µÄ¿ª·ÅÔ´´úÂ빤¾ß£©¶ÔÓÚ²âÊÔ J2EE ×é¼þ¶¼·Ç³£ÓÐÓá£[Hightower] Ïêϸ̽ÌÖÁËÈçºÎÔÚ J2EE ÖÐʹÓÃÕâЩ¹¤¾ß¡£
¡¡¡¡¾¡¹ÜËùÓÐÕâЩÏêÊöÁËÔõÑù³¹µ×µØ²âÊÔÄúµÄÓ¦ÓóÌÐò£¬µ«ÊÇÎÒÃÇÈÔÈ»¿´µ½Ò»Ð©ÈËÈÏΪֻҪËûÃDzâÊÔÁË GUI£¨¿ÉÄÜÊÇ»ùÓÚ Web µÄ GUI£¬»òÕßÊǶÀÁ¢µÄ Java Ó¦ÓóÌÐò£©£¬ÔòËûÃǾÍÈ«ÃæµØ²âÊÔÁËÕû¸öÓ¦ÓóÌÐò¡£GUI ²âÊÔºÜÄѴﵽȫÃæµÄ²âÊÔ£¬ÓÐÒÔϼ¸ÖÖÔÒò¡£Ê×ÏÈ£¬Ê¹Óà GUI ²âÊÔºÜÄѳ¹µ×µØ²âÊÔµ½ÏµÍ³µÄÿһÌõ·¾¶£¬GUI ½ö½öÊÇÓ°ÏìϵͳµÄÒ»ÖÖ·½Ê½£¬¿ÉÄÜ´æÔÚºǫ́ÔËËã¡¢½Å±¾ºÍ¸÷ÖÖ¸÷ÑùµÄÆäËû·ÃÎʵ㣬ÕâÒ²ÐèÒª½øÐвâÊÔ¡£È»¶ø£¬ËüÃÇͨ³£²¢²»¾ßÓÐ GUI¡£µÚ¶þ£¬GUI ¼¶µÄ²âÊÔÊÇÒ»Öַdz£´ÖÁ£¶ÈµÄ²âÊÔ¡£ÕâÖÖ²âÊÔÖ»ÊÇÔÚºê¹ÛˮƽÉϲâÊÔϵͳµÄÐÐΪ¡£ÕâÒâζ×ÅÒ»µ©·¢ÏÖ´æÔÚÎÊÌ⣬ÔòÓë´ËÎÊÌâÏà¹ØµÄÕû¸ö×Óϵͳ¶¼Òª½øÐмì²é£¬ÕâʹµÃÕÒ³ö bug£¨È±ÏÝ£©½«ÊǷdz£À§ÄѵÄÊÂÇé¡£µÚÈý£¬GUI ²âÊÔͨ³£Ö»ÓÐÔÚÕû¸ö¿ª·¢ÖÜÆڵĺóÆÚ²ÅÄܺܺõصõ½²âÊÔ£¬ÕâÊÇÒòΪֻÓÐÕâÄǸöʱºò GUI ²ÅµÃµ½ÍêÕûµÄ¶¨Òå¡£ÕâÒâζ×ÅÖ»ÓÐÔÚºóÆڲſÉÄÜ·¢ÏÖDZÔÚµÄ bug¡£µÚËÄ£¬Ò»°ãµÄ¿ª·¢ÈËÔ±¿ÉÄÜûÓÐ×Ô¶¯µÄ GUI ²âÊÔ¹¤¾ß¡£Òò´Ë£¬µ±Ò»¸ö¿ª·¢ÈËÔ±¶Ô´úÂë½øÐиü¸Äʱ£¬Ã»ÓÐÒ»ÖÖ¼òµ¥µÄ·½·¨À´ÖØвâÊÔÊܵ½Ó°ÏìµÄ×Óϵͳ¡£Õâʵ¼ÊÉϲ»ÀûÓÚ½øÐÐÁ¼ºÃµÄ²âÊÔ¡£Èç¹û¿ª·¢ÈËÔ±¾ßÓÐ×Ô¶¯µÄ´úÂ뼶µ¥Ôª²âÊÔ¹¤¾ß£¬¿ª·¢ÈËÔ±¾ÍÄܹ»ºÜÈÝÒ×µØÔËÐÐÕâЩ¹¤¾ßÒÔÈ·±£Ëù×öµÄ¸ü¸Ä²»»áÆÆ»µÒѾ´æÔڵŦÄÜ¡£×îºó£¬Èç¹ûÌí¼ÓÁË×Ô¶¯¹¹½¨¹¦ÄÜ£¬ÔòÔÚ×Ô¶¯¹¹½¨¹ý³ÌÖÐÌí¼ÓÒ»¸ö×Ô¶¯µÄµ¥Ôª²âÊÔ¹¤¾ßÊǷdz£ÈÝÒ×µÄÊÂÇé¡£µ±Íê³ÉÕâЩÉèÖÃÒÔºó£¬Õû¸öϵͳ¾Í¿ÉÒÔÓйæÂɵؽøÐÐÖؽ¨£¬²¢Çһعé²âÊÔ¼¸ºõ²»ÐèÒªÈ˵IJÎÓë¡£
¡¡¡¡ÁíÍ⣬ÎÒÃDZØÐëÇ¿µ÷£¬Ê¹Óà EJB ºÍ Web ·þÎñ½øÐзֲ¼Ê½µÄ¡¢»ùÓÚ×é¼þµÄ¿ª·¢Ê¹µÃ²âÊÔµ¥¸öµÄ×é¼þ±äµÃ·Ç³£±ØÒª¡£Èç¹ûûÓÐ"GUI"ÐèÒª²âÊÔ£¬Äú¾Í±ØÐë½øÐеͼ¶£¨lower-level£©²âÊÔ¡£×îºÃÒÔÕâÖÖ·½Ê½¿ªÊ¼²âÊÔ£¬Ê¡µÃµ±Äú½«·Ö²¼Ê½µÄ×é¼þ»ò Web ·þÎñ×÷ΪÄúµÄÓ¦ÓóÌÐòµÄÒ»²¿·Öʱ£¬Äú²»µÃ²»»¨·ÑÐÄ˼ÖØнøÐвâÊÔ¡£
¡¡¡¡×ÜÖ®£¬Í¨¹ýʹÓÃ×Ô¶¯µÄµ¥Ôª²âÊÔ£¬Äܹ»ºÜ¿ìµØ·¢ÏÖϵͳµÄȱÏÝ£¬²¢ÇÒÒ²Ò×ÓÚ·¢ÏÖÕâЩȱÏÝ£¬Ê¹µÃ²âÊÔ¹¤×÷±äµÃ¸ü¼Óϵͳ»¯£¬Òò´ËÕûÌåµÄÖÊÁ¿Ò²µÃÒÔÌá¸ß¡£
¡¡¡¡3. °´Õչ淶À´½øÐпª·¢£¬¶ø²»ÊÇ°´ÕÕÓ¦Ó÷þÎñÆ÷À´½øÐпª·¢¡£
¡¡¡¡Òª½«¹æ·¶Êì¼ÇÓÚÐÄ£¬Èç¹ûÒª±³Àë¹æ·¶£¬Òª¾¹ýÉ÷ÃܵĿ¼ÂǺó²Å¿ÉÒÔÕâÑù×ö¡£ÕâÊÇÒòΪµ±Äú±³Àë¹æÔòµÄʱºò£¬ÄúËù×öµÄÊÂÇéÍùÍù²¢²»ÊÇÄúÓ¦¸Ã×öµÄÊÂÇé¡£
¡¡¡¡µ±ÄúÒª±³Àë J2EE ¿ÉÒÔÔÊÐíÄú×öµÄÊÂÇéµÄʱºò£¬ÕâºÜÈÝÒ×ÈÃʹÄúÔâÊܲ»ÐÒ¡£ÎÒÃÇ·¢ÏÖÓÐһЩ¿ª·¢ÈËÔ±×êÑÐһЩ J2EE ÔÊÐíÖ®ÍâµÄ¶«Î÷£¬ËûÃÇÈÏΪÕâÑù×ö¿ÉÒÔ"ÉÔ΢"¸ÄÉÆJ2EEµÄÐÔÄÜ£¬¶øËûÃÇ×îÖÕÖ»»á·¢ÏÖÕâÑù×ö»áÒýÆðÑÏÖصÄÐÔÄÜÎÊÌ⣬»òÕßÔÚÒÔºóµÄÒÆÖ²£¨´ÓÒ»¸ö³§É̵½ÁíÒ»¸ö³§ÉÌ£¬»òÕßÊǸü³£¼ûµÄ´ÓÒ»¸ö°æ±¾µ½ÁíÒ»¸ö°æ±¾£©Öлá³öÏÖÎÊÌ⡣ʵ¼ÊÉÏ£¬ÕâÖÖÒÆÖ²ÎÊÌâÊÇÈç´ËÑÏÖØ£¬ÒÔÖ [Beaton] ½«´ËÔÔò³ÆΪÒÆÖ²¹¤×÷µÄ»ù±¾×î¼Ñʵ¼ù¡£
¡¡¡¡ÏÖÔÚÓкü¸¸öµØ·½Èç¹û²»Ö±½ÓʹÓà J2EE ÌṩµÄ·½·¨¿Ï¶¨»á²úÉúÎÊÌâ¡£Ò»¸ö³£¼ûµÄÀý×Ó¾ÍÊÇ¿ª·¢ÈËԱͨ¹ýʹÓà JAAS Ä£¿éÀ´Ìæ´ú J2EE °²È«ÐÔ£¬¶ø²»ÊÇʹÓÃÄÚÖõÄ×ñѹ淶µÄÓ¦ÓóÌÐò·þÎñÆ÷»úÖÆÀ´½øÐÐÑéÖ¤ºÍÊÚȨ¡£Òª×¢Òâ²»ÒªÍÑÀë J2EE ¹æ·¶ÌṩµÄÑéÖ¤»úÖÆ£¬Èç¹ûÍÑÀëÁ˴˹淶£¬Õ⽫ÊÇϵͳ´æÔÚ°²È«Â©¶´ÒÔ¼°³§É̼æÈÝÐÔÎÊÌâµÄÖ÷ÒªÔÒò¡£ÀàËƵأ¬ÒªÊ¹Óà servlet ºÍ EJB ¹æ·¶ÌṩµÄÊÚȨ»úÖÆ£¬²¢ÇÒÈç¹ûÄúҪƫÀëÕâЩ¹æ·¶µÄ»°£¬ÒªÈ·±£Ê¹Óù淶¶¨ÒåµÄ API£¨ÀýÈç getCallerPrincipal()£©×÷ΪʵÏֵĻù´¡¡£Í¨¹ýÕâÖÖ·½Ê½£¬Äú½«Äܹ»ÀûÓó§ÉÌÌṩµÄÇ¿°²È«ÐÔ»ù´¡ÉèÊ©£¬ÆäÖУ¬ÒµÎñÒªÇóÐèÒªÖ§³Ö¸´ÔÓµÄÊÚȨ¹æÔò¡£
¡¡¡¡ÆäËû³£¼ûµÄÎÊÌâ°üÀ¨Ê¹Óò»×ñÑ J2EE ¹æ·¶µÄ³Ö¾ÃÐÔ»úÖÆ£¨ÕâʹµÃÊÂÎñ¹ÜÀí±äµÃÀ§ÄÑ£©¡¢ÔÚJ2EE³ÌÐòÖÐʹÓò»Êʵ±µÄJ2SE ·½·¨£¨ÀýÈçÏ̻߳ò singleton£©£¬ÒÔ¼°Ê¹ÓÃÄú×Ô¼ºµÄ·½·¨½â¾ö³ÌÐòµ½³ÌÐò£¨program-to-program£©µÄͨÐÅ£¬¶ø²»ÊÇʹÓà J2EE ÄÚÔÚÖ§³ÖµÄ»úÖÆ£¨ÀýÈç JCA¡¢JMS »ò Web ·þÎñ£©¡£µ±Äú½«Ò»¸ö×ñÑ J2EE µÄ·þÎñÆ÷ÒÆÖ²µ½ÆäËûµÄ·þÎñÆ÷ÉÏ£¬»òÕßÒÆÖ²µ½Ïàͬ·þÎñÆ÷µÄа汾ÉÏ£¬ÉÏÊöµÄÉè¼ÆÑ¡Ôñ½«»áÔì³ÉÎÞÊýµÄÎÊÌ⡣ΨһҪ±³Àë¹æ·¶µÄÇé¿öÊÇ£¬µ±Ò»¸öÎÊÌâÔڹ淶µÄ·¶Î§ÄÚÎÞ·¨½â¾öµÄʱºò¡£ÀýÈ磬°²ÅÅÖ´Ðж¨Ê±µÄÒµÎñÂß¼ÔÚ EJB2.1 ³öÏÖ֮ǰÊÇÒ»¸öÎÊÌ⣬ÔÚÀàËÆÕâÑùµÄÇé¿öÏ£¬ÎÒÃǽ¨Òéµ±Óг§ÉÌÌṩµÄ½â¾ö·½°¸Ê±¾ÍʹÓó§ÉÌÌṩµÄ½â¾ö·½°¸£¨ÀýÈç WebSphere Application Server Enterprise ÖÐµÄ Scheduler ¹¤¾ß£©£¬¶øÔÚûÓг§ÉÌÌṩµÄ½â¾ö·½°¸Ê±¾ÍʹÓõÚÈý·½ÌṩµÄ¹¤¾ß¡£Èç¹ûʹÓó§ÉÌÌṩµÄ½â¾ö·½°¸£¬Ó¦ÓóÌÐòµÄά»¤ÒÔ¼°½«ÆäÒÆÖ²µ½ÐµĹ淶°æ±¾½«Êdz§É̵ÄÎÊÌ⣬¶ø²»ÊÇÄúµÄÎÊÌâ¡£
¡¡¡¡×îºó£¬Òª×¢ÒⲻҪ̫ÔçµØ²ÉÓÃм¼Êõ¡£Ì«¹ýÓÚÈÈÖÔ²ÉÓû¹Ã»Óм¯³Éµ½ J2EE ¹æ·¶µÄÆäËû²¿·Ö»òÕß»¹Ã»Óм¯³Éµ½³§É̵IJúÆ·Öеļ¼Êõ³£»á´øÀ´ÔÖÄÑÐԵĺó¹û¡£Ö§³ÖÊǹؼüµÄ----Èç¹ûÄúµÄ³§É̲»Ö±½ÓÖ§³ÖÒ»ÖÖÌض¨µÄÔÚ JSR ÖÐÌá³öµÄ¼¼Êõ£¬µ«´Ë¼¼Êõ»¹Ã»Óб» J2EE Ëù½ÓÊÜ£¬ÄÇôÄú¾Í²»Ó¦¸Ã²ÉÓô˼¼Êõ¡£±Ï¾¹£¬ÎÒÃÇÖеĴó¶àÊýÈË´Óʽâ¾öÒµÎñÎÊÌ⣬¶ø²»ÊÇÍƽø¼¼ÊõµÄ·¢Õ¹¡£
¡¡¡¡4. ´ÓÒ»¿ªÊ¼¾Í¼Æ»®Ê¹Óà J2EE °²È«ÐÔ¡£
¡¡¡¡ÆôÓà WebSphere °²È«ÐÔ¡£ÕâʹÄúµÄ EJB ºÍ URL ÖÁÉÙ¿ÉÒÔÈÃËùÓÐÊÚȨÓû§·ÃÎÊ¡£²»ÒªÎÊΪʲô----ÕÕ×Å×ö¾ÍÊÇÁË¡£
¡¡¡¡ÔÚÓëÎÒÃǺÏ×÷µÄ¿Í»§ÖУ¬Ò»¿ªÊ¼¾Í´òËãÆôÓà WebSphere J2EE °²È«ÐԵĹ˿ÍÊǷdz£Éٵģ¬ÕâÒ»µãÒ»Ö±ÈÃÎÒÃǸе½³Ô¾ª¡£¾ÝÎÒÃǹÀ¼Æ´óÔ¼Ö»ÓÐ 50% µÄ¹Ë¿ÍÒ»¿ªÊ¼¾Í´òËãʹÓôËÌØÐÔ¡£ÀýÈ磬ÎÒÃÇÔøÓëһЩ´óÐ͵ĽðÈÚ»ú¹¹£¨ÒøÐС¢´úÀíµÈµÈ£©ºÏ×÷¹ý£¬ËûÃÇҲûÓдòËãÆôÓð²È«ÐÔ¡£ÐÒÔ˵ÄÊÇ£¬ÕâÖÖÎÊÌâÔÚ²¿Êð֮ǰµÄ¼ì²éʱ¾ÍµÃÒÔ½â¾ö.
¡¡¡¡²»Ê¹Óà J2EE °²È«ÐÔÊÇΣÏÕµÄÊÂÇé¡£¼ÙÉèÄúµÄÓ¦ÓóÌÐòÐèÒª°²È«ÐÔ£¨¼¸ºõËùÓеÄÓ¦ÓóÌÐò¶¼ÐèÒª£©£¬Äú¸Ò´ò¶ÄÄúµÄ¿ª·¢ÈËÔ±Äܹ»¹¹½¨³ö×Ô¼ºµÄ°²È«ÐÔϵͳ£¬¶øÕâ¸öϵͳ±ÈÄú´Ó J2EE ³§ÉÌÄÇÀïÂòÀ´µÄ¸üºÃ¡£Õâ¿É²»ÊǸöºÃµÄ¶Ä×¢£¬Îª·Ö²¼Ê½µÄÓ¦ÓóÌÐòÌṩ°²È«ÐÔÊÇÒì³£À§Äѵġ£ÀýÈ磬ÄúÐèҪʹÓÃÍøÂ簲ȫ¼ÓÃÜÁîÅÆ¿ØÖÆ¶Ô EJB µÄ·ÃÎÊ¡£ÒÔÎÒÃǵľÑé¿´À´£¬´ó¶àÊý×Ô¼º¹¹½¨µÄ°²È«ÐÔϵͳÊDz»°²È«µÄ£¬²¢ÇÒÓÐÖØ´óµÄȱÏÝ£¬Õâʹ²úƷϵͳ¼«Æä´àÈõ¡£
¡¡¡¡Ò»Ð©²»Ê¹Óà J2EE °²È«ÐÔµÄÀíÓÉ°üÀ¨£ºµ£ÐÄÐÔÄܵÄϽµ£¬ÏàÐÅÆäËûµÄ°²È«ÐÔ£¨ÀýÈç Netegrity SiteMinder£©¿ÉÒÔÈ¡´ú J2EE °²È«ÐÔ£¬»òÕßÊDz»ÖªµÀ WebSphere Application Server °²È«ÌØÐÔ¼°¹¦ÄÜ¡£²»ÒªÏÝÈëÕâЩÏÝÚåÖ®ÖУ¬ÓÈÆäÊÇ£¬¾¡¹ÜÏñ Netegrity SiteMinder ÕâÑùµÄ²úÆ·Äܹ»ÌṩÓÅÐãµÄ°²È«ÌØÐÔ£¬µ«Êǽö½öÆä×ÔÉí²»¿ÉÄܱ£»¤Õû¸ö J2EE Ó¦ÓóÌÐò¡£ÕâЩ²úÆ·±ØÐëÓë J2EE Ó¦ÓóÌÐò·þÎñÆ÷ÁªºÏÆðÀ´²Å¿ÉÄÜÈ«ÃæµØ±£»¤ÄúµÄϵͳ¡£
¡¡¡¡ÆäËûµÄÒ»ÖÖ³£¼ûµÄ²»Ê¹Óà J2EE °²È«ÐÔµÄÔÒòÊÇ£º»ùÓÚ½ÇÉ«µÄÄ£ÐÍûÓÐÌṩ×ã¹»µÄÁ£¶È·ÃÎÊ¿ØÖÆÒÔÂú×㸴ÔÓµÄÒµÎñ¹æÔò¡£¾¡¹ÜÊÂʵÊÇÕâÑùµÄ£¬µ«ÕâÒ²²»Ó¦¸Ã³ÉΪ²»Ê¹Óà J2EE °²È«ÐÔµÄÀíÓÉ¡£Ïà·´µØ£¬Ó¦¸Ã½« J2EE ÑéÖ¤¼° J2EE ½ÇÉ«ÓëÌض¨µÄÀ©Õ¹¹æÔò½áºÏÆðÀ´¡£Èç¹û¸´ÔÓµÄÒµÎñ¹æÔòÐèÒª×ö³ö°²È«ÐÔ¾ö²ß£¬ÄǾͱàдÏàÓ¦µÄ´úÂ룬Æ䰲ȫÐÔ¾ö²ßÒª»ùÓÚ¿ÉÒÔÖ±½ÓʹÓõÄÒÔ¼°¿É¿¿µÄ J2EE ÑéÖ¤ÐÅÏ¢£¨Óû§ ID ºÍ½ÇÉ«£©¡£
¡¡¡¡5. ´´½¨ÄúËùÖªµÀµÄ¡£
¡¡¡¡·´¸´µÄ¿ª·¢¹¤×÷½«Ê¹ÄúÄܹ»Öð½¥µØÕÆÎÕËùÓÐµÄ J2EE Ä£¿é¡£Òª´Ó´´½¨Ð¡¶ø¼òµ¥µÄÄ£¿é¿ªÊ¼¶ø²»ÊÇ´ÓÒ»¿ªÊ¼¾ÍÂíÉÏÉæ¼°µ½ËùÓеÄÄ£¿é¡£
¡¡¡¡ÎÒÃDZØÐë³ÐÈÏ J2EE ÊÇÅÓ´óµÄÌåϵ¡£Èç¹ûÒ»¸ö¿ª·¢Ð¡×éÖ»ÊÇ¿ªÊ¼Ê¹Óà J2EE£¬Õ⽫ºÜÄÑÒ»ÏÂ×Ó¾ÍÄÜÕÆÎÕËü¡£ÔÚ J2EE ÖÐÓÐÌ«¶àµÄ¸ÅÄîºÍ API ÐèÒªÕÆÎÕ¡£ÔÚÕâÖÖÇé¿öÏ£¬³É¹¦ÕÆÎÕ J2EE µÄ¹Ø¼üÊÇ´Ó¼òµ¥µÄ²½Ö迪ʼ×öÆð¡£
¡¡¡¡ÕâÖÖ·½·¨¿ÉÒÔͨ¹ýÔÚÄúµÄÓ¦ÓóÌÐòÖд´½¨Ð¡¶ø¼òµ¥µÄÄ£¿éÀ´µÃµ½×îºÃµÄʵÏÖ¡£Èç¹ûÒ»¸ö¿ª·¢Ð¡×éͨ¹ý´´½¨Ò»¸ö¼òµ¥µÄÓòÄ£ÐÍÒÔ¼°ºó¶ËµÄ³Ö¾ÃÐÔ»úÖÆ£¨Ò²ÐíʹÓõÄÊÇ JDBC£©,²¢ÇÒ¶ÔÆä½øÐÐÁËÍêÕûµÄ²âÊÔ£¬Õâ»áÔöÇ¿ËûÃǵÄ×ÔÐÅÐÄ£¬ÓÚÊÇËûÃÇ»áʹÓøÃÓòÄ£ÐÍÈ¥ÕÆÎÕʹÓà servlet ºÍ JSP µÄÇ°¶Ë¿ª·¢¡£Èç¹ûÒ»¸ö¿ª·¢×é·¢ÏÖÓбØҪʹÓà EJB£¬ËûÃÇÒ²»áÀàËƵؿªÊ¼ÔÚÈÝÆ÷¹ÜÀíµÄ³Ö¾ÃÐÔ EJB ×é¼þÖ®ÉÏʹÓüòµ¥µÄ»á»° Facades£¬»òÕßʹÓûùÓÚ JDBC µÄÊý¾Ý·ÃÎʶÔÏó£¨JDBC-based Data Access Objects£¬DAO£©£¬¶ø²»ÊÇÌø¹ýÕâЩȥʹÓøü¼Ó¸´ÔӵĹ¹Ô죨ÀýÈçÏûÏ¢Çý¶¯beanºÍJMS£©¡£
¡¡¡¡ÕâÖÖ·½·¨²¢²»ÊÇʲôз½·¨£¬µ«ÊǺÜÉÙÓпª·¢×éÒÔÕâÖÖ·½Ê½À´ÅàÑøËûÃǵļ¼ÄÜ¡£Ïà·´µØ£¬¶àÊý¿ª·¢×éÓÉÓÚ³¢ÊÔÂíÉϾ͹¹½¨ËùÓеÄÄ£¿é£¬Í¬Ê±Éæ¼° MVC ÖеÄÊÓͼ²ã¡¢Ä£ÐͲãºÍ¿ØÖÆÆ÷²ã£¬ÕâÑù×öµÄ½á¹ûÊÇËûÃÇÍùÍù»áÏÝÈë½ø¶ÈµÄѹÁ¦Ö®ÖС£ËûÃÇÓ¦¸Ã¿¼ÂÇһЩÃô½Ý£¨Agile£©¿ª·¢·½·¨£¬ÀýÈ缫ÏÞ±à³Ì£¨XP£©£¬ÕâÖÖ¿ª·¢·½·¨²ÉÓÃÒ»ÖÖÔöÁ¿Ñ§Ï°¼°¿ª·¢·½·¨¡£ÔÚ XP ÖÐÓÐÒ»ÖÖ³ÆΪ ModelFirst µÄ¹ý³Ì£¬Õâ¸ö¹ý³ÌÉæ¼°µ½Ê×Ïȹ¹½¨ÓòÄ£ÐÍ×÷ΪһÖÖ»úÖÆÀ´×éÖ¯ºÍʵÏÖÓû§³¡¾°¡£»ù±¾ËµÀ´£¬ÄúÒª¹¹½¨ÓòÄ£ÐÍ×÷ΪÄúҪʵÏÖµÄÓû§³¡¾°µÄÊ×Òª²¿·Ö£¬È»ºóÔÚÓòÄ£ÐÍÖ®ÉϹ¹½¨Ò»¸öÓû§½çÃ棨UI£©×÷ΪÓû§³¡¾°ÊµÏֵĽá¹û¡£ÕâÖÖ·½·¨·Ç³£ÊʺÏÈÃÒ»¸ö¿ª·¢×éÒ»´Îֻѧµ½Ò»ÖÖ¼¼Êõ£¬¶ø²»ÊÇÈÃËûÃÇͬʱÃæ¶ÔºÜ¶àÖÖÇé¿ö£¨»òÕßÈÃËûÃǶÁºÜ¶àÊ飩£¬Õâ»áÁîËûÃDZÀÀ£µÄ¡£
¡¡¡¡»¹ÓУ¬¶Ôÿ¸öÓ¦ÓóÌÐò²ãÖظ´µÄ¿ª·¢¿ÉÄÜ»á°üº¬Ò»Ð©Êʵ±µÄģʽ¼°×î¼Ñʵ¼ù¡£Èç¹ûÄú´ÓÓ¦ÓóÌÐòµÄµ×²ã¿ªÊ¼Ó¦ÓÃһЩģʽÈçÊý¾Ý·ÃÎʶÔÏóºÍ»á»° Facades£¬Äú¾Í²»Ó¦¸ÃÔÚÄúµÄJSPºÍÆäËûÊÓͼ¶ÔÏóÖÐʹÓÃÓòÂß¼¡£
¡¡¡¡×îºó£¬µ±Äú¿ª·¢Ò»Ð©¼òµ¥µÄÄ£¿éʱ£¬ÔÚ¿ªÊ¼µÄ³õÆھͿÉÒÔ¶ÔÄúµÄÓ¦ÓóÌÐò½øÐÐÐÔÄܲâÊÔ¡£Èç¹ûÖ±µ½Ó¦ÓóÌÐò¿ª·¢µÄºóÆڲŽøÐÐÐÔÄܲâÊԵĻ°£¬ÕâÍùÍù»á³öÏÖÔÖÄÑÐԵĺó¹û¡£
¡¡¡¡6. µ±Ê¹Óà EJB ×é¼þʱ£¬Ê¼ÖÕʹÓûỰ Facades¡£
¡¡¡¡¾ö²»Òª½«ÊµÌå bean Ö±½Ó±©Â¶¸øÈκÎÓû§ÀàÐÍ¡£¶ÔʵÌå bean Ö»¿ÉÒÔʹÓñ¾µØ EJB ½Ó¿Ú£¨Local EJB interfaces£©¡£
¡¡¡¡µ±Ê¹Óà EJB ×é¼þʱ£¬Ê¹ÓÃÒ»¸ö»á»° Facades ÊÇÒ»¸öÈ·ÈÏÎÞÒɵÄ×î¼Ñʵ¼ù¡£Êµ¼ÊÉÏ£¬Õâ¸öͨÓõÄʵ¼ù±»¹ã·ºµØÓ¦Óõ½Èκηֲ¼Ê½µÄ¼¼ÊõÖУ¬°üÀ¨ CORBA¡¢EJB ºÍ DCOM¡£´Ó¸ù±¾ÉϽ²£¬ÄúµÄÓ¦ÓóÌÐòµÄ·Ö²¼"½»²æÇøÓò"Ô½Êǵײ㻯£¬¶ÔС¿éµÄÊý¾ÝÓÉÓÚ¶à´ÎÖظ´µÄÍøÂçÖмÌÔì³ÉµÄʱ¼äÏûºÄ¾ÍÔ½ÉÙ¡£Òª´ïµ½Õâ¸öÄ¿µÄµÄ·½·¨¾ÍÊÇ£º´´½¨´óÁ£¶ÈµÄ Facades ¶ÔÏó£¬Õâ¸ö¶ÔÏó°üº¬Âß¼×Óϵͳ£¬Òò¶ø¿ÉÒÔͨ¹ýÒ»¸ö·½·¨µ÷ÓþͿÉÒÔÍê³ÉһЩÓÐÓõÄÒµÎñ¹¦ÄÜ¡£ÕâÖÖ·½·¨²»µ«Äܹ»½µµÍÍøÂ翪Ïú£¬¶øÇÒÔÚ EJB ÄÚ²¿Í¨¹ýΪÕû¸öÒµÎñ¹¦ÄÜ´´½¨Ò»¸öÊÂÎñ»·¾³Ò²¿ÉÒÔ´ó´óµØ¼õÉÙ¶ÔÊý¾Ý¿âµÄ·ÃÎÊ´ÎÊý¡£
¡¡¡¡EJB ±¾µØ½Ó¿Ú£¨´Ó EJB 2.0 ¹æ·¶¿ªÊ¼Ê¹Óã©Îª¹²´æµÄ EJB ÌṩÁËÐÔÄÜÓÅ»¯·½·¨¡£±¾µØ½Ó¿Ú±ØÐë±»ÄúµÄÓ¦ÓóÌÐòÏÔʽµØ½øÐзÃÎÊ£¬ÕâÐèÒª´úÂëµÄ¸Ä±äºÍ·ÀÖ¹ÒÔºóÅäÖà EJB ʱÐèÒªÓ¦ÓóÌÐòµÄ¸Ä±ä¡£ÓÉÓڻỰ Facades ºÍËü°üº¬µÄÕû¸ö EJB ¶ÔÓڱ˴ËÀ´Ëµ¶¼Ó¦¸ÃÊDZ¾µØµÄ£¬ÎÒÃǽ¨Òé¶Ô»á»° Facades ºóÃæµÄʵÌå bean ʹÓñ¾µØ½Ó¿Ú¡£È»¶ø£¬»á»° Facades ±¾ÉíµÄʵÏÖ£¨µäÐÍÀý×ÓÈçÎÞ״̬»á»° bean£©Ó¦¸ÃÉè¼ÆΪԶ³Ì½Ó¿Ú¡£
¡¡¡¡ÎªÁËÐÔÄܵÄÓÅ»¯£¬¿ÉÒÔ½«Ò»¸ö±¾µØ½Ó¿ÚÌí¼Óµ½»á»° Facades¡£ÕâÑù×öÀûÓÃÁËÕâÑùÒ»¸öÊÂʵ£ºÔÚ´ó¶àÊýÇé¿öÏ£¨ÖÁÉÙÔÚ Web Ó¦ÓóÌÐòÖУ©£¬ÄúµÄ EJB ¿Í»§¶ËºÍ EJB »á¹²Í¬´æÔÚÓÚͬһ¸ö Java ÐéÄâ»ú£¨JVM£©ÖС£ÁíÍâÒ»ÖÖÇé¿ö£¬Èç¹û»á»° Facades ÔÚ±¾µØ±»µ÷Ó㬿ÉÒÔʹÓà J2EE Ó¦Ó÷þÎñÆ÷ÅäÖÃÓÅ»¯£¨configuration optimizations£©£¬ÀýÈç WebSphere ÖеÄ"No Local Copies"¡£È»¶ø£¬Äú±ØÐë×¢Òâµ½ÕâЩ¿É¹©Ñ¡ÔñµÄ·½°¸»á½«½»»¥·½·¨´Ó°´Öµ´«µÝ£¨pass-by-value£©¸Ä±äΪ°´ÒýÓô«µÝ£¨pass-by-reference£©¡£Õâ¿ÉÄÜ»áÔÚÄúµÄ´úÂëÖвúÉúºÜ΢ÃîµÄ´íÎó¡£µ±ÄúÒªÀûÓÃÕâЩ·½°¸Ê±£¬ÄúÓ¦¸ÃÔÚÒ»¿ªÊ¼¾Í¿¼ÂÇÆä¿ÉÐÐÐÔ¡£
¡¡¡¡Èç¹ûÔÚÄúµÄ»á»° Facades ÖÐʹÓÃÔ¶³Ì½Ó¿Ú£¨¶ø²»ÊDZ¾µØ½Ó¿Ú£©£¬ÄúÒ²¿ÉÒÔ½«Í¬ÑùµÄ»á»° Facades ÔÚ J2EE 1.4 ÖÐÒÔ¼æÈݵķ½Ê½×÷Ϊ Web ·þÎñÀ´ÅäÖá£ÕâÊÇÒòΪ JSR 109£¨J2EE 1.4 ÖÐµÄ Web ·þÎñ²¿Ê𲿷֣©ÒªÇóʹÓÃÎÞ״̬»á»° bean µÄÔ¶³Ì½Ó¿Ú×÷Ϊ EJB Web ·þÎñºÍ EJB ʵÏֵĽӿڡ£ÕâÑù×öÊÇÖµµÃµÄ£¬ÒòΪÕâÑù×ö¿ÉÒÔΪÄúµÄÒµÎñÂß¼Ôö¼Ó¿Í»§¶ËÀàÐ͵ÄÊýÁ¿¡£
¡¡¡¡7. ʹÓÃÎÞ״̬»á»° bean£¬¶ø²»ÊÇÓÐ״̬»á»° bean¡£
¡¡¡¡ÕâÑù×ö¿ÉÒÔʹÄúµÄϵͳ¾µÃÆð´íÎóµÄÖÕÖ¹¡£Ê¹Óà HttpSession ´æ´¢ºÍÓû§Ïà¹ØµÄ״̬¡£
¡¡¡¡ÒÔÎÒÃǵĹ۵㿴À´£¬ÓÐ״̬»á»° bean µÄ¸ÅÄîÒѾ¹ýʱÁË¡£Èç¹ûÄú×Ðϸ¶ÔÆ俼ÂÇһϣ¬Ò»¸öÓÐ״̬»á»° bean ʵ¼ÊÉÏÓëÒ»¸ö CORBA ¶ÔÏóÔÚÌåϵ½á¹¹ÉÏÊÇÍêÈ«ÏàͬµÄ£¬Î޷ǾÍÊÇÒ»¸ö¶ÔÏóʵÀý£¬°ó¶¨µ½Ò»¸ö·þÎñÆ÷£¬²¢ÇÒÒÀÀµÓÚ·þÎñÆ÷À´¹ÜÀíÆäÉúÃüÖÜÆÚ¡£Èç¹û·þÎñÆ÷¹Ø±ÕÁË£¬ÕâÖÖ¶ÔÏóÒ²¾Í²»´æÔÚ£¬ÄÇôÕâ¸ö bean µÄ¿Í»§¶ËµÄÐÅÏ¢Ò²¾Í²»´æÔÚ¡£
¡¡¡¡J2EE Ó¦Ó÷þÎñÆ÷ΪÓÐ״̬»á»° bean ÌṩµÄ¹ÊÕÏתÒÆ£¨failover£©Äܹ»½â¾öһЩÎÊÌ⣬µ«ÊÇÓÐ״̬µÄ½â¾ö·½°¸Ã»ÓÐÎÞ״̬µÄ½â¾ö·½°¸Ò×ÓÚÀ©Õ¹¡£ÀýÈ磬ÔÚ WebSphere Application Server ÖУ¬¶ÔÎÞ״̬»á»° bean µÄÇëÇó£¬ÊÇͨ¹ý¶Ô²¿ÊðÎÞ״̬»á»°µÄ³ÉÔ±¼¯Èº½øÐÐƽºâ¼ÓÔØÀ´ÊµÏÖ¡£Ïà·´µØ£¬J2EE Ó¦Ó÷þÎñÆ÷²»ÄܶÔÓÐ״̬ bean µÄÇëÇó½øÐÐƽºâ¼ÓÔØ¡£ÕâÒâζ×ÅÄúµÄ¼¯ÈºÖеķþÎñÆ÷µÄ¼ÓÔعý³Ì»áÊDz»¾ùºâµÄ¡£´ËÍ⣬ʹÓÃÓÐ״̬»á»° bean ½«»áÔÙÌí¼ÓһЩ״̬µ½ÄúµÄÓ¦Ó÷þÎñÆ÷ÉÏ£¬ÕâÒ²ÊDz»ºÃµÄ×ö·¨¡£ÕâÑù¾ÍÔö¼ÓÁËϵͳµÄ¸´ÔÓÐÔ£¬²¢ÇÒÔÚ³öÏÖ¹ÊÕϵÄÇé¿öÏÂʹÎÊÌâ±äµÃ¸´ÔÓ»¯¡£´´½¨½¡×³µÄ·Ö²¼Ê½ÏµÍ³µÄÒ»¸ö¹Ø¼üÔÔòÊǾ¡Á¿Ê¹ÓÃÎÞ״̬ÐÐΪ¡£
¡¡¡¡Òò´Ë£¬ÎÒÃǽ¨Òé¶Ô´ó¶àÊýÓ¦ÓóÌÐòʹÓÃÎÞ״̬»á»° bean ·½·¨¡£ÈκÎÔÚ´¦ÀíʱÐèҪʹÓõÄÓëÓû§Ïà¹ØµÄ״̬Ӧ¸ÃÒÔ²ÎÊýµÄÐÎʽ´«Ë͵½ EJB µÄ·½·¨ÖУ¨²¢ÇÒͨ¹ýʹÓÃÒ»ÖÖ»úÖÆÈç HttpSession À´´æ´¢Ëü£©»òÕß´Ó³Ö¾ÃÐԵĺó¶Ë´æ´¢£¨ÀýÈçͨ¹ýʹÓÃʵÌå bean)×÷Ϊ EJB ÊÂÎñµÄÒ»²¿·ÖÀ´½øÐмìË÷¡£ÔÚºÏÊʵÄÇé¿öÏ£¬Õâ¸öÐÅÏ¢¿ÉÒÔ»º´æµ½ÄÚ´æÖУ¬µ«ÊÇҪעÒâÔÚ·Ö²¼Ê½µÄ»·¾³Öб£´æÕâÖÖ»º´æËùDZÔÚµÄÌôÕ½ÐÔ¡£»º´æ·Ç³£ÊʺÏÓÚÖ»¶ÁÊý¾Ý¡£
¡¡¡¡×ÜÖ®£¬ÄúҪȷ±£´ÓÒ»¿ªÊ¼¾ÍÒª¿¼Âǵ½¿ÉÉìÕ¹ÐÔ¡£¼ì²éÉè¼ÆÖеÄËùÓÐÉèÏ룬²¢ÇÒ¿¼Âǵ½µ±ÄúµÄÓ¦ÓóÌÐòÒªÔÚ¶à¸ö·þÎñÆ÷ÉÏÔËÐÐʱ£¬ÊÇ·ñÒ²¿ÉÒÔÕý³£ÔËÐС£Õâ¸ö¹æÔò²»µ«ÊʺÏÉÏÊöÇé¿öµÄÓ¦ÓóÌÐò´úÂ룬ҲÊÊÓÃÓÚÈç MBean ºÍÆäËû¹ÜÀí½çÃæµÄÇé¿öÏ¡£
¡¡¡¡±ÜÃâʹÓÃÓÐ״̬ÐÔ²»Ö»ÊÇ¶Ô IBM/WebSphere µÄ½¨Ò飬ÕâÊÇÒ»¸ö»ù±¾µÄ J2EE Éè¼ÆÔÔò¡£
¡¡¡¡8. ʹÓÃÈÝÆ÷¹ÜÀíµÄÊÂÎñ¡£
¡¡¡¡Ñ§Ï°Ò»Ï J2EE ÖеÄÁ½½×¶ÎÌá½»ÊÂÎñ£¬²¢ÇÒʹÓÃÕâÖÖ·½Ê½£¬¶ø²»ÊÇ¿ª·ÅÄú×Ô¼ºµÄÊÂÎñ¹ÜÀí¡£ÈÝÆ÷ÔÚÊÂÎñÓÅ»¯·½Ã漸ºõ×ÜÊDZȽϺõġ£
¡¡¡¡Ê¹ÓÃÈÝÆ÷¹ÜÀíµÄÊÂÎñ£¨CMT£©ÌṩÁËÁ½¸ö¹Ø¼üµÄÓÅÊÆ£¨Èç¹ûûÓÐÈÝÆ÷Ö§³ÖÕ⼸ºõÊDz»¿ÉÄܵģ©£º¿É×éºÏµÄ¹¤×÷µ¥ÔªºÍ½¡×³µÄÊÂÎñÐÐΪ¡£
¡¡¡¡Èç¹ûÄúµÄÓ¦ÓóÌÐò´úÂëÏÔʽµØʹÓÃÁË¿ªÊ¼ºÍ½áÊøÊÂÎñ£¨Ò²ÐíʹÓà javax.jts.UserTransaction »òÕßÉõÖÁÊDZ¾µØ×ÊÔ´ÊÂÎñ£©£¬¶ø½«À´µÄÒªÇóÐèÒª×éºÏÄ£¿é£¨Ò²Ðí»áÊÇ´úÂëÖع¹µÄÒ»²¿·Ö£©£¬ÕâÖÖÇé¿öÏÂÍùÍùÐèÒª¸Ä±äÊÂÎñ´úÂë¡£ÀýÈ磬Èç¹ûÄ£¿é A ¿ªÊ¼ÁËÒ»¸öÊý¾Ý¿âÊÂÎñ£¬¸üÐÂÊý¾Ý¿â£¬ËæºóÌá½»ÊÂÎñ£¬²¢ÇÒÓÐÄ£¿é B ×ö³öͬÑùµÄ´¦Àí£¬Ç뿼ÂÇһϵ±ÄúÔÚÄ£¿é C Öг¢ÊÔʹÓÃÉÏÊöÁ½¸öÄ£¿é£¬»á³öÏÖʲôÇé¿öÄØ£¿ÏÖÔÚ£¬Ä£¿é C ÕýÔÚÖ´ÐÐÒ»¸öÂß¼¶¯×÷£¬¶øÕâ¸ö¶¯×÷ʵ¼ÊÉϽ«µ÷ÓÃÁ½¸ö¶ÀÁ¢µÄÊÂÎñ¡£Èç¹ûÄ£¿é B ÔÚÖ´ÐÐÖÐʧ°ÜÁË£¬¶øÄ£¿é A µÄÊÂÎñÈÔÈ»Äܱ»Ìá½»¡£ÕâÊÇÎÒÃÇËù²»Ï£Íû³öÏÖµÄÐÐΪ¡£Èç¹û£¬Ïà·´µØ£¬Ä£¿é A ºÍÄ£¿é B ¶¼Ê¹Óà CMT µÄ»°£¬Ä£¿é C Ò²¿ÉÒÔ¿ªÊ¼Ò»¸ö CMT£¨Í¨³£Í¨¹ýÅäÖÃÃèÊö·û£©£¬²¢ÇÒÔÚÄ£¿é A ºÍÄ£¿é B ÖеÄÊÂÎñ½«ÊÇͬһ¸öÊÂÎñµÄÒþº¬²¿·Ö£¬ÕâÑù¾Í²»ÔÙÐèÒª¸´ÔÓµÄÖØд´úÂëµÄ¹¤×÷ÁË¡£
¡¡¡¡Èç¹ûÄúµÄÓ¦ÓóÌÐòÔÚͬһ¸ö²Ù×÷ÖÐÐèÒª·ÃÎʶàÖÖ×ÊÔ´£¬Äú¾ÍҪʹÓÃÁ½½×¶ÎÌá½»ÊÂÎñ¡£ÀýÈ磬Èç¹û´Ó JMS ¶ÓÁÐÖÐɾ³ýÒ»¸öÏûÏ¢£¬²¢ÇÒËæºó¸üлùÓÚÕâÌõÏûÏ¢µÄ¼Í¼£¬Õâʱ£¬Òª±£Ö¤ÕâÁ½¸ö²Ù×÷¶¼»áÖ´Ðлò¶¼²»»áÖ´ÐоͱäµÃÓÈΪÖØÒª¡£Èç¹ûÒ»ÌõÏûÏ¢ÒѾ´Ó¶ÓÁÐÖб»É¾³ý£¬¶øϵͳûÓиüÐÂÓë´ËÏûÏ¢Ïà¹ØµÄÊý¾Ý¿âÖеļͼ£¬ÄÇôÕâÖÖϵͳÊDz»Îȶ¨µÄ¡£Ò»Ð©ÑÏÖصĿͻ§¼°ÉÌÒµ¾À·×Ô´×Ô²»Ò»ÖµÄ״̬¡£
¡¡¡¡ÎÒÃÇʱ³£¿´µ½Ò»Ð©¿Í»§Ó¦ÓóÌÐòÊÔͼʵÏÖËûÃÇ×Ô¼ºµÄ½â¾ö·½°¸¡£Ò²Ðí»áͨ¹ýÓ¦ÓóÌÐòµÄ´úÂëÔÚÊý¾Ý¿â¸üÐÂʧ°ÜµÄʱºò "³·Ïú"¶Ô¶ÓÁеIJÙ×÷¡£ÎÒÃDz»ÌᳫÕâÑù×ö¡£ÕâÖÖʵÏÖÒª±ÈÄú×î³õµÄÏëÏóÒª¸´Ôӵö࣬²¢ÇÒ»¹ÓÐÐí¶àÆäËûµÄÇé¿ö£¨ÏëÏóÒ»ÏÂÈç¹ûÓ¦ÓóÌÐòÔÚÖ´Ðд˲Ù×÷µÄ¹ý³ÌÖÐͻȻ±ÀÀ£µÄÇé¿ö£©¡£×÷ΪÌæ´úµÄ·½Ê½£¬Ó¦¸ÃʹÓÃÁ½½×¶ÎÌá½»ÊÂÎñ¡£Èç¹ûÄúʹÓà CMT£¬²¢ÇÒÔÚÒ»¸öµ¥Ò»µÄ CMT ÖзÃÎÊÁ½½×¶ÎÌá½»µÄ×ÊÔ´£¨ÀýÈç JMS ºÍ´ó¶àÊýÊý¾Ý¿â£©£¬WebSphere ½«»á´¦ÀíËùÓеĸ´ÔÓ¹¤×÷¡£Ëü½«È·±£Õû¸öÊÂÎñ±»Ö´ÐлòÕ߶¼²»±»Ö´ÐУ¬°üÀ¨ÏµÍ³±ÀÀ£¡¢Êý¾Ý¿â±ÀÀ£»òÆäËûµÄÇé¿ö¡£ÆäʵÏÖÔÚÊÂÎñÈÕÖ¾Öб£´æ×ÅÊÂÎñ״̬¡£µ±Ó¦ÓóÌÐò·ÃÎʶàÖÖ×ÊÔ´µÄʱºò£¬ÎÒÃÇÔõôǿµ÷ʹÓà CMT ÊÂÎñµÄ±ØÒªÐÔ¶¼²»Îª¹ý¡£
¡¡¡¡9. ½« JSP ×÷Ϊ±íʾ²ãµÄÊ×Ñ¡¡£
¡¡¡¡Ö»ÓÐÔÚÐèÒª¶àÖÖ±íʾÊä³öÀàÐÍ£¬²¢ÇÒÊä³öÀàÐͱ»Ò»¸öµ¥Ò»µÄ¿ØÖÆÆ÷¼°ºó¶ËÖ§³Öʱ²ÅʹÓà XML/XSLT¡£
¡¡¡¡ÎÒÃdz£Ìýµ½Ò»Ð©ÕùÂÛ˵£¬ÎªÊ²Ã´ÄúÑ¡Ôñ XML/XSLT ¶ø²»ÊÇ JSP ×÷Ϊ±íʾ²ã¼¼Êõ¡£Ñ¡Ôñ XML/XSLT µÄÈ˵Ĺ۵ãÊÇ£¬JSP" ÔÊÐíÄú½«Ä£ÐͺÍÊÓͼ»ìºÏÔÚÒ»Æð"£¬¶ø XML/XSLT ²»»áÓÐÕâÖÖÎÊÌâ¡£Òź¶µÄÊÇ£¬ÕâÖֹ۵㲢²»ÍêÈ«ÕýÈ·£¬»òÕßÖÁÉÙ²»Ïñ°×ÓëºÚÄÇÑù·ÖµÄÇå³þ¡£Êµ¼ÊÉÏ£¬XSL ºÍ XPath ÊDZà³ÌÓïÑÔ¡£XSL ÊÇͼÁéÍê³ÉµÄ£¨Turing-complete£©£¬¾¡¹ÜËü²»·ûºÏ´ó¶àÊýÈ˶¨ÒåµÄ±à³ÌÓïÑÔ£¬ÒòΪËüÊÇ»ùÓÚ¹æÔòµÄ£¬²¢ÇÒ²»¾ß±¸³ÌÐòԱϰ¹ßµÄ¿ØÖƹ¤¾ß¡£
¡¡¡¡ÏÖÔÚµÄÎÊÌâÊǼÈÈ»¸øÓèÁËÕâÖÖÁé»îÐÔ£¬¿ª·¢ÈËÔ±¾Í»áÀûÓÃÕâÖÖÁé»îÐÔ¡£¾¡¹Üÿ¸öÈ˶¼ÈÏͬ JSP ʹ¿ª·¢ÈËÔ±ÈÝÒ×ÔÚÊÓͼÖмÓÈë"ÀàËÆÄ£ÐÍ"µÄÐÐΪ£¬¶øʵ¼ÊÉÏ£¬ÔÚ XSL ÖÐÒ²ÓпÉÄÜ×ö³öһЩͬÑùµÄÊÂÇé¡£¾¡¹Ü´Ó XSL ÖнøÐзÃÎÊÊý¾Ý¿âÕâÑùµÄÊÂÇé»á·Ç³£À§ÄÑ£¬µ«ÊÇÎÒÃÇÔø¾¼ûµ½¹ýһЩÒì³£¸´Ô XSLT Ñùʽ±íÖ´Ðи´ÔÓµÄת»»£¬Õâʵ¼ÊÉÏÊÇÄ£ÐÍ´úÂë¡£
¡¡¡¡È»¶ø£¬Ó¦¸ÃÑ¡Ôñ JSP ×÷ΪÊ×Ñ¡µÄ±íʾ¼¼ÊõµÄ×î»ù±¾µÄÔÒòÊÇ£¬JSP ÊÇÏÖÔÚÖ§³Ö×î¹ã·ºµÄ¡¢Ò²ÊÇ×î±»¹ã·ºÀí½âµÄ J2EE ÊÓͼ¼¼Êõ¡£¶øËæ×Å×Ô¶¨Òå±ê¼Ç¿â¡¢JSTL ºÍ JSP2.0 µÄÐÂÌØÐÔµÄÒýÈ룬´´½¨ JSP ±äµÃ¸ü¼ÓÈÝÒ×£¬²¢ÇÒ²»ÐèÒªÈκΠJava ´úÂ룬ÒÔ¼°¿ÉÒÔ½«Ä£ÐͺÍÊÓͼÇåÎúµÄ·ÖÀ뿪¡£ÔÚһЩ¿ª·¢»·¾³ÖУ¨Èç WebSphere Studio£©¼ÓÈëÁË¶Ô JSP£¨°üÀ¨¶Ôµ÷ÊÔµÄÖ§³Ö£©µÄÇ¿´óÖ§³Ö£¬²¢ÇÒÐí¶à¿ª·¢ÈËÔ±·¢ÏÖʹÓà JSP ½øÐпª·¢Òª±ÈʹÓà XLS ¼òµ¥£¬Ò»Ð©Ö§³Ö JSP µÄͼÐÎÉè¼Æ¹¤¾ß¼°ÆäËûÌØÕ÷£¨ÓÈÆäÔÚ JSF ÕâÑùµÄ¿ò¼ÜÏ£©Ê¹µÃ¿ª·¢ÈËÔ±¿ÉÒÔÒÔËù¼û¼´ËùµÃµÄ·½Ê½½øÐÐ JSP µÄ¿ª·¢£¬¶ø¶ÔÓÚ XSL ÓÐʱ²»ÈÝÒ××öµ½¡£
¡¡¡¡×îºóÒ»¸öÒª½÷É÷¿¼ÂÇʹÓà JSP µÄÔÒòÊÇËÙ¶ÈÎÊÌâ¡£ÔÚ IBM Ëù×÷µÄ¶Ô±È XSL ºÍ JSP Ïà¶ÔËٶȵÄÐÔÄܲâÊÔÏÔʾ£ºÔÚ´ó¶àÊýÇé¿öÏ£¬JSP ÔÚÉú³ÉͬÑùµÄ HTML µÄʱºò£¬Òª±È XSL ¿ìºÃ¼¸±¶£¬ÉõÖÁʹÓñàÒë¹ýµÄ XSL Ò²ÊÇÈç´Ë¡£¾¡¹Ü¶àÊýÇé¿öÏÂÕâ²»ÊÇÎÊÌ⣬µ«ÔÚÐÔÄÜÒªÇóºÜ¸ßµÄÇé¿öÏ£¬Õâ¾Í»á³ÉΪÎÊÌâ¡£
¡¡¡¡È»¶ø£¬ÕâÒ²²»ÄÜ˵£¬ÄúÓÀÔ¶Ò²²»ÒªÊ¹Óà XSL¡£ÔÚһЩÇé¿öÏ£¬XSL Äܹ»±íʾһ×é¹Ì¶¨µÄÊý¾Ý£¬²¢ÇÒ¿ÉÒÔ»ùÓÚ²»Í¬µÄÑùʽ±íÀ´ÒÔ²»Í¬µÄ·½Ê½ÏÔʾÕâЩÊý¾ÝµÄÄÜÁ¦ÊÇÏÔʾÊÓͼµÄ×î¼Ñ½â¾ö·½°¸¡£È»¶ø£¬ÕâÖ»ÊÇÒ»ÖÖÀýÍâµÄÇé¿ö£¬¶ø²»ÊÇͨÓõĹæÔò¡£Èç¹ûÄúÖ»ÊÇÉú³É HTML À´±í´ïÿһ¸öÒ³Ã棬ÄÇôÔÚ´ó¶àÊýÇé¿öÏ£¬XSL ÊÇÒ»ÖÖ²»±ØÒªµÄ¼¼Êõ£¬²¢ÇÒ£¬Ëü¸øÄúµÄ¿ª·¢ÈËÔ±Ëù´øÀ´µÄÎÊÌâÔ¶±ÈËüËùÄܽâ¾öµÄÎÊÌâ¶à¡£
¡¡¡¡10. µ±Ê¹Óà HttpSession ʱ£¬¾¡Á¿Ö»½«µ±Ç°ÊÂÎñËùÐèÒªµÄ״̬±£´æÆäÖУ¬ÆäËûÄÚÈݲ»Òª±£´æÔÚ HttpSession ÖС£
¡¡¡¡ÆôÓûỰ³Ö¾ÃÐÔ¡£
¡¡¡¡HttpSessions ¶ÔÓÚ´æ´¢Ó¦ÓóÌÐò״̬ÐÅÏ¢ÊǷdz£ÓÐÓõġ£Æä API Ò×ÓÚʹÓúÍÀí½â¡£Òź¶µÄÊÇ£¬¿ª·¢ÈËÔ±³£³£ÒÅÍüÁË HttpSession µÄÄ¿µÄ----ÓÃÀ´±£³ÖÔÝʱµÄÓû§×´Ì¬¡£Ëü²»ÊÇÈÎÒâµÄÊý¾Ý»º´æ¡£ÎÒÃÇÒѾ¼ûµ½¹ýÌ«¶àµÄϵͳΪÿ¸öÓû§µÄ»á»°·ÅÈëÁË´óÁ¿µÄÊý¾Ý£¨´ïµ½Õ××Ö½Ú£©¡£ÄǺÃÁË£¬Èç¹ûͬʱÓÐ 1000 ¸öµÇ¼ϵͳµÄÓû§£¬Ã¿¸öÓû§ÓµÓÐ 1MB µÄ»á»°Êý¾Ý£¬ÄÇô¾ÍÐèÒª 1G »òÕ߸ü¶àµÄÄÚ´æÓÃÓÚÕâЩ»á»°¡£ÒªÊ¹ÕâЩ HTTP »á»°Êý¾Ý½ÏСһЩ£¬²»È»µÄ»°£¬ÄúµÄÓ¦ÓóÌÐòµÄÐÔÄܽ«»áϽµ¡£Ò»¸ö´óÔ¼±È½ÏºÏÊʵÄÊý¾ÝÁ¿Ó¦¸ÃÊÇÿ¸öÓû§µÄ»á»°Êý¾ÝÔÚ 2K-4K Ö®¼ä£¬Õâ²»ÊÇÒ»¸öÓ²ÐԵĹæÔò£¬8K ÈÔȻûÓÐÎÊÌ⣬µ«ÊÇÏÔÈ»»á±È 2K ʱµÄËÙ¶ÈÒªÂý¡£Ò»¶¨Òª×¢Ò⣬²»ÒªÊ¹ HttpSession ±ä³ÉÊý¾Ý¶Ñ»ýµÄ³¡Ëù¡£
¡¡¡¡Ò»¸ö³£¼ûµÄÎÊÌâÊÇʹÓà HttpSession »º´æһЩºÜÈÝÒ×ÔÙ´´½¨µÄÐÅÏ¢£¬Èç¹ûÓбØÒªµÄ»°¡£ÓÉÓڻỰÊdz־ÃÐԵģ¬½øÐв»±ØÒªµÄÐòÁл¯ÒÔ¼°Ð´ÈëÊý¾ÝÊÇÒ»ÖÖºÜÉݳ޵ľö¶¨¡£Ïà·´µØ£¬Ó¦¸ÃʹÓÃÄÚ´æÖеĹþÏ£±íÀ´»º´æÊý¾Ý£¬²¢ÇÒÔڻỰÖб£´æÒ»¸ö¶Ô´ËÊý¾Ý½øÐÐÒýÓõĹؼü×Ö¡£ÕâÑù£¬Èç¹û²»Äܳɹ¦µÇ¼µ½ÁíÍâµÄÓ¦Ó÷þÎñÆ÷µÄ»°£¬¾Í¿ÉÒÔÖØд´½¨Êý¾Ý¡£
¡¡¡¡µ±Ì¸¼°»á»°³Ö¾ÃÐÔʱ£¬²»ÒªÍü¼ÇÒªÆôÓÃÕâÏÄÜ¡£Èç¹ûÄúûÓÐÆôÓûỰ³Ö¾ÃÐÔ£¬»òÕß·þÎñÆ÷ÒòΪijÖÖÔÒòÍ£Ö¹ÁË£¨·þÎñÆ÷¹ÊÕÏ»òÕý³£µÄά»¤£©£¬ÔòËùÓдËÓ¦Ó÷þÎñµÄµ±Ç°Óû§µÄ»á»°½«»á¶ªÊ§¡£ÕâÊǼþÁîÈ˷dz£²»¸ßÐ˵ÄÊÂÇé¡£Óû§²»µÃ²»ÖØеǼ£¬²¢ÇÒÖØÐÂ×öһЩËûÃÇÔø¾ÒѾ×ö¹ýµÄÊÂÇé¡£Ïà·´µØ£¬Èç¹ûÆôÓÃÁ˻Ự³Ö¾ÃÐÔ£¬WebSphere »á×Ô¶¯½«Óû§£¨ÒÔ¼°ËûÃǵĻỰ£©ÒƵ½ÁíÍâÒ»¸öÓ¦Ó÷þÎñÆ÷ÉÏÈ¥¡£Óû§ÉõÖÁ²»ÖªµÀ»áÓÐÕâÖÖÊÂÇéµÄ·¢Éú¡£ÎÒÃÇÔø¾¼ûµ½¹ýһЩ²úƷϵͳÒòΪ´æÔÚÓÚ±¾µØ´úÂëÖÐÁîÈËÄÑÒÔÈÌÊÜµÄ bug£¨²»ÊÇ IBM µÄ´úÂ룡£©¶øͻȻ±ÀÀ£µÄÇé¿ö£¬ÕâÕâÖÖÇé¿öÏ£¬ÉÏÊö¹¦ÄÜÈÔÈ»¿ÉÒÔÔËÐÐÁ¼ºÃ¡£
¡¡¡¡11. ÔÚ WebSphere ÖУ¬Ê¹Óö¯Ì¬»º´æ£¬²¢Ê¹Óà WebSphere servlet »º´æ»úÖÆ¡£
¡¡¡¡Í¨¹ýʹÓÃÕâЩ¹¦ÄÜ£¬ÏµÍ³ÐÔÄÜ¿ÉÒԵõ½ºÜ´óµÄÌá¸ß£¬¶ø¿ªÏúÊǺÜСµÄ¡£²¢ÇÒ²»Ó°Ïì±à³ÌÄ£ÐÍ¡£
¡¡¡¡Í¨¹ý»º´æÀ´Ìá¸ßÐÔÄܵĺô¦ÊÇÖÚËùÖÜÖªµÄÊÂÇé¡£Òź¶µÄÊÇ£¬µ±Ç°µÄ J2EE ¹æ·¶Ã»ÓаüÀ¨Ò»ÖÖÓÃÓÚ servlet/JSP »º´æµÄ»úÖÆ¡£È»¶ø£¬WebSphere ÌṩÁ˶ÔÒ³ÃæÒÔ¼°Æ¬¶Ï»º´æµÄÖ§³Ö£¬ÕâÖÖÖ§³ÖÊÇͨ¹ýÆ䶯̬»º´æ¹¦ÄÜÀ´ÊµÏֵģ¬²¢ÇÒ²»ÐèÒª¶ÔÓ¦ÓóÌÐò×÷³öÈκθı䡣Æ仺´æµÄ²ßÂÔÊÇÉùÃ÷ÐԵģ¬¶øÇÒÆäÅäÖÃÊÇͨ¹ý XML ÅäÖÃÃèÊö·ûÀ´ÊµÏֵġ£Òò´Ë£¬ÄúµÄÓ¦ÓóÌÐò²»»áÊܵ½Ó°Ï죬²¢±£³ÖÓë J2EE ¹æ·¶µÄ¼æÈÝÐÔºÍÒÆÖ²ÐÔ£¬Í¬Ê±»¹´Ó WebSphere µÄ servlet ¼° JSP µÄ»º´æ»úÖÆÖеõ½ÐÔÄܵÄÓÅ»¯¡£
¡¡¡¡´Ó servet ¼° JSP µÄ¶¯Ì¬»º´æ»úÖƵõ½µÄÐÔÄܵÄÌá¸ßÊÇÏÔ¶øÒ×¼ûµÄ£¬ÕâÈ¡¾öÓÚÓ¦ÓóÌÐòµÄÌØÐÔ¡£Cox ºÍ Martin [Cox] Ö¸³ö¶ÔÒ»¸öÏÖÓÐµÄ RDF£¨×ÊÔ´ÃèÊö¸ñʽ£©Õ¾µãÕªÒª (RSS)servlet£¬µ±Ê¹Óö¯Ì¬»º´æʱ£¬ÆäÐÔÄÜ¿ÉÒÔÌá¸ß 10%¡£Çë×¢ÒâÕâ¸öʵÑéÖ»Éæ¼°µ½Ò»¸ö¼òµ¥µÄ servlet£¬Õâ¸öÐÔÄܵÄÔö³¤Á¿¿ÉÄܲ¢²»ÄÜ·´Ó³Ò»¸ö¸´ÔÓµÄÓ¦ÓóÌÐò¡£
¡¡¡¡ÎªÁ˸ü¶àµØÌá¸ßÐÔÄÜ£¬½« WebSphere servlet/JSP ½á¹û»º´æÓë WebSphere ²å¼þ ESI Fragment ´¦ÀíÆ÷¡¢IBM HTTP Server Fast Response Cache Accelerator (FRCA) ºÍ Edge Server »º´æ¹¦Äܼ¯³ÉÔÚÒ»Æ𡣶ÔÓÚ·±ÖصĻùÓÚ¶ÁÈ¡µÄ¹¤×÷¸ººÉ£¬Í¨¹ýʹÓÃÕâЩ¹¦ÄÜ¿ÉÒԵõ½Ðí¶à¶îÍâµÄºÃ´¦¡£
¡¡¡¡12. ΪÁËÌá¸ß³ÌÐòÔ±µÄ¹¤×÷ЧÂÊ£¬½« CMP ʵÌå bean ×÷Ϊ O/R Ó³ÉäµÄÊ×Ñ¡½â¾ö·½°¸.
¡¡¡¡Í¨¹ý WebSphere ¿ò¼Ü£¨readahead¡¢»º´æ¡¢¸ôÀ뼶±ðµÈ£©ÓÅ»¯ÐÔÄÜ¡£Èç¹û¿ÉÄÜ£¬ÓÐÑ¡ÔñµÄÓ¦ÓÃһЩģʽÀ´´ïµ½Ìá¸ßÐÔÄܵÄÄ¿µÄ£¬ÀýÈç Fast-Lane ÔĶÁÆ÷ [Marinescu]¡£
¡¡¡¡¶ÔÏó/¹Øϵ£¨O/R£©Ó³ÉäÊÇʹÓà Java ´´½¨ÆóÒµ¼¶µÄÓ¦ÓóÌÐòµÄ»ù´¡¡£¼¸ºõÿ¸ö J2EE Ó¦ÓóÌÐò¶¼ÐèҪһЩÀàÐ굀 O/R Ó³Éä¡£J2EE ³§ÉÌÌṩһÖÖ O/R Ó³Éä»úÖÆ£¬ÕâÖÖ»úÖÆÔÚ²»Í¬µÄ³§É̼äÊÇ¿ÉÒÆÖ²µÄ£¬¸ßЧµÄ£¬²¢ÇÒÄܹ»±»Ò»Ð©±ê×¼¼°¹¤¾ßºÜºÃµØÖ§³Ö¡£Õâ¾ÍÊÇ EJB ¹æ·¶ÖÐµÄ CMP£¨ÈÝÆ÷¹ÜÀíµÄ³Ö¾ÃÐÔ£©²¿·Ö¡£
¡¡¡¡ÔçÆÚµÄ CMP ʵÏÖÒÔ±íÏÖ²»¼Ñ¼°²»Ö§³ÖÐí¶à SQL ½á¹¹¶øÖø³Æ¡£È»¶ø£¬Ëæ×Å EJB 2.0 ¼° 2.1 ¹æ·¶µÄ³öÏÖ£¬ÒÔ¼°±»Ò»Ð©³§ÉÌËù²ÉÄÉ£¬²¢ÇÒËæ×ÅÏñ IBM WebSphere Studio Application Developer µÄ³öÏÖ£¬ÕâЩÎÊÌâÒѾ²»ÔÙÊÇÎÊÌâÁË¡£
¡¡¡¡CMP EJB ×é¼þÏÖÔÚÒѾ±»¹ã·ºµØÓ¦ÓÃÓÚÐí¶à¸ßÐÔÄܵÄÓ¦ÓóÌÐòÖС£WebSphere °üÀ¨Ò»Ð©ÓÅ»¯¹¦ÄÜÒÔÌá¸ß EJB ×é¼þµÄÐÔÄÜ£¬ÓÅ»¯¹¦ÄÜ°üÀ¨£º¶ÔÉúÃüÖÜÆڵĻº´æºÍ read-ahead ÄÜÁ¦¡£ÕâÁ½ÕßÓÅ»¯¹¦Äܶ¼ÊÇÅäÖÃʱµÄÑ¡Ï²¢ÇÒ²»ÐèÒª¶ÔÓ¦ÓóÌÐò½øÐÐÐ޸ĻòÕßÓ°Ïì¿ÉÒÆÖ²ÐÔ¡£
¡¡¡¡´¦ÓÚ»º´æ״̬µÄÉúÃüÖÜÆÚ»º´æ CMP ״̬Êý¾Ý²¢Ìṩ»ùÓÚʱ¼äµÄÎÞЧÐÔ¡£´Ó´¦ÓÚ»º´æ״̬µÄÉúÃüÖÜÆڵõ½µÄÐÔÄÜÌá¸ß¿ÉÒԴﵽѡÏî A µÄ»º´æÐÔÄÜ£¬²¢ÇÒÈÔÈ»¿ÉÒÔΪÄúµÄÓ¦ÓóÌÐòÌṩ¿ÉÉìÕ¹ÐÔ¡£Read-ahead ÄÜÁ¦ºÍÈÝÆ÷¹ÜÀíµÄ¹Øϵ½áºÏʹÓá£Õâ¸öÌØÐÔͨ¹ýÔÚÏàͬµÄ²éѯÖÐËæÒâµØ¼ìË÷Ïà¹ØµÄÊý¾Ý×÷Ϊ¸¸Êý¾Ý¶ø¼õÉÙÓëÊý¾Ý¿âµÄ½»»¥¡£Èç¹ûÏà¹ØµÄÊý¾ÝҪͨ¹ýʹÓò¢·¢µÄ²éѯÀ´·ÃÎʵĻ°£¬ÕâÖÖ·½·¨¿ÉÒԵõ½ÐÔÄܵĸĽø¡£[Gunther]ÌṩÁËÏêϸµÄÃèÊöÒÔ¼°Í¨¹ýÕâЩÌØÐԵõ½µÄÐÔÄÜÌá¸ßµÄϸ½Ú¡£
¡¡¡¡´ËÍ⣬ΪÁËÍêÈ«ÓÅ»¯ÄúµÄ EJB ×é¼þ£¬µ±Ö¸¶¨¸ôÀ뼶±ðʱҪÌرð×¢Òâ¡£¾¡¿ÉÄÜʹÓÃ×îµÍµÄ¸ôÀ뼶±ð£¬²¢ÇÒÈÔÈ»±£³ÖÄúµÄÊý¾ÝµÄÍêÕûÐÔ¡£½ÏµÍµÄ¸ôÀ뼶±ð¿ÉÒÔÌṩ×î¼ÑµÄÐÔÄÜ£¬²¢ÇÒ¿ÉÒÔ½µµÍ³öÏÖÊý¾Ý¿âËÀËøµÄΣÏÕ¡£
¡¡¡¡ÕâÊÇÄ¿Ç°×îÓÐÕùÒéµÄ×î¼Ñʵ¼ù¡£ÒѾÓдóÁ¿µÄÎÄÕÂÔÞÑï CMP EJB£¬Í¬ÑùµÄ±á³âÉùÒ²²»¾øÓÚ¶ú¡£È»¶ø£¬ÕâÀï×î»ù±¾µÄÎÊÌâÊÇÊý¾Ý¿â¿ª·¢ÊÇÀ§Äѵġ£µ±Äú¿ªÊ¼Ê¹ÓÃÈκγ־ÃÐÔ½â¾ö·½°¸Ö®Ç°£¬ÄúÐèÒªÕÆÎÕ²éѯÒÔ¼°Êý¾Ý¿âËø¶¨ÈçºÎ¹¤×÷ÕâЩ»ù´¡ÖªÊ¶¡£Èç¹ûÄúÑ¡ÔñʹÓà CMP EJB£¬ÄúҪȷ±£ÄúÒѾͨ¹ýһЩÊé¼®£¨ÀýÈç [Brown] ºÍ [Barcia]£©ÖªµÀÈçºÎʹÓÃËüÃÇ¡£ÔÚËø¶¨¼°ÕùÓ÷½ÃæÓÐһЩ΢ÃîµÄ½»»¥ÄÑÒÔÀí½â£¬µ«ÊÇ£¬ÔÚÄúºÄ·ÑÒ»¶¨µÄʱ¼ä¼°Å¬Á¦ºó»á½«ÆäÕÆÎյġ£
¡¡¡¡½áÊøÓï
¡¡¡¡ÔÚÕâ¸ö¼ò¶ÌµÄÕªÒªÖУ¬ÎÒÃÇÒѾÏòÄú½éÉÜÁË J2EE ÖеĺËÐÄģʽºÍ×î¼Ñʵ¼ù£¬ÕâʹµÃ J2EE ¿ª·¢³ÉΪһÖֿɹÜÀíµÄ¹ý³Ì¡£¾¡¹ÜÎÒÃDz¢Ã»Óиø³öËùÓÐÔÚʵ¼ùÖÐʹÓÃÕâЩģʽµÄ±ØҪϸ½Ú£¬µ«ÊÇÎÒÃÇÏ£ÍûÄܹ»¸øÄú×ã¹»µÄÖ¸µãºÍÖ¸µ¼£¬ÒÔ°ïÖúÄú¾ö¶¨ÏÂÒ»²½Òª×öʲô¡£
¡¡¡¡×÷Õß¼ò½é
¡¡¡¡Kyle Brown ÊÇ IBM Software Services for WebSphere µÄ¸ß¼¶¼¼Êõ³ÉÔ±¡£Kyle Ïò²Æ¸» 500 Ç¿¿Í»§Ìṩ¹ØÓÚÃæÏò¶ÔÏóÖ÷ÌâºÍ J2EE ¼¼ÊõµÄ×Éѯ·þÎñ¡¢ÅàѵºÍÖ¸µ¼¡£ËûÓë±ðÈ˺ÏÖøÁË Enterprise Java Programming with IBM WebSphere¡¢WebSphere AEs 4.0 Workbook for Enterprise Java Beans£¨µÚ 3 °æ£©ºÍ The Design Patterns Smalltalk Companion¡£Ëû»¹¾³£ÔÚÑÐÌÖ»áÉÏ·¢±í¹ØÓÚÆóÒµ Java¡¢OO Éè¼ÆºÍÉè¼ÆģʽµÄÑݽ²¡£
¡¡¡¡Keys Botzum ÊÇ IBM Software Services for WebSphere µÄ¸ß¼¶¹ËÎÊ¡£ËûÔÚ´ó¹æÄ£·Ö²¼Ê½ÏµÍ³Éè¼Æ·½ÃæÓÐÊ®¶àÄê¾Ñ飬²¢ÇÒר¹¥°²È«ÐÔÎÊÌâ¡£Keys ʹÓùý¸÷ÖÖ·Ö²¼Ê½¼¼Êõ£¬°üÀ¨ Sun RPC¡¢DCE¡¢CORBA¡¢AFS ºÍ DFS¡£×î½ü£¬Ëû×ÅÖØÑо¿ J2EE ¼°ÆäÏà¹Ø¼¼Êõ¡£ËûÓµÓÐ˹̹¸£´óѧ¼ÆËã»ú¿Æѧ˶ʿѧλºÍ¿¨ÄÚ»ù÷¡´óѧӦÓÃÊýѧ/¼ÆËã»ú¿Æѧѧʿѧλ¡£
¡¡¡¡Ruth Willenborg ÊÇ WebSphere Application Server Performance ×éµÄ¾Àí¡£ËýÓëÈ˺ÏÖøÁË Performance Analysis for Java Web Sites£¨Addison-Wesley£¬2002 Ä꣩һÊé¡£
72.232.63.* ÓÚ 2007-02-11 13:10:04·¢±í:
Great work!
slot machine free | free gambling games | free play slots | flash casinos | online poker game | video slots free | texas hold em poker | slot machine software | free money casino | free slot machines online
66.235.162.* ÓÚ 2007-02-11 13:09:31·¢±í:
Nice site!
strip black jack | strip blackjack games | free online texas holdem | free texas hold em online | free online slots games | free blackjack games | free slot games no download | texas hold em free | play poker | poker game
66.235.160.* ÓÚ 2007-02-11 13:08:28·¢±í:
Good design!
online black jack | online video slots | free slots | texas poker | play roulette | empire poker | free video | new no deposit casino | virtual poker | planet poker
65.110.43.* ÓÚ 2007-02-11 13:07:42·¢±í:
Nice site!
free texas hold em | free cleopatra slots | play free slots | free online casinos | casino download | keno online | free slot machines games | poker game online | no deposit casino bonus | download free poker game
72.232.63.* ÓÚ 2007-02-10 17:33:50·¢±í:
Nice site!
ringtones for tracfone carriers | ringtones for nextel | centennial wireless ringtones | sprint ringtones | free wwe ringtones | cell phone ringtones | ringtones for nokia | download i730 nextel ringtone | free sprint ringtone downloads | simpsons ringtone simpsons ringtone
65.110.43.* ÓÚ 2007-02-10 17:33:07·¢±í:
Great work!
absolutely free ringtones | free ringtones for verizon | audiovox cdm8900 free ringtone | online ringtone converter | download free music ringtones | free ringtone downloads nokia | nextel i730 ringtones free | tmobile ringtones | download free polyphonic ringtones | cellphone ringtones
72.232.63.* ÓÚ 2007-02-10 17:32:10·¢±í:
Thank you!
mtv ringtones | download free motorola ringtone | ringtone creator | free midi ringtones | free cellular one ringtones | cingular ringtones | verizon free ringtones | nextel i730 country ringtones | v60i motorola ringtones | ringtone software
72.232.63.* ÓÚ 2007-02-10 17:31:23·¢±í:
Good design!
voice ringtone | motorola ringtones free | download free sprint ringtones | download free ringtone | free polyphonic ringtones order | free music ringtones | free kyocera ringtones | classical music ringtones | download samsung ringtones | sprint free sanyo ringtones
65.110.43.* ÓÚ 2007-02-10 17:30:33·¢±í:
Thank you!
free blackberry ringtones | free composer ringtones | free ringtones 4 samsung | free ringtones for cingular | free country music ringtones | ringtone jukebox ringtone jukebox | lg ctu ringtones | ringtones for t mobile | cell phone cingular ringtones | nextel ringtones
65.110.43.* ÓÚ 2007-02-09 17:14:53·¢±í:
Thank you!
russian roulette games | play online poker | poker game download | texas hold em free | play free slot machines | play texas hold em | slot games | play roulette free | online slots | play blackjack
72.232.63.* ÓÚ 2007-02-09 17:13:51·¢±í:
Well done!
texas hold em poker | slots for fun | no deposit casino bonuses | online black jack | free monopoly slots | video slots free | casino on line | free slot machine downloads | online casino bonus | free poker sites
65.110.43.* ÓÚ 2007-02-09 17:13:22·¢±í:
Great work!
free black jack | best poker sites | online holdem | play bingo online | no deposit casinos | free video | online slot games | poker for free | online free blackjack | online poker free
65.110.43.* ÓÚ 2007-02-09 17:12:35·¢±í:
Nice site!
free on line slots | roulette games | live poker | free blackjack | free games on line | free slot game | online poker | full tilt poker | poker game free | internet casinos
65.110.43.* ÓÚ 2007-02-09 17:12:27·¢±í:
Well done!
texas hold em poker | slots for fun | no deposit casino bonuses | online black jack | free monopoly slots | video slots free | casino on line | free slot machine downloads | online casino bonus | free poker sites
72.232.63.* ÓÚ 2007-02-09 17:10:48·¢±í:
Good design!
free online bingo | casino bonus | online casinos | play blackjack free | absolute poker | casino free games | play roulette for free | free slot games online | gambling sites | free slots
72.232.63.* ÓÚ 2007-02-08 16:50:10·¢±í:
Nice site!
world series of poker download | free blackjack | free casino games | no deposit casino | free play slots | free casino cash | free online poker games | play slot machines | free casinos | free bingo online
72.232.63.* ÓÚ 2007-02-08 16:49:42·¢±í:
Nice site!
poker game download | free poker download | casino on line | sim slots | cleopatra slot | play free slots online | play poker | three card poker | play free online slots | free slots machines
65.110.43.* ÓÚ 2007-02-08 16:48:05·¢±í:
Thank you!
poker | play online poker | free slots no downloads | play free slot machines | download free poker games | free blackjack game | games slots | free online blackjack | strip blackjack | download poker game
65.110.43.* ÓÚ 2007-02-08 16:47:01·¢±í:
Thank you!
black jack download | online texas holdem | texas holdem | casinos on line | poker bonus | gambling machines | free 3 card poker | play bingo | play roulette | keno online
65.110.43.* ÓÚ 2007-02-08 16:46:03·¢±í:
Great work!
new free money online casinos | fun slots | on line gambling | play bingo online | play poker online | internet blackjack | free online slot machines | black jack strip | free strip black jack | online texas hold em
72.232.63.* ÓÚ 2007-02-07 12:51:25·¢±í:
Well done!
free slot machine game | black jack game | free casino money | free monopoly online | no deposit casino | poker game free | online games | online slots free | free online poker | black jack
65.110.43.* ÓÚ 2007-02-07 12:50:34·¢±í:
Great work!
play slots for fun | us poker sites | noble poker | free casino | absolute poker | new no deposit casinos | black jack games | free video slot games | free online poker game | video poker free
72.232.250.* ÓÚ 2007-02-07 12:50:04·¢±í:
Nice site!
video slot machine | online gambling sites | free slots | online free poker | strip blackjack online | slot machine games | casino no deposit | virtual poker | casino game download | roulette free games
72.232.63.* ÓÚ 2007-02-07 12:49:43·¢±í:
Great work!
on line gambling | online gambling | play money poker | free sim slots | online black jack | poker online | play texas holdem | no download free slots | strip blackjack game | free online poker games
65.110.43.* ÓÚ 2007-02-07 12:49:36·¢±í:
Well done!
free three card poker | play free blackjack online | blackjack software | bingo online | free download poker | play texas holdem free | empire poker | free casino games online | free blackjack games | free money casinos
65.110.43.* ÓÚ 2007-02-06 11:40:34·¢±í:
Thank you!
free casino cash | online games | video poker | play free slot machines | on line casinos | virtual poker | slot game | casino bonus | planet poker | free texas holdem
72.232.250.* ÓÚ 2007-02-06 11:40:12·¢±í:
Great work!
free joker poker | no deposit casinos | play free blackjack online | black jack | video slot machines | slot machines games | roulette online | poker texas holdem | free poker money | bingo games
72.232.63.* ÓÚ 2007-02-06 11:40:02·¢±í:
Great work!
online black jack | free poker games | download party poker | no download free slots | slots for fun | world poker | online gambling sites | poker for free | party poker download | play slot machines
72.232.250.* ÓÚ 2007-02-06 11:39:55·¢±í:
Great work!
free joker poker | no deposit casinos | play free blackjack online | black jack | video slot machines | slot machines games | roulette online | poker texas holdem | free poker money | bingo games
72.232.63.* ÓÚ 2007-02-06 11:39:03·¢±í:
Good design!
online free roulette | free monopoly online | free slot machine play | no deposit casino bonuses | download free poker | blackjack for free | online casino games | play roulette online | play bingo | free online poker game
65.110.43.* ÓÚ 2007-02-06 11:38:51·¢±í:
Good design!
online texas holdem | free online texas holdem | free video slot games | online free blackjack | free cleopatra slots | free strip black jack | casino online | texas hold em | games slots | online video slots
72.232.63.* ÓÚ 2007-02-05 12:21:46·¢±í:
Good design!
free online strip blackjack | no download free slots | play poker for free | poker stars | casinos on line | free texas holdem online | poker game download | poker online | roulette game | computer poker
65.110.43.* ÓÚ 2007-02-05 12:21:26·¢±í:
Nice site!
blackjack for free | casino bonus | on line gambling | free slots for fun | empire poker | slot machines | full tilt poker | black jack online | play free slot machines | poker download
72.232.63.* ÓÚ 2007-02-05 12:20:55·¢±í:
Good design!
video slot games | free texas hold em | sims free slots | party poker download | casino poker | free slots no download | poker games online | internet blackjack | online texas hold em | free slots download
72.232.63.* ÓÚ 2007-02-05 12:20:30·¢±í:
Thank you!
caribbean poker | live poker | free casino games | online bingo | free slots game | play roulette for free | video slot machine | world series of poker | best online casinos | free video slot games
72.232.63.* ÓÚ 2007-02-05 12:20:08·¢±í:
Well done!
casino free | play blackjack | free online slots no downloads | free gambling | no deposit online casinos | texas poker | slots for fun | play texas holdem free | world series of poker download | poker machines
72.232.250.* ÓÚ 2007-02-04 14:53:34·¢±í:
Thank you!
online casino | free video slots | bingo online | blackjack online | empire poker | texas poker | video slot machine | black jack download | free slot machine games | play online poker
72.232.250.* ÓÚ 2007-02-04 14:52:56·¢±í:
Well done!
online poker | poker bonus | free online slots games | games on line | stud poker | free slot machines online | free online casino slots | free poker online | free online strip blackjack | video slots free
72.232.63.* ÓÚ 2007-02-04 14:52:30·¢±í:
Good design!
free poker games | casino on net | live poker | slot games | free money no deposit | casino download | sims slots | strip blackjack free | free online slot machine games | play slots for fun
72.232.250.* ÓÚ 2007-02-04 14:52:10·¢±í:
Great work!
black jack free | texas hold em online | free slot machine play | free slot games no download | online strip blackjack | play roulette free | casino games online | casino free games | poker on line | free slot downloads