| MQSeries :: ´ë±â¿ MQSeries :: Queue´Â MQSeries ´ë±â¿ °´Ã¼¿¡ ´ëÇÑ OO ÀÎÅÍÆäÀ̽ºÀÔ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
MQSeries :: ´ë±â¿ ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À̸§:
- Morgan Stanley, Dean Witter and Co.
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~hbiersma/MQSeries-1.25/MQSeries/Queue.pm
MQSeries :: ´ë±â¿ ű×
MQSeries :: ´ë±â¿ ¼³¸í
MQSeries :: Queue´Â MQSeries ´ë±â¿ °´Ã¼¿¡ ´ëÇÑ OO ÀÎÅÍÆäÀ̽ºÀÔ´Ï´Ù. MQSeries :: Queue´Â MQSeries ´ë±â¿ objects.Synopsis¿¡ ´ëÇÑ OO ÀÎÅÍÆäÀ̽ºÀÔ´Ï´Ù. MQSeries¸¦ »ç¿ëÇÕ´Ï´Ù. MQSeries :: Queue »ç¿ë; MQSeries :: Message; # # Ãâ·ÂÀ»À§ÇÑ ´ë±â¿À» ¿±´Ï ´Ù, ¸Þ½ÃÁö¸¦¹Þ´Â ·çÇÁ, µ¥ÀÌÅÍ µ¥ÀÌÅͺ£À̽º¸¦ ¾÷µ¥ÀÌÆ®ÇÕ´Ï´Ù. # ³» $ queue = mqseries :: queue-> new (queueManager => some.queue.manager ', queue =>'some.queue ', mode =>'input_exclusive ',) ¶Ç´Â die ( "´ë±â¿À» ¿ ¼ö ¾ø½À´Ï´Ù. N"); (1) {MY $ GETMESSAGE = MQSeries :: Message-> New; $ queue-> get (message => $ getMessage, sync => 1,) ¶Ç´Â die ( "messagenÀ» °¡Á®¿Ã ¼ö ¾ø½À´Ï´Ù". "compcode =". $ queue-> compcode () "."ÀÌÀ¯ = ". $ ´ë±â¿ -> ÀÌÀ¯ (). "n"); if (UpdateSomedatabase ($ getMessage-> data ()) {$ queue-> queueManager () -> commit () ¶Ç´Â die ( "queue.n¿¡ ´ëÇÑ º¯°æ »çÇ×À» Ä¿¹Ô ÇÒ ¼ö ¾ø½À´Ï´Ù". "compcode =". $ queue-> compcode (). "n". "ÀÌÀ¯ =". $ ´ë±â¿ -> ÀÌÀ¯ (). "n"); } else {$ queue-> queuemanager () -> backout () ¶Ç´Â die ( "queue.n¿¡ ´ëÇÑ º¯°æ »çÇ×À» Ãë¼Ò ÇÒ ¼ö ¾ø½À´Ï´Ù". "compcode =". $ queue-> compcode () "."ÀÌÀ¯ = " . $ Å¥ -> ÀÌÀ¯ () "n"); }} # # ¸Þ½ÃÁö µ¥ÀÌÅÍ·Î # ÂüÁ¶¸¦ »ç¿ëÇÒ ¼ö ÀÖµµ·Ï ÀúÀå °¡´ÉÇÑ »ç¿ë °¡´ÉÇÑ ¸Þ½ÃÁö¸¦ ´ë±â¿¿¡ ³ÖÀ¸½Ê½Ã¿À. (Âü°í : # mqseries :: Message :: Storeable Ŭ·¡½º¸¦ »ç¿ëÇϸéÀÌ ÀÛ¾÷ÀÌ ¼öÇàµË´Ï´Ù.) # ÀúÀå °¡´ÉÇÑ »ç¿ë °¡´É; $ queue = mqseries :: queue-> new (queueManager => some.queue.manager ', queue =>'maint.queue ', mode =>'Ãâ·Â ', putConvert => ÀúÀå °¡´É :: nfreeze, getConvert => ÀúÀå °¡´ÉÇÑ :: Çص¿,) ¶Ç´Â Á×À» ( "queue.nÀ» ¿ ¼ö ¾øÀ½"); MY $ PUTMESSAGE = MQSeries :: Message-> New (data => {a => , e => {f => "Huh?", g => "wow!",}, h = > 42,},); $ ´ë±â¿ -> put (message => $ putmessage) ¶Ç´Â die ( "queue.n¿¡ ¸Þ½ÃÁö¸¦ ³ÖÀ» ¼ö ¾ø½À´Ï´Ù". "compcode =". $ queue-> compcode (). "n". "$ queue". -> ÀÌÀ¯ (). "n"); # # º¯È¯ ·çƾÀ» ÁöÁ¤ÇÏ´Â ´ëü ¸ÞÄ¿´ÏÁò. # MY $ QUEUE = MQSeries :: Queue-> New (QueueManager => Some.Queue.Manager ', Queue =>'ÀϺΠ", Mode => 'Ãâ·Â'¶Ç´Â ´ÙÀÌ ("´ë±â¿À» ¿ ¼ö ¾ø½À´Ï´Ù. N"); MY $ PUTMESSAGE = MQSeries :: Message-> New (data => {a => , e => {f => "Huh?", g => "wow!",}, h = > 42,},); $ queue-> put (message => $ putmessage putConvert => ÀúÀå °¡´É :: ¸ØÃã) ¶Ç´Â ´ÙÀÌ ( "queue.n¿¡ ¸Þ½ÃÁö¸¦ ³ÖÀ» ¼ö ¾ø½À´Ï´Ù". "compcode =". $ queue-> compcode () " . "ÀÌÀ¯ =". $ ´ë±â¿ -> ÀÌÀ¯ (). "n"); ¿ä±¸ »çÇ× : ¡¤ Perl.
MQSeries :: ´ë±â¿ °ü·Ã ¼ÒÇÁÆ®¿þ¾î