¿ìËÙÒµÎñͨµÀ

JavaÔËÐÐʱ¼à¿Ø£¬µÚ1²¿·Ö: JavaϵͳÔËÐÐʱÐÔÄܺͿÉÓÃÐÔ¼à¿Ø - ±à³ÌÈëÃÅÍø

×÷Õß ØýÃû¼¼Êõ À´Ô´ NET±à³Ì ä¯ÀÀ ·¢²¼Ê±¼ä 2012-06-19
¼à¿Ø¼Æ»®ÖеĹؼü»·½Ú¡£ÓÉÓÚ JMX ³éÏó²ã£¬¸ÃÁ÷³ÌÓë֮ǰ½éÉܵÄÀàËÆ¡£

ÏÂÃæÊÇÀ´×Ô JBoss 4.2 Ó¦Ó÷þÎñÆ÷ʵÀýµÄµäÐÍÊý¾ÝÔ´Ö¸±ê£º

¿ÉÓÃÁ¬½ÓÊý£ºµ±Ç°³ØÖпÉÓÃÁ¬½ÓµÄÊýÁ¿¡£

Á¬½ÓÊý£ºÁ¬½Ó³ØÓëÊý¾Ý¿â½¨Á¢µÄʵ¼ÊÎïÀíÁ¬½ÓµÄÊýÁ¿¡£

×î´óʹÓÃÁ¬½ÓÊý£º³ØÖÐÕýÔÚʹÓõÄÁ¬½ÓµÄÉÏÏÞ±ê¼Ç¡£

ÕýÔÚʹÓõÄÁ¬½ÓÊý£ºµ±Ç°ÕýÔÚʹÓõÄÁ¬½ÓÊýÁ¿¡£

ÒÑ´´½¨µÄÁ¬½ÓÊý£ºÎª¸Ã³Ø´´½¨µÄÁ¬½Ó×ÜÊý¡£

ÒѲ¿ÊðµÄÁ¬½ÓÊý£ºÎª¸Ã³Ø²¿ÊðµÄÁ¬½Ó×ÜÊý¡£

JavaÔËÐÐʱ¼à¿Ø£¬µÚ1²¿·Ö: JavaϵͳÔËÐÐʱÐÔÄܺͿÉÓÃÐÔ¼à¿Ø(10)

ʱ¼ä:2011-02-13 IBM Nicholas Whitehead

ÏÖÔÚ£¬ÊÕ¼¯Æ÷½«Ê¹ÓÃÅúÊôÐÔ¼ìË÷£¬²¢ÔÚÒ»¸öµ÷ÓÃÖлñÈ¡ËùÓÐÊôÐÔ¡£Î©Ò»ÐèҪעÒâµÄÊÇ£¬ÄúÐèÒª²éѯ·µ»ØµÄÊý¾Ý£¬ÒÔ½Óͨ²»Í¬µÄÊý¾ÝºÍ¸ú×Ù³ÌÐòÀàÐÍ¡£DataSource Ö¸±êÔÚûÓлʱҲÊDz»»á±ä»¯µÄ£¬Òò´Ë£¬ÒªÊ¹ÊýÖµ±ä»¯£¬ÄúÐèÒªÉú³ÉһЩ¸ºÔØ¡£Çåµ¥ 4 ÏÔʾ DataSource ÊÕ¼¯Æ÷µÄ collect() ·½·¨£º

Çåµ¥ 4. DataSource ÊÕ¼¯Æ÷

