borland´«Ææ-µÚ30ÕÂ
°´¼üÅÌÉÏ·½Ïò¼ü ¡û »ò ¡ú ¿É¿ìËÙÉÏÏ·ҳ£¬°´¼üÅÌÉ쵀 Enter ¼ü¿É»Øµ½±¾ÊéĿ¼ҳ£¬°´¼üÅÌÉÏ·½Ïò¼ü ¡ü ¿É»Øµ½±¾Ò³¶¥²¿£¡
¡ª¡ª¡ª¡ªÎ´ÔĶÁÍꣿ¼ÓÈëÊéÇ©ÒѱãÏ´μÌÐøÔĶÁ£¡
·þÎñÆ÷Ö´ÐеÄÊýÄ¿¡£µ±Container·þÎñÆ÷µÄÖ´ÐÐÊý´ïµ½ÓÒͼÖм¯Çø´óСµÄÊýÄ¿Ö®ºó£¬¡¡
Windows²Ù×÷ϵͳ±ã»áÖظ´Ê¹ÓÃÒѾ´æÔÚµÄContainer·þÎñÆ÷£¬¶ø²»»áÔÊÐí¿Í»§¶Ë¼ÌÐø¡¡
½¨Á¢ÐµÄContainer·þÎñÆ÷£¬Èç´ËÒ»À´£¬¾Í²»»áÈÿͻ§¶ËÆô¶¯Ì«¶àµÄContainer·þÎñÆ÷¡¡
ÒÔÍÏ¿åWindows²Ù×÷ϵͳ¡£¡¡¡¡¡¡
¶øÓ¦ÓóÌÐò»ØÊÕ£¨Application¡¡Recycling£©¹¦ÄÜÔòÊÇMicrosoftΪÁË¿Ë·þ£«ÄÚ´æй©¡¡
£¨Memory¡¡Leak£©ÎÊÌâ¼ÓÈëµÄ¡£ÔÚ£«1¡£5ÖУ¬³ÌÐòÔ±¿ÉÒÔÖ¸¶¨£«µÄApplicationÔÚÒ»¡¡
¶¨Ê±¼ä¡¢»òÊÇÔÚ£«µÄApplicationµÄÄÚ´æʹÓõ½´ïÒ»¶¨µÄÊýÁ¿¡¢»òÊDZ»µ÷ÓÃÁËÒ»¶¨¡¡
µÄ´ÎÊý¡¢»òÊDZ»Æô¶¯ÁËÒ»¶¨µÄ´ÎÊýÖ®ºó¾ÍÖØÐÂÆô¶¯£«µÄApplication¡£ÕâÑù£¬¿ÉÒÔ¡¡
ÈÃContainer·þÎñÆ÷½áÊøÔËÐУ¬¶ø²Ù×÷ϵͳÔò¿ÉÒÔ»ØÊÕÒòΪ£«¶ÔÏóй©µÄÄÚ´æ¡£ÔÚ¡¡
£«ÉÐδÏñEJB»òÊÇÒ»ÑùÒÔÐéÄâÖ´Ðл·¾³½øÐÐGarbage¡¡Collection֮ǰ£¬Õâµ¹²»¡¡
ʧΪһ¸öºÃ·½·¨£¬ÒòΪWindows¡¡2000ºÍXPÔÚ½ø³Ì°²È«¿ØÖÆ·½ÃæÓÐÁË´ó·ùµÄ¾«½ø¡£¡¡¡¡¡¡
´ËÍ⣬£«1¡£5µÄ×é¼þ·þÎñ³ÌÐòÒ²ÔÊÐí³ÌÐòÔ±Ö±½Ó¹ÜÀíºÍÉ趨¾ÉµÄ/D×é¼þ£¬²»¡¡
ÐèÒªÔÙʹÓÃDCNFG¡£exe³ÌÐò¡£1¡£5µÄ×é¼þ·þÎñ³ÌÐòÕûºÏÁËËùÓÐÐÍ̬µÄ×é¼þ£¬ÊÇÏà¡¡
µ±²»´íµÄ¹¦ÄÜ¡£¡¡¡¡¡¡
´Ó£«1¡£5µÄ·¢Õ¹À´¿´£¬ÆäËûµÄÐí¶à¹¦Äܶ¼ÊôÓÚС½ø²½£¬Î´À´£«µÄ·¢Õ¹½«»áºÜС£¬¡¡
½ø¶ø£«»áÕæÕýµØת±ä³ÉWindowsµÄºËÐÄ·þÎñÖ®Ò»¡£Î´À´WindowsµÄ×é¼þÄ£ÐÍÓ¦¸ÃÊÇÓÉ¡¡
µÄ×é¼þ¼Ü¹¹À´½Ó°ô£¬ÒòΪMicrosoftÈÔÈ»ÐèÒªÒ»¸öÌṩÐéÄâÖ´Ðл·¾³µÄ×é¼þ¼Ü¹¹£¬¡¡
ÒÔÌṩÁ¼ºÃµÄGarbage¡¡CollectionºÍPartitioningµÄ¹¦ÄÜ£¬½øÒ»²½ºÍEJB¾ºÕùÆóҵϵ¡¡
ͳµÄÑÓÕ¹ÐÔ£¬¶øÕâ¸öÕ÷Õ׿ÉÒÔ´ÓÉÔºóÌÖÂ۵ķ¢Õ¹¿´µÃ³öÀ´¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡
SUNµÄEJB×é¼þÄ£ÐÍ¡¡¡¡¡¡
¾¹ýÁ˽«½ü2ÄêµÄʱ¼äºó£¬SUNÖÕÓÚÔÚ×î½üÍƳöÁËÐÂÒ»°æµÄEJB¡¡2¡£0¹¦Äܹæ¸ñ£¬ºÜ¿ìÒ²¡¡
±»BEAºÍBorlandµÄBESʵÏÖ³öÀ´¡£SUNÔÚEJB¡¡2¡£0ÖÐÌá³öÁËÐí¶àÏȽø¶ø¸´ÔӵŦÄÜ£¬Ä¿¡¡
µÄÊÇΪÁË´ó·ùÇ¿»¯EJB×÷ΪÆóÒµºËÐÄ×é¼þ¼Ü¹¹µÄ±¾Ç®£¬ÒÔ±ãÔÚÆóҵϵͳÖкÍMicrosoft¡¡
ÏÂÒ»´úµÄ×é¼þ¾ºÕù¡£¡¡¡¡¡¡
´ÓSUN¶¨ÒåEJBµÄ¹æ·¶¿ªÊ¼£¬¾ÍÕ¹ÏÖÁËÆäºÍ²»Ò»ÑùµÄ¹ÛÄî¡£EJBÒ»¿ªÊ¼¾Í·Ç³£ÖØÊÓ¡¡
Design¡¡PatternºÍ×é¼þÖÖÀ࣬ÀýÈçSession¡¡BeanºÍEntity¡¡Bean¸÷×Ô¸ºÔð²»Í¬µÄ½ÇÉ«£¬¡¡
ÔÙ½èÖúÓÚJavaµÄGarbage¡¡Collection£¬ÌṩÁ˳ÉΪÆóÒµÐÅϢϵͳ×é¼þ±ØÒªµÄ»ù´¡¡£µ«¡¡
ÊÇ£¬ÔÚEJB¡¡1¡£xÖУ¬ËùÓеÄBean¡¡InstanceÖ®¼äµÄµ÷Óö¼ÊÇʹÓÃRemote¡¡Interface·½Ê½£¬¡¡
Òò´ËÔÚÐí¶àµÄÓ¦Ó÷½Ã渶³öÁ˽ϴóµÄ¿ªÏú£¬µ¼ÖÂһЩÇé¿öÏÂÖ´ÐÐЧÂʲ»¼Ñ¡£ÔÚEJB¡¡1¡£x¡¡
Öз¢Õ¹³öÁËÐí¶àµÄDesign¡¡PatternÀ´¸ÄÉÆÕâÖÖÏÖÏó£¬ÀýÈç¹ÄÀøʹÓÃCoarse¡Grained¶Ô¡¡
Ïó£¬ÒÔ¼õÉÙÍøÂçRound¡TripºÍBeanÖ®¼äµÄµ÷ÓôÎÊý¡£¡¡¡¡¡¡
ÔÚEJB¡¡2¡£0ÖУ¬SUNÖÕÓÚΪ¸ÄÉÆÕâ¸öÎÊÌâ¶øÌá³öÁËLocal¡¡Interface¡£ËùνLocal¡¡¡¡
Interface£¬ÊÇÖ¸µ±Bean¡¡InstanceÔÚͬһ¸öEJB¡¡ContainerÖÐʱ£¬EJB¡¡Container¿ÉÒÔ¡¡
ʹÓÃLocal¡¡Interfaceµ÷ÓÃÀ´´úÌæRemote¡¡Interfaceµ÷Óã¬ÕâÑù¿ÉÒÔÔö¼Ó3±¶ÒÔÉϵĶԡ¡
ÏóÆô¶¯Ð§ÂÊ¡£ÁíÍ⣬SUN¼ÓÈëLocal¡¡Interface¹¦ÄܵÄÖØÒªÔÒòÊÇΪÁËÖ§³ÖEJB¡¡2¡£0ÖС¡
´ó·ùÇ¿»¯µÄCMP£¨Container¡¡Managed¡¡Persistence£©¹¦ÄÜ¡£¡¡¡¡¡¡
¼òµ¥µØ˵£¬EJB¡¡2¡£0ÖеÄCMPÔÊÐí³ÌÐòԱʹÓÃEJB¡¡Query¡¡LanguageÀ´¶¨ÒåBeanÖ®¼äµÄ¹Ø¡¡
ϵ¡£Ö»Òª³ÌÐòԱʹÓÃEJB¡¡QL¶¨ÒåÁËÒ»¸öBeanºÍÁíÍâÒ»¸öBeanµÄ¹Øϵ£¨Relationship£©£¬¡¡
ÄÇ¿Í»§¶Ë±ã¿ÉÒÔÔÚ´æÈ¡ÁËÖ÷ÒªBeanÖ®ºó£¬ÔÙͨ¹ýBean¶¨ÒåµÄFinder»òÊÇSelector·½·¨¡¡
È¡µÃËùÓеĴÓÊôBean¡£Èç¹û¶ÁÕß²»Ì«Á˽âÕâ¸öÒâ˼£¬¿ÉÒԲο¼ÏÂÃæµÄʾÒâͼ¡£ÔÚ¿Í»§¡¡
¶Ë½¨Á¢Ö÷CMPÖ®ºó£¬¿ÉÒÔͨ¹ýÖ÷CMPµÄFinder»òÊÇSelector·½·¨È¡µÃËùÓеĴÓÊôBean£¬¡¡
´Ëʱ£¬Ö÷CMP±ã¿ÉÒÔͨ¹ýEJB¡¡QLÏòÊý¾ÝÔ´²éѯËùÓÐÏà¹ØµÄÊý¾Ý£¬ÔÙÓÉEJB¡¡Container¸ù¡¡
¾Ý²éѯµÄÊý¾Ý×Ô¶¯½¨Á¢´ÓÊôBean¡¢²¢ÇÒºÍÖ÷CMP½¨Á¢¹ØÁª¡£Èç´ËÒ»À´£¬2¡£0µÄCMP¿ÉÒÔ¡¡
Ãâ³ý³ÌÐòÔ±×ÔÐÐ׫д´æÈ¡Êý¾ÝºÍ½¨Á¢CMPµÄ³ÌÐò´úÂëµÄÂé·³£¬²¢ÇÒÔÊÐíEJB¡¡Container¡¡
ʹÓÃ×î¼Ñ»¯µÄ·½Ê½´ÓÊý¾ÝÔ´´æÈ¡Êý¾ÝºÍ½¨Á¢CMP¡£ÎªÁËÔö¼ÓÕâ¸ö¹ý³ÌµÄÖ´ÐÐЧÂÊ£¬EJB¡¡¡¡
2¡£0µÄ¹¦Äܹ淶ҪÇóÕâÖÖBean±ØÐëÖ§³ÖLocal¡¡Interface£¬µ±È»£¬ÕâÒ²´ú±í×ÅÕâЩ»á¡¡
½¨Á¢¹ØϵµÄBean±ØÐëÖ´ÐÐÔÚÒ»¸öÏàͬµÄEJB¡¡ContainerÖС£EJB¡¡2¡£0µÄCMPÔö¼ÓÁ˹¦ÄÜ¡¡
ºÍЧÂÊ£¬µ«ÊÇÒ²Ôö¼ÓÁËBeanÖ®¼äÏ໥ÒÀ¿¿µÄ¹Øϵ£¬Õâ»áÓ°ÏìEJB³ÌÐòÔ±ÔÚÉè¼Æϵͳʱ¡¡
µÄ²¼¾Ö¡£´ËÍ⣬EJB¡¡2¡£0µÄCMPËäÈ»ÌṩÁËÕâôǿ´óµÄ¹¦ÄÜ£¬µ«ÕâÒ²ÊDz»Í¬³§ÉÌʵÏֵġ¡
EJB·þÎñÆ÷Ö´ÐÐЧÂÊÓвî¾àµÄµØ·½¡£²»Í¬EJB·þÎñÆ÷ʹÓõÄʵÏÖ·½·¨µÄ²»Í¬£¬»á´ó´óÓ°¡¡
ÏìÖ´ÐÐЧÂÊ¡£Õâ¾ÍÊÇΪʲôSUN¶¨ÒåÁËECperf±ê×¼À´¼ìÑéºÍÆÀ±ÈEJB·þÎñÆ÷µÄÕæÕýÖ´ÐС¡
ЧÂʵÄÔÒò£¬ÕâÉÔºó»á̸µ½¡£¡¡¡¡¡¡
Òò´Ë£¬ÔÚEJB¡¡2¡£0¹¦Äܹæ¸ñÖУ¬SUN¶¨ÒåÁËÊý¸ö»úÖÆÀ´Ôö¼ÓEJB·þÎñÆ÷µÄÖ´ÐÐЧÂÊ£¬Õâ¡¡
ÔÚEJBµÄ¼Ü¹¹ÒѾºÜÍêÕûµÄÇéÐÎÏÂÊǺÜ×ÔÈ»µÄÏÂÒ»²½¡£µ±È»£¬³ýÁËÉÏÊöµÄ¹¦ÄÜÍ⣬EJB¡¡¡¡
2¡£0¹¦Äܹæ¸ñÒ²Ôö¼ÓÁËMDB£¨Message¡¡Driven¡Bean£©£¬MDB¿ÉÒÔÈóÌÐòԱʹÓÃÒì²½µÄ·½Ê½¡¡
´«ËÍÐÅÏ¢£¬ÊÂʵÉÏ°ÑÔ±¾JMSµÄ¹¦ÄܼÓÈëµ½EJBµÄ¹¦Äܹæ¸ñÖУ¬ÊÇΪÁ˶Կ¹Microsoft¡¡
°ÑMSMQÕûºÏ½ø£«¡£Çë¿´EJB½ø»¯µÄʾÒâͼ£¬ÎÒÈÏΪEJB¡¡2¡£0×îÖØÒªµÄ½ø²½±ãÊÇÖ´ÐÐЧ¡¡
ÂÊ¡¢OR¡¡MappingÒÔ¼°EJBµÄ²éѯÓïÑÔ¡£EJBµÄ²éѯÓïÑÔ¿ªÆôÁËδÀ´ºÍJDO£¨Java¡¡Data¡¡¡¡
Object£©µÄÕûºÏ£¬Ä¿µÄÊǺÍMicrosoftÔÚÖж¨ÒåµÄOPathºÍÊý¾Ý¶ÔÏóÏ໥¾ºÕù£¬Õâ¡¡
ÔÚÉÔºóÒ²»áÔÙ˵Ã÷¡£ÖÁÓÚOR¡¡Mapping£¬ÔòÊÇÒ»¸ö·Ç³£¸´ÔӵĻúÖÆ¡£Ëü¹æ·¶ÁËBean¡¡¡¡
InstanceºÍÊý¾ÝÔ´Ö®¼äµÄ¹Øϵ£¬Õâ¸ö±ê×¼¿ÉÄÜ»áÈÃÐí¶àСµÄEJB·þÎñÆ÷³§ÉÌÍ˳öEJBÊС¡
³¡£¬»òÊÇÎÞ·¨ÍêÕûµØÖ§³ÖEJB¡¡2¡£0µÄ¹¦Äܹæ¸ñ¡£¡¡¡¡¡¡
ÔÙ¿´¿´Local¡¡InterfaceµÄÒâÒå¡£ÔÚEJB¡¡1¡£xÖУ¬¿Í»§¶Ëµ÷ÓÃBean¡¡Instanceʱ£¬ÔÚ¡¡
ContainerÖÐBeanºÍBeanÖ®¼ä¶¼ÊÇʹÓÃRemote¡¡InterfaceµÄ·½Ê½½øÐе÷Óã¬ÈçÏÂͼËùʾ£º¡¡¡¡¡¡
ÊÂʵÉÏ£¬Í¼ÖÐÏÔʾµÄÆô¶¯Ä£Ê½ÊǷdz£ÀË·Ñ×ÊÔ´µÄ£¬ÒòΪͼÖеÄBean¶¼ÊôÓÚͬһ¸ö¡¡
ContainerÖ®ÖУ¬ÎªÊ²Ã´ÒªÊ¹ÓûºÂýµÄRemoteµ÷ÓÃģʽÄØ£¿Òò´ËÔÚEJB¡¡2¡£0Öж¨ÒåÁË¡¡
Local¡¡Interface¡£ÈçÏÂͼ£¬ÏÖÔÚÖ»ÓÐÔÚ¿çÔ½ÍøÂç»òÊÇ¿çÔ½²»Í¬µÄContainerʱ²ÅÐèÒª¡¡
ʹÓÃRemoteµ÷ÓÃģʽ£¬Õâ´ó´óµØ¸ÄÉÆÁËʹÓõÄ×ÊÔ´ºÍµ÷ÓÃЧÂÊ¡£¡¡¡¡¡¡
¸üºÃµÄÊÇÔÚEJB¡¡2¡£0ÖУ¬Ò»¸öBean¿ÉÒÔͬʱ¶¨ÒåRemote¡¡InterfaceºÍLocal¡¡Interface¡£¡¡
Èç´ËÒ»À´£¬BeanµÄʹÓÃÕߺÍ×éºÏÕߣ¨Assembler£©¿ÉÒÔ¸üÓе¯ÐԵطַ¢ºÍ²¿ÊðEJB¡¡Bean¡£¡¡
ÔÚEJB¡¡2¡£0ÖУ¬BeanÖ»Òª´ÓEJBLocalObject¼Ì³ÐÏÂÀ´£¬¾Í¿ÉÒÔÓµÓÐLocal¡¡InterfaceµÄ¡¡
¹¦ÄÜ¡£ÀýÈç³ÌÐòÔ±¿ÉÒÔÓÃÏÂÃæµÄ³ÌÐò´úÂëÀ´ÌṩLocal¡¡InterfaceµÄ¹¦ÄÜ¡£±¾ÖÊÉÏ£¬¡¡
ʵÏֺͶ¨ÒåLocal¡¡InterfaceµÄ·½Ê½ºÍÔ±¾µÄRemote¡¡Interface·Ç³£ÀàËÆ£¬Òò´ËEJB¡¡
µÄ³ÌÐòÔ±¿ÉÒÔºÜ×ÔÈ»µØѧ»áÕâ¸öеÄEJB¹¦ÄÜ¡£¡¡¡¡¡¡
public¡¡interface¡¡YourobjectClass¡¡extends¡¡EJBLocalObject¡¡¡¡
public¡¡interface¡¡YourobjectClass¡¡extends¡¡EJBLocalHome¡¡¡¡¡¡¡¡¡¡¡¡
Á˽âÁËEJB¡¡2¡£0Ôö¼ÓµÄ¹¦ÄÜÖ®ºó£¬ÏÖÔھͿÉÒԻص½Ç°ÃæÅóÓÑѯÎÊÎÒµÄÎÊÌâÁË£¬ÎªÊ²Ã´¡¡
ÔÚEJBÖÐûÓп´µ½ÈκÎÏñÒ»ÑùµÄÏß³ÌÄ£ÐÍÖ®ÀàÄØ£¿ÊÂʵÉÏÕâºÜ¼òµ¥£¬ÒòΪEJBÊÇÒ»¡¡
¸ö±ê×¼¹¦Äܹæ¸ñ£¬²¢²»°üº¬ÈçºÎʵÏÖµÄϸ½Ú£¬ÔÚÒ»°ãµÄEJBÊé¼®Öе±È»¿´²»µ½ÀàËƵġ¡
¶«Î÷¡£¶øÇÒ£¬Ö®ËùÒÔÓÐÕâô¸´Ôӵĸ÷ÖÖÏß³ÌÄ£ÐÍ£¬ÊÇÒòΪ·¢Õ¹µÄ°ü¸¤ÒÔ¼°ÀúÊ·¡¡
µÄÒòËØËùÔì³ÉµÄ¡£²»¹ý£¬Õâ²¢²»´ú±íÔÚEJBÖÐûÓÐÏß³ÌÄ£Ð͵ÄÎÊÌ⣬ÒòΪEJB³§ÉÌÈçºÎ¡¡
ʵÏÖEJB¹¦Äܹæ¸ñ»áÉîÉîµØÓ°ÏìEJB·þÎñÆ÷µÄЧÂÊ¡£Òò´Ë£¬Ïß³ÌÄ£ÐÍ·´¶øÊÇEJB³ÌÐòÔ±¡¡
Ó¦¸ÃÖªµÀµÄ¶«Î÷£¬Ö»ÊÇÒÀ¾Ý²»Í¬µÄ³§É̶øÓв»Í¬µÄ½á¹û£¬²»Ïñ¹¦Äܹæ¸ñÊÇÓÉ¡¡
Microsoft¶¨ÒåµÄ£¬Ò²ÊÇÓÉMicrosoftʵÏֵģ¬Òò´Ë»áÓÐÒ»ÖµÄÖ´ÐÐÐÐΪ¡£¡¡¡¡¡¡
EJBµÄÏß³ÌÄ£ÐÍÓ¦¸ÃÊÇʹÓÃObject¡¡Per¡¡ClientµÄÄ£ÐÍ¡£Õâ¸öÒâ˼ÊÇ˵£¬EJB¡¡Container¡¡
»áΪÿһ¸öÇëÇóµÄ¿Í»§¶Ë½¨Á¢Ò»¸ö¶ÀÁ¢µÄBean·þÎñ¡£Òò´Ë£¬Èç¹ûEJB³§ÉÌûÓÐÌرð½ø¡¡
ÐÐ×î¼Ñ»¯µÄ¹¤×÷£¬ÄÇEJBʹÓõÄÄ£ÐÍÓ¦¸ÃÊÇÀàËÆÖеÄSTA£¬Ò²¾ÍÊÇ˵£¬Ò»´ÎÖ»ÓÐÒ»¡¡
¸öWorkerÏß³ÌÔÚBean¡¡InstanceÖÐÖ´ÐС£ÏÂͼ¾ÍÏÔʾÁËÕâ¸ö¼Ü¹¹£¬¶Ôÿһ¸ö¿Í»§¶Ë¾Í¡¡
Æô¶¯Ò»¶ÔWorker¡¡Thread/Bean¡¡Instance¡£¡¡¡¡¡¡
ÉÏͼÐðÊöµÄÊÇÕý³£µÄÇéÐΣ¬ÄÇÈç¹ûÈÃÁ½¸ö¿Í»§¶Ëͬʱ´æÈ¡Ò»¸öBean¡¡Instanceʱ£¬»á¡¡
·¢ÉúʲôÇé¿öÄØ£¿ÏÂͼ¾ÍÏÔʾÁËÕâ¸ö¼Ü¹¹¡£ÔÚÕâ¸öÇéÐÎÖУ¬Èç¹ûÓÐÁ½¸ö¿Í»§¶ËҪͬʱ¡¡
´æÈ¡Bean¡¡Instance£¬ÄÇEJB¡¡ContainerÈçºÎ¿ØÖÆÄØ£¿ÔÚÒ»°ãµÄEJBÊé¼®ÖУ¬ËƺõҲû¡¡
Óп´µ½ºÍͬ²½´¦ÀíÓйصķ¶Àý£¬ÄѵÀ˵£¬¿ÉÒÔ²»½øÐÐÈκεĴ¦Àí¾ÍÈÃÁ½¸ö¿Í»§¶Ëͬʱ¡¡
´æÈ¡Âð£¿Õ⵱Ȼ²»»á£¬ÒòΪ´ËʱEJB¡¡Container¾Í»á½øÐйÜÀí£¬ÒÔSTAµÄģʽ¿ØÖÆͬ²½¡¡
´æÈ¡£¬Òò´Ë¿Í»§¶ËµÄ´æÈ¡±ØÐëÒÀÐò£¨ÅŶӣ©À´µ÷ÓÃBean¡¡Instance¡£¡¡¡¡¡¡
Õâ¸öÇéÐÎÒ²¿ÉÒÔÖ±½Ó´ÓBeanµÄʵÏÖ³ÌÐò´úÂëÖп´³ö£¬ÀýÈçÏÂÃæµÄ³ÌÐò´úÂëÊÇEJBµÄ±ê¡¡
×¼·¶ÀýEntity¡¡BeanµÄʵÏÖ³ÌÐò´úÂë¡£Çë×¢Ò⣬ÔÚÕâ¸öBeanÀà±ðÖж¨ÒåÁËÊý¸öprivate¡¡
±äÁ¿£¬²¢ÇÒÔÚBeanµÄ·½·¨ÖÐÖ±½Ó´æÈ¡ºÍ´¦ÀíÕâЩprivate±äÁ¿£¬ÍêÈ«²»ÐèÒª¿¼ÂÇÈκΡ¡
µÄͬ²½´¦Àí»úÖÆ£¬Õâ¾ÍÊÇÒòΪEJB¡¡ContainerÒ»°ã¾ÍÊÇʹÓÃObject¡¡Per¡¡ClientµÄÄ£ÐÍ¡¡
ÒÔ¼°ÀàËƵÄSTAµÄÏ߳̿ØÖÆÄ£ÐÍ¡£¡¡¡¡¡¡
ÕâÖ»ÊÇÒ»°ãµÄEJB¡¡Container¿ÉÄÜ»áʹÓõÄÄ£ÐÍ£¬µ«ÓÐһЩEJB·þÎñÆ÷ÌṩÁË×î¼Ñ»¯µÄ¡¡
»úÖÆ£¬¿ÉÄÜ»áÌṩ¸üΪÓÐЧÂʵķ½Ê½¡£ÏÂÃæµÄ±í¸ñÁгöÁË/£«ºÍEJBÔÚÏß³ÌÄ£ÐÍ¡¡
·½ÃæµÄ±È½Ï£º¡¡¡¡¡¡
ÒòΪ²»Í¬µÄÓ¦ÓóÌÐò·þÎñÆ÷³§ÉÌʵÏÖ¶ø²»Í¬¡¡¡¡¡¡
¶ÁÕß±ØÐë×¢ÒâµÄÊÇ£¬ÉÏ±í²¢²»´ú±í£«ÊDZȽϺõģ¬Ö»ÄÜ˵£«ÌṩÁ˽϶àµÄÑ¡Ôñ£¬¡¡
¿ÉÒÔÈÃÓоÑéµÄ³ÌÐòÔ±µ÷ÕûÖ´ÐÐЧÂÊ¡£µ«ÊÇ£¬Ïà¶ÔµØÒ²ÈÃÇéÐθ´ÔÓÁËÐí¶à£¬¶øÇÒ£«¡¡
µÄMTAÏß³ÌÄ£ÐÍÒ²²»ÈÝÒ×ʵÏÖ¡£¡¡¡¡¡¡
ÕýÓÉÓÚEJB¹¦Äܹæ¸ñ»áÒòΪ²»Í¬µÄEJB³§ÉÌʵÏÖ¶øÓв»Í¬£¬Òò´Ë£¬³ýÁËÇ°ÃæÌáµ½µÄEJB¡¡¡¡
2¡£0ÖÐCMPºÍOR¡¡Mapping»áÓ°ÏìEJB·þÎñÆ÷µÄÖ´ÐÐЧÂÊÖ®Í⣬Èç¹ûÔÙ½áºÏÏß³ÌÄ£ÐͺͶԡ¡
Ïó½¨Á¢µÄ¼¼Êõ£¬ÄÇÏÂÃæÁгöµÄÎÊÌâÊÇÓ°ÏìÖ´ÐÐЧÂʵÄÖØÒªÒòËØ£º¡¡¡¡¡¡
¡ñÈçºÎʵÏֺͿØÖÆWorker¡¡Thread¡£ÊÂʵÉÏÕâ¾ÍÊÇEJB¡¡ServerÖÐThread¡¡PoolingµÄ»úÖÆ¡¡
¡ñÈçºÎʵÏֺͿØÖÆEJB¡¡Bean¡¡Instance¡£Õâ¾ÍÊÇEJB¡¡ServerÖÐObject¡¡PoolingµÄ»úÖÆ¡¡¡¡¡¡
ΪÁËÈÃEJB·þÎñÆ÷Óй«Æ½µÄЧÂʱȽϻù´¡£¬SUN¶¨ÒåÁËECperf±ê×¼ÈÃʹÓÃÕßÄܹ»ÓÃÀ´ÆÀ¡¡
Á¿¸÷¼ÒEJB·þÎñÆ÷µÄÖ´ÐÐЧÂÊ£¬ÒÔ±ÜÃâ¸÷˵¸÷»°µÄÇéÐΡ£´ÓÕâÒ»µãÒ²¿ÉÒÔ¿´³ö£¬SUNÏÖ¡¡
ÔÚ¿ªÊ¼×¢ÖØEJB·þÎñÆ÷µÄÖ´ÐÐЧÂÊÒòËØÁË¡£¡¡¡¡¡¡
ΪʲôÎÒ˵Ïß³ÌÄ£ÐÍ»áÒòΪ²»Í¬µÄEJB·þÎñÆ÷¶øÓв»Í¬ÄØ£¿ÏÖÔÚÈÃÎÒÃÇÒÔʵÀýÀ´¿´¿´¡¡
EJB·þÎñÆ÷µÄÐÐΪ¡£ÏÂͼÊÇÎÒʹÓÃ4¸öDelphi½¨Á¢µÄ¿Í»§¶ËÓ¦ÓóÌÐò£¬²¢ÇÒʹÓÃSIDL¼¼¡¡
ÊõÀ´µ÷ÓÃBorland¡¡Application¡¡Server¡BASÖеÄÒ»¸öStateless¡¡Session¡¡BeanµÄ½á¹û¡£¡¡
´ÓͼÖпÉÒÔÃ÷ÏԵؿ´µ½£¬¼´Ê¹ÊÇÔÚÓÐ4¸ö¿Í»§¶ËµÄÇéÐÎÖУ¬BASÈÔȻʹÓÃÁËMTAģʽ£¬¡¡
Ö»½¨Á¢Ò»¸öStateless¡¡Session¡¡Bean£¬²¢ÇÒÈÃ4¸öWorkerÏß³Ìͬʱ´æÈ¡£¬Òò´ËÖ´ÐÐЧ¡¡
Âʷdz£¸ß£¬Ê¹ÓõÄÄÚ´æ×ÊÔ´Ò²·Ç³£ÉÙ¡£¡¡¡¡¡¡
¶øÏÂͼÔòʹÓÃ4¸öDelphi¿Í»§¶ËÓ¦ÓóÌÐòµ÷ÓÃStateless¡¡£«¶ÔÏó£¨Ê¹ÓÃBothÏß³ÌÄ£ÐÍ£©£¬¡¡
´ÓͼÖпÉÒÔ¿´µ½£¬£«Ê¹ÓÃObject¡¡Per¡¡ClientµÄģʽ£¬½¨Á¢ÁË4¸ö£«¶ÔÏó·þÎñ4¸ö¡¡
¿Í»§¶Ë£¬ËäȻִÐÐЧÂÊÒ²·Ç³£¸ß£¬µ«ÊÇʹÓõÄ×ÊÔ´ÉÔ±ÈBAS¶à¡£¡¡¡¡¡¡
½ÓÏÂÀ´£¬ÔÙÈÃÎÒÃÇÌÖÂÛÒ»ÏÂδÀ´MicrosoftµÄ×é¼þÄ£ÐÍÒÔ¼°SUNµÄ×é¼þÄ£Ð͵ÄÑݽøÇ÷ÊÆ¡£¡¡¡¡¡¡¡¡¡¡
Data¡¡Access¡¡Technology¡¡¡¡¡¡
ÔÚδÀ´£¬MicrosoftºÍSUNµÄ×é¼þÄ£ÐÍ´ó¸Å¶¼»áÇ¿µ÷Êý¾Ý´æÈ¡µÄ¼¼Êõ£¬ÒòΪ´ÓÇ°ÃæÌÖÂÛ¡¡
µÄEJB¡¡2¡£0¡¡CMPµÄÄÚÈÝÖÐÎÒÃÇ¿ÉÒÔÖªµÀ£¬ÏÖÔÚSUNÒѾÔÚΪ¶ÔÏóºÍÊý¾ÝÖ®¼ä½¨Á¢Á¬½ÓµÄ¡¡
¼¼ÊõÁË£¬¶øδÀ´µÄJDO¼¼Êõ½«½øÒ»²½½ôÃܽáºÏÊý¾Ý¶ÔÏóµÄ¹ÛÄÈóÌÐòÔ±Ãæ¶ÔµÄËùÓС¡
¶«Î÷¶¼ÊǶÔÏ󣬲»ÔÙÓÐÊý¾ÝºÍ¶ÔÏó²»Ò»ÑùµÄ¹ÛÄîºÍʹÓ÷½Ê½¡£¡¡¡¡¡¡
²»¹ý±ðÒÔΪMicrosoftÖ»»á´ôÔÚԵأ¬ÔÚPDC¡¡2002ÖÐMicrosoftÒѾÐûʾÁËδÀ´ADO¡¡
µÄ·¢Õ¹·½Ïò¡£ADOδÀ´½«»á½áºÏÊý¾ÝºÍ×é¼þµÄ¹ÛÄÈõijÌÐòÔ±ÒÔ¶ÔÏóµÄ¹Û¡¡
ÄîÀ´´ú±íÊý¾Ý£¬¾ÍÏñEJBÖеÄCMP/BMPÒ»Ñù¡£Èç´ËÒ»À´£¬µÄ³ÌÐòÔ±¿ÉÒÔÏñEJBÒ»Ñù¡¡
ÉùÃ÷´ú±íÊý¾ÝÔ´ÖÐÊý¾ÝµÄÊý¾ÝÀàÐÍ£¬²¢ÇÒʹÓÃÒÔXML¸ñʽ·â×°µÄÊý¾Ý¶ÔÓ³ÐðÊöÆ÷£¨Data¡¡¡¡
Descriptor£©À´Á¬½ÓÊý¾Ý¶ÔÏóºÍÊý¾ÝÔ´Ö®ÖеÄÊý¾Ý¡£Èç´ËÒ»À´£¬µÄ×é¼þÄ£ÐÍÒ²ÌáÉý¡¡
µ½ºÍEJB¡¡2¡£0¼ÓÉÏδÀ´JDOÒ»ÑùµÄ²ã´Î¡£¡¡¡¡¡¡
ÀýÈç³ÌÐòÔ±¿ÉÒÔ¶¨ÒåÈçϵÄÊý¾ÝÀàÐÍ£º¡¡¡¡¡¡
¡¡¡¡¡¡¡¡public¡¡abstract¡¡class¡¡Customer¡¡£û¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡public¡¡abstract¡¡string¡¡Name£ûget£»¡¡set£»£ý¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡£§Link£¨Account£©£§¡¡public¡¡abstract¡¡IList¡¡Accounts¡¡£ûget£»£ý¡¡¡¡
¡¡¡¡¡¡¡¡£ý¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡public¡¡abstract¡¡class¡¡Account¡¡£û¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡public¡¡abstract¡¡float¡¡Amount¡¡£ûget£»¡¡set£»£ý¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡public¡¡void¡¡CalculateTotal£¨£©¡¡£û¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡business¡¡logic¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡£ý¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡£ý¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
²¢ÇÒ¶¨ÒåÉÏÊöCustomerºÍAccountÖ®¼äµÄÁ¬½Ó¹Øϵ£¬ÕâºÍEJB2¡£0ÖÐеÄCMP¹¦ÄÜÒ»Ñù£¬¡¡
È»ºóÔÙ¶¨ÒåÈçϵĶÔÏó/Êý¾Ý¶ÔÓ³Æ÷£¬°Ñ¶ÔÏóºÍÊý¾ÝÔ´Á¬½ÓÆðÀ´£¬ÇëÌرð×¢ÒâÏÂÃæ¡¡
relationshipµÄ²¿·Ö£º¡¡¡¡¡¡
×îºó£¬³ÌÐòÔ±¿ÉÒÔʹÓÃÈçϵÄÐÎʽͨ¹ýÊý¾Ý¶ÔÏó´æÈ¡Êý¾Ý£¬²¢ÇÒÔÚÊý¾Ý¶ÔÏóÖ®¼ä×Ô¶¯¡¡
ÐγɹØÁªµÄ¹Øϵ¡£Õâ·Ç³£ÓÐÍþÁ¦£¬ºÍEJB/JDO²»ÏàÉÏÏ¡£ÊÂʵÉÏ£¬ADOºÍEJB/JDO¡¡
ʵÏֵĹÛÄîºÍÏë·¨·Ç³£ÀàËÆ£¬ÕâÊÇÇɺϻ¹ÊÇÄ£·ÂÄØ£¿»ù±¾ÉÏ¿ÉÒÔ˵£¬ÕâÁ½´óÕóÓª¶¼ÓС¡
»¥Ïà²Î¿¼¶Ô·½¼¼ÊõµÄµØ·½¡£¡¡¡¡¡¡
ÏÂͼ¾ÍÊÇδÀ´ADOµÄÊý¾Ý¶ÔÏó¼Ü¹¹£¬³ÌÐòÔ±Ö»ÐèÒªÐÞ¸ÄSchema¡¡Mapper¾Í¿ÉÒÔÁ¬½Ó¡¡
µ½²»Í¬µÄÊý¾ÝÔ´£¬ÀýÈçMS¡¡SQL¡¡Server»òÊÇOracleµÈ¡£¡¡¡¡¡¡
³ýÁËADOµÄÊý¾Ý¶ÔÏóÍ⣬MicrosoftÒ²¿ªÊ¼¶¨ÒåÀàËÆÓÚEJB¡¡QLµÄ¶ÔÏó²éѯÓïÑÔ£¬Ä¿¡¡
Ç°ÔÝʱ³ÆΪOPath¡£µ±È»£¬ÎÒÃÇ¿ÉÒÔ½øÒ»²½µØÌÖÂÛ¸üΪÉîÈëµÄ×é¼þ¼¼ÊõÎÊÌ⣬²»¹ýÓÉ¡¡
ÓÚƪ·ùµÄÏÞÖÆ£¬¾ÍÈÃÎÒÃÇÒÔºóÔÚרÃÅÌÖÂÛ¼¼ÊõµÄÊé¼®ÖмÌÐø˵Ã÷ºÃÁË¡£¡¡¡¡¡¡
ÏÂͼºÜÇå³þµØ˵Ã÷ÁËMicrosoftºÍSUN×é¼þÄ£Ð͵ķ¢Õ¹Ç÷ÊÆ¡£´ÓͼÖУ¬ÎÒÃǼ¸ºõ¿ÉÒÔÖª¡¡
µÀÕâÁ½Õ߷dz£ÀàËÆ£¬·¢Õ¹µÄ·½ÏòÒ²Ç÷ÓÚÒ»Ö¡£Î´À´±È½ÏµÄÒòËØ¿ÉÄÜÊÇÖ´ÐÐЧÂÊ¡¢ÑÓÕ¹¡¡
ÐÔ¡¢Äܹ»Ö´ÐеÄƽ̨ÒÔ¼°¿ª·¢¹¤¾ßµÄÖ§³Ö³Ì¶ÈºÍʹÓõķ½±ãÐÔ°É¡£¡¡¡¡¡¡
×ÛºÏÉÏÊöÄÚÈÝ£¬´Ó×î½üMicrosoftµÄ£«/µÄÍƳö¡¢SUNµÄEJB¡¡2¡£0¹¦Äܹ淶µÄÍê³É¡¢¡¡
ÒÔ¼°Öмä¼þ³§ÉÌʵÏÖµÄEJBÓ¦ÓóÌÐò·þÎñÆ÷À´¿´£¬MicrosoftËƺõÒ²ÒѾ¿ªÊ¼²ÉÓÃÀàËÆ¡¡
JavaµÄÐéÄâÖ´Ðл·¾³ÒÔ¼°EJBµÄÄ£ÐÍÀ´ÖØÐÂËÜÔìµÄ×é¼þÄ£ÐÍÁË¡££«½«Öð½¥Í