Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ʲôÊÇJMS(JavaÏûÏ¢·þÎñ)

{ת} 
ÔÚ²»Í¬ÏµÍ³Ö®¼ä½»»»ÐÅÏ¢µÄÒ»´óÕÏ°­ÊÇÈçºÎÔÚ¾«È·½»»»ºÍ¸ñʽ»¯Êý¾Ý·½ÃæÈ¡µÃÒ»Ö¡£Java Message Service£¨ JavaÏûÏ¢·þÎñ£¬¼ò³ÆJMS£©Í¨¹ýÌṩһÖÖÓëJ2EEÓ¦ÓóÌÐò»ò´«Í³ÏµÍ³½»»¥µÄ·½·¨²¿·ÖµÄ½â¾öÁËÕâ¸öÎÊÌâ¡£ 
¡¡¡¡JMSµÄͨÓýӿڼ¯ºÏÒÔÒì²½·½Ê½·¢ËÍ»ò½ÓÊÕÏûÏ¢¡£Òì²½·½Ê½½ÓÊÕÏûÏ¢ÏÔÈ»ÊÇʹÓüä¶ÏÍøÂçÁ¬½ÓµÄ¿Í»§»ú£¬ÖîÈçÒƶ¯µç»°ºÍPDAµÄ×îºÃµÄÑ¡Ôñ¡£ÁíÍ⣬ JMS²ÉÓÃÒ»ÖÖ¿íËɽáºÏ·½Ê½ÕûºÏÆóҵϵͳµÄ·½·¨£¬ÆäÖ÷ÒªµÄÄ¿µÄ¾ÍÊÇ´´½¨Äܹ»Ê¹Óÿçƽ̨Êý¾ÝÐÅÏ¢µÄ¡¢¿ÉÒÆÖ²µÄÆóÒµ¼¶Ó¦ÓóÌÐò£¬¶ø°Ñ¿ª·¢ÈËÁ¦½â·Å³öÀ´¡£ 
¡¡¡¡JavaÏûÏ¢·þÎñÖ§³ÖÁ½ÖÖÏûϢģÐÍ£ºPoint-to-PointÏûÏ¢(P2P)ºÍ·¢²¼¶©ÔÄÏûÏ¢£¨Publish Subscribe messaging£¬¼ò³ÆPub/Sub£©¡£JMS¹æ·¶²¢²»ÒªÇó¹©Ó¦ÉÌͬʱ֧³ÖÕâÁ½ÖÖÏûϢģÐÍ£¬µ«¿ª·¢ÕßÓ¦¸ÃÊìϤÕâÁ½ÖÖÏûϢģÐ͵ÄÓÅÊÆÓëȱµã¡£ 
¡¡¡¡P2PÏûϢģÐÍÊÇÔÚµã¶ÔµãÖ®¼ä´«µÝÏûϢʱʹÓá£Èç¹ûÓ¦ÓóÌÐò¿ª·¢ÕßÏ£ÍûÿһÌõÏûÏ¢¶¼Äܹ»±»´¦Àí£¬ÄÇôӦ¸ÃʹÓÃP2PÏûϢģÐÍ¡£ÓëPub/SubÏûϢģÐͲ»Í¬£¬P2PÏûÏ¢×ÜÊÇÄܹ»±»´«Ë͵½Ö¸¶¨µÄλÖᣠ
¡¡¡¡Pub/SubÄ£ÐÍÔÚÒ»µ½¶àµÄÏûÏ¢¹ã²¥Ê±Ê¹Óá£Èç¹ûÒ»¶¨³Ì¶ÈµÄÏûÏ¢´«µÝµÄ²»¿É¿¿ÐÔ¿ÉÒÔ±»½ÓÊܵĻ°£¬ÄÇôӦÓóÌÐò¿ª·¢ÕßÒ²¿ÉÒÔʹÓÃPub/SubÏûϢģÐÍ¡£»»¾ä»°Ëµ£¬ËüÊÊÓÃÓÚËùÓеÄÏûÏ¢Ïû·Ñ³ÌÐò²¢²»ÒªÇóÄܹ»ÊÕµ½ËùÓеÄÐÅÏ¢»òÕßÏûÏ¢Ïû·Ñ³ÌÐò²¢²»Ïë½ÓÊÕµ½ÈκÎÏûÏ¢µÄÇé¿ö¡£ 
¡¡¡¡JMSͨ¹ýÔÊÐí´´½¨³Ö¾Ã¶©ÔÄÀ´¼ò»¯Ê±¼äÏà¹ØÐÔ£¬¼´Ê¹ÏûÏ¢Ô¤¶©Õßδ¼¤»îÒ²¿ÉÒÔ½ÓÊÕµ½ÏûÏ¢¡£´ËÍ⣬ʹÓó־ö©ÔÄ»¹¿Éͨ¹ý¶ÓÁÐÌṩÁé»îÐԺͿɿ¿ÐÔ£¬¶øÈÔÈ»ÔÊÐíÏûÏ¢±»·¢¸øÐí¶àµÄ½ÓÊÕÕß¡£ Topic Subscriber topic Subscriber = topicSession.createDurableSubscriber(topic, subscriptionName); ¡¡¡¡Connection¶ÔÏó±íʾÁ˵½Á½ÖÖÏûϢģÐÍÖеÄÈÎÒ»ÖÖµÄÏûϢϵͳµÄÁ¬½Ó¡£·þÎñÆ÷¶ËºÍ¿Í»§»ú¶Ë¶ÔÏóÒªÇó¹ÜÀí´´½¨µÄJMSÁ¬½ÓµÄ״̬¡£Á¬½ÓÊÇÓÉConnection Factory´´½¨µÄ²¢ÇÒͨ¹ýJNDI²éÑ°¶¨Î»¡£ //È¡µÃÓÃÓÚ P2PµÄ QueueConnectionFactory QueueConnectionFactory = queueConnectionFactory( ); Context messaging = new InitialContext( ); QueueConnectionFactory = (QueueConnectionFactory) Messaging.lookup(“QueueConnectionFactory”); //È¡µÃÓÃÓÚ pub/subµÄ TopicConnectionFactory TopicConnectonFactory topicConnectionFactory; Context messaging = new InitialContext(); topicConnectionFactory = (TopicConnectionFactory) messaging.