public void collect() { ¡¡ try { ¡¡¡¡¡¡log("Starting DataSource Collection"); ¡¡¡¡¡¡long start = System.currentTimeMillis(); ¡¡¡¡¡¡ObjectName on = objectNameCache.get("DS_OBJ_NAME"); ¡¡¡¡¡¡AttributeList attributes¡¡= jmxServer.getAttributes(on, new String[]{ ¡¡¡¡¡¡¡¡¡¡¡¡"AvailableConnectionCount", ¡¡¡¡¡¡¡¡¡¡¡¡"MaxConnectionsInUseCount", ¡¡¡¡¡¡¡¡¡¡¡¡"InUseConnectionCount", ¡¡¡¡¡¡¡¡¡¡¡¡"ConnectionCount", ¡¡¡¡¡¡¡¡¡¡¡¡"ConnectionCreatedCount", ¡¡¡¡¡¡¡¡¡¡¡¡"ConnectionDestroyedCount" ¡¡¡¡¡¡}); ¡¡¡¡¡¡for(Attribute attribute: (List<Attribute>)attributes) { ¡¡¡¡¡¡¡¡ if(attribute.getName().equals("ConnectionCreatedCount") ¡¡¡¡¡¡¡¡¡¡¡¡|| attribute.getName().equals("ConnectionDestroyedCount")) { ¡¡¡¡¡¡¡¡¡¡¡¡¡¡ tracer.traceDeltaSticky((Integer)attribute.getValue(), hostName, ¡¡¡¡¡¡¡¡¡¡¡¡¡¡ "DataSource", on.getKeyProperty("name"), attribute.getName()); ¡¡¡¡¡¡¡¡ } else { ¡¡¡¡¡¡¡¡¡¡¡¡if(attribute.getValue() instanceof Long) { ¡¡¡¡¡¡¡¡¡¡¡¡¡¡ tracer.traceSticky((Long)attribute.getValue(), hostName, "DataSource", ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡on.getKeyProperty("name"), attribute.getName()); ¡¡¡¡¡¡¡¡¡¡¡¡} else { ¡¡¡¡¡¡¡¡¡¡¡¡¡¡ tracer.traceSticky((Integer)attribute.getValue(), hostName, ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡"DataSource",on.getKeyProperty("name"), attribute.getName()); ¡¡¡¡¡¡¡¡¡¡¡¡} ¡¡¡¡¡¡¡¡ } ¡¡¡¡¡¡} ¡¡¡¡¡¡// Done ¡¡¡¡¡¡long elapsed = System.currentTimeMillis()-start; ¡¡¡¡¡¡tracer.trace(elapsed, hostName, "DataSource", "DataSource Collector", ¡¡¡¡¡¡¡¡ "Collection", "Last Elapsed Time"); ¡¡¡¡¡¡tracer.trace(new Date(), hostName, "DataSource", "DataSource Collector", ¡¡¡¡¡¡¡¡ "Collection", "Last Collection"); ¡¡¡¡¡¡log("Completed DataSource Collection in ", elapsed, " ms."); ¡¡ } catch (Exception e) { ¡¡¡¡¡¡log("Failed:" + e); ¡¡¡¡¡¡tracer.traceIncident(hostName, "DataSource", "DataSource Collector", ¡¡¡¡¡¡¡¡ "Collection", "Collection Errors"); ¡¡ } }

ͼ 8 ÏÔʾÁË DataSource ÊÕ¼¯Æ÷µÄÏàÓ¦Ö¸±êÊ÷£º

ͼ 8. DataSource ÊÕ¼¯Æ÷

ÁèÖڿƼ¼×¨ÒµÌṩ·þÎñÆ÷×âÓᢷþÎñÆ÷Íйܡ¢ÆóÒµÓʾ֡¢ÐéÄâÖ÷»úµÈ·þÎñ£¬¹«Ë¾ÍøÕ¾£ºhttp://www.lingzhong.cn ΪÁ˸ø¹ã´ó¿Í»§Á˽â¸ü¶àµÄ¼¼ÊõÐÅÏ¢£¬±¾¼¼ÊõÎÄÕÂÊÕ¼¯À´Ô´ÓÚÍøÂç,ÁèÖڿƼ¼×ðÖØÎÄÕÂ×÷ÕߵİæȨ£¬Èç¹ûÓÐÉæ¼°ÄãµÄ°æȨÓбØҪɾ³ýÄãµÄÎÄÕ£¬ÇëºÍÎÒÃÇÁªÏµ¡£ÒÔÉÏÐÅÏ¢ÓëÎÄÕÂÕýÎÄÊDz»¿É·Ö¸îµÄÒ»²¿·Ö,Èç¹ûÄúҪתÔر¾ÎÄÕÂ,Çë±£ÁôÒÔÉÏÐÅÏ¢£¬Ð»Ð»!

·ÖÏíµ½£º ¸ü¶à
HTTP/1.1 401 Access Denied ëÃÅÍø
  • Photoshop»æÖƸ߹âË®¾§ÖʸÐË®¾§Æ»¹û
  • Copyright ©1999-2011 ÏÃÃÅÁèÖڿƼ¼ÓÐÏÞ¹«Ë¾ ÏÃÃÅÓÅͨ»¥Áª¿Æ¼¼¿ª·¢ÓÐÏÞ¹«Ë¾ All rights reserved

    µØÖ·(ADD)£ºÏÃÃÅÈí¼þÔ°¶þÆÚÍûº£Â·63ºÅ701E£¨¶«ÄÏÈÚͨÅÔ£© Óʱà(ZIP)£º361008

    µç»°£º0592-5908028 ´«Õ棺0592-5908039 ×ÉѯÐÅÏ䣺web@lingzhong.cn ×ÉѯOICQ£º173723134

    ¡¶ÖлªÈËÃñ¹²ºÍ¹úÔöÖµµçÐÅÒµÎñ¾­ÓªÐí¿ÉÖ¤¡·ÃöB2-20100024  ICP±¸°¸:ÃöICP±¸05037997ºÅ