Ïà¹ØÎĵµ£º

Java¸ßÊÖËÙ³É ¶ªÊ§µÄ¼ÇÒä

          Java±à³Ì£¬Äܹ»¸ßÊÖËÙ³ÉÂð£¿ÎÒ¾õµÄÊÇ¿ÉÒԵġ£JavaµÄ֪ʶµã±È½Ï¶à£¬»òÕß˵£¬·Ç³£¶à£»µ«×ÐϸÊáÀíÒ»±é£¬ÎÒÃǻᷢÏÖһЩ¹æÂÉ¡£Í¨¹ýÕâЩ¹æÂÉ¿ÉÒÔ·ÖÎö£¬ÄÄЩJava֪ʶÊÇÐèÒªÉîÈëÍÚ¾òµÄ£¬ÄÄЩÊÇ¿ÉÒÔdz³¢éüÖ¹µÄ¡£
       ¡¶Java±à³Ì˼Ïë¡·£¬ ......

java¿½±´¶ÔÏó

ÕâÊÇÎÒ¸öÈ˵ÄÀí½â£¬¼ÓÉÏÒÔÇ°¿´µÄһЩÌû×Ó£¬Óв»¶ÔµÄµØ·½£¬Çë¸ßÈËÖ¸µã¡£
1.×÷Ϊjava²ÎÊý´«µÝ¸øÒ»¸öº¯ÊýµÄ¶ÔÏ󣬳ýÁ˺ܼòµ¥µÄÈçint»òÕßbooleanµÈ¼òµ¥µÄÒÔÍ⣬´«µÝµÄ¶¼ÊÇÕâ¸ö¶ÔÏóµÄÒýÓá£
µ±ÔÚ½ÓÊÕº¯ÊýÖиıäÕâ¸ö¶ÔÏóµÄʱºò£¬Ô­À´µÄ¶ÔÏó¼´±»¸Ä±ä¡£
2.ÔÚ³õʼ»¯Ò»¸ö¶ÔÏóµÄʱºò£¬ÓÐʱºòÎÒÃÇÏ£ÍûÓÃÒ»¸öÒѾ­´æÔڵĶÔÏóÀ´¸øÁíÍâÒ» ......

Ïêϸ½âÎöJavaÖгéÏóÀàºÍ½Ó¿ÚµÄÇø±ð

2007-09-28 12:17×÷Õߣºdoublel³ö´¦£ºÂÛ̳ÕûÀíÔðÈα༭£º·½ÖÛ
¡¡¡¡ÔÚJavaÓïÑÔÖУ¬ abstract class ºÍinterface ÊÇÖ§³Ö³éÏóÀඨÒåµÄÁ½ÖÖ»úÖÆ¡£ÕýÊÇÓÉÓÚÕâÁ½ÖÖ»úÖƵĴæÔÚ£¬²Å¸³ÓèÁËJavaÇ¿´óµÄ ÃæÏò¶ÔÏóÄÜÁ¦¡£abstract classºÍinterfaceÖ®¼äÔÚ¶ÔÓÚ³éÏóÀඨÒåµÄÖ§³Ö·½Ãæ¾ßÓкܴóµÄÏàËÆÐÔ£¬ÉõÖÁ¿ÉÒÔÏ໥Ìæ»»£¬Òò´ËºÜ¶à¿ª·¢ÕßÔÚ½ ......

Java Àà×°ÔØÆ÷

 ¹þ¹þ,½ñÌìûÊÂ×ö,µ«ÐÄÇé²»´í,ËùÒÔдÕâƪÎÄÕÂ.
     Àà×°ÔØÆ÷ÊÇJava³ÌÐòÔËÐÐʱ²»¿ÉȱÉÙµÄÒ»²¿·Ö,ËüµÄÈÎÎñÊÇ°ÑÓÉJavaÔ´³ÌÐò±àÒë³ÉµÄclassÎļþ¶ÁÈëµ½ÄÚ´æÖÐ,È·ÇеÄ˵ÊÇ×°Èëµ½JVMµÄÄÚ´æÖÐ,ӦΪJVMÊÇһ̨³éÏóµÄ¼ÆËã»ú,ËüÓÐ×Å×Ô¼ºµÄCPU,ÄÚ´æµÈ. ÔÚclassÎļþÖаüº¬ÁËÒ»¸öÀàµÄ¸÷ÖÖÐÅÏ¢,µ±Ö´ÐÐjava XXXÃü ......

javaºÍj2eeÔËÐл·¾³´î½¨ ÃæÏò³õѧÕß

±¾ÎÄÖ÷ÒªÊÇΪ¿ªÔ´ÏîÄ¿simplejee
дµÄ£¬µ«»ù±¾»¹ÊÇͨÓõġ£
¿ª·¢java³ÌÐò×îµÍµÄÒªÇóÊÇÓÐjdkºÍÎı¾±à¼­Æ÷¡£²»¹ý¶àÊýÀ´ËµÎÒÃǶ¼»áʹÓÃһЩ¸¨ÖúµÄÎı¾±à¼­Æ÷(editplus,UltraEdit)ÉõÖÁ
¼¯³É¿ª·¢»·¾³£¨IDE£©£¬Èçeclipse£¬IntelliJ
IDEAµÈ£¬ÎÒÃÇ·ÅÔÚ´úÂë¿âÀïµÄ´úÂ벢ûÓÐÏÞ¶¨¿ª·¢¹¤¾ß£¬Ò²Ã»Óн«ºÍ¿ª·¢¹¤¾ßÏà¹ØµÄÅäÖÃÎļþÌá½»µ½ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