|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀüÀÇ ÆÐŰÁö ´ÙÀ½ÀÇ ÆÐŰÁö | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ |
ÂüÁ¶Ã³:
¼³¸í
ÀÎÅÍÆäÀ̽º °³¿ä | |
---|---|
Descriptor | ÀÌ ÀÎÅÍÆäÀ̽º´Â JMX ¿ä¼ÒÀÇ µ¿ÀÛÀÇ ¸ÞŸµ¥ÀÌŸ¼ÂÆ®¸¦ ³ªÅ¸³À´Ï´Ù. |
DescriptorAccess | ÀÌ ÀÎÅÍÆäÀ̽º´Â JMX ÄÄÆÛ³ÍÆ®¿¡ °ü·ÃµÈ Descriptor Ŭ·¡½ºÀÇ ±â¼úÀÚ (MBean, MBeanInfo, MBeanAttributeInfo, MBeanNotificationInfo, MBeanOperationInfo, MBeanParameterInfo)¿¡°Ô ¾×¼¼½º ÇÏ´Â ¸ñÀûÀ¸·Î »ç¿ëµË´Ï´Ù. |
DynamicMBean | Dynamic MBean (µ¿Àû °ü¸® ÀÎÅÍÆäÀ̽º¸¦ °ø°³ÇÏ´Â MBean)¿¡ ±¸ÇöÇÏ´Â ¸Þ¼µå¸¦ Á¤ÀÇÇÕ´Ï´Ù. |
MBeanRegistration | MBean ¼¹ö¿¡ÀÇ µî·Ï ¶Ç´Â MBean ¼¹ö·ÎºÎÅÍÀÇ µî·Ï ÇØÁ¦ÀÇ ÀüÈÄ¿¡ ´Ù¾çÇÑ ¿ÀÆÛ·¹À̼ÇÀ» ½ÇÇàÇϱâ À§ÇØ, MBean¿¡ ÀÇÇØ ±¸ÇöµË´Ï´Ù. |
MBeanServer | ¿¡ÀÌÀüÆ®Ãø¿¡¼ MBean¸¦ Á¶ÀÛÇϱâ À§ÇÑ ÀÎÅÍÆäÀ̽ºÀÔ´Ï´Ù. |
MBeanServerConnection | ÀÌ ÀÎÅÍÆäÀ̽º´Â MBean ¼¹ö (·ÎÄà ¶Ç´Â ¸®¸ðÆ®)¿ÍÀÇ Åë½Å ¹æ¹ýÀ» ³ªÅ¸³À´Ï´Ù. |
MBeanServerDelegateMBean | MBeanServerDelegate Ŭ·¡½ºÀÇ °´Ã¼ÀÇ °ü¸® ÀÎÅÍÆäÀ̽º¸¦ Á¤ÀÇÇÕ´Ï´Ù. |
NotificationBroadcaster | Notification¸¦ ¹ßÇàÇÏ´Â MBean°¡ ±¸ÇöÇϰí ÀÖ´Â ÀÎÅÍÆäÀ̽º. |
NotificationEmitter | Notification¸¦ ¹ßÇàÇÏ´Â MBean°¡ ±¸ÇöÇϰí ÀÖ´Â ÀÎÅÍÆäÀ̽º. |
NotificationFilter | ÅëÁö ÇÊÅͷμ ±â´ÉÇÏ´Â ¸ðµç Ŭ·¡½º¿¡ ÀÇÇØ ±¸ÇöµË´Ï´Ù. |
NotificationListener | ÅëÁöÀÇ ¼ö½ÅÀ» Èñ¸ÁÇÏ´Â °´Ã¼¿¡ ÀÇÇØ ±¸ÇöµÉ Çʿ䰡 ÀÖ½À´Ï´Ù. |
PersistentMBean | ÀÌ Å¬·¡½º´Â MBean¿¡ ÀÇÇØ ±¸ÇöµÇ´Â ÀÎÅÍÆäÀ̽º (Áö¼Ó ÀÎÅÍÆäÀ̽º)ÀÔ´Ï´Ù. |
QueryExp | µ¥ÀÌŸº£À̽º Äõ¸® ¡¸where clauses¡¹³»¿¡¼ »ç¿ë °¡´ÉÇÑ °ü°è Á¦¾àÀ» ³ªÅ¸³À´Ï´Ù. |
ValueExp | °ü°è½ÄÀÇ Àμö·Î¼ °Ç³×ÁÙ ¼ö ÀÖ´Â °ªÀ» ³ªÅ¸³À´Ï´Ù. |
Ŭ·¡½º °³¿ä | |
---|---|
Attribute | À̸§°ú °ªÀ» °ü·ÃÁþ´Â °ÍÀ¸·Î MBean ¼Ó¼ºÀ» Ç¥ÇöÇÕ´Ï´Ù. |
AttributeChangeNotification | MBean¿¡ ÀÇÇØ ¼Û½ÅµÇ´Â ¼Ó¼º º¯°æ ÅëÁö¸¦ Á¤ÀÇÇÕ´Ï´Ù. |
AttributeChangeNotificationFilter | ÀÌ Å¬·¡½º´Â ¼Ó¼º º¯°æ ÅëÁö NotificationFilter ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇÕ´Ï´Ù. |
AttributeList | MBean ¼Ó¼ºÀÇ °ªÀÇ ¸®½ºÆ®¸¦ ³ªÅ¸³À´Ï´Ù. |
AttributeValueExp | °ü°è Á¦¾àÀÇ Àμö·Î¼ »ç¿ëµÇ´Â ¼Ó¼ºÀ» ³ªÅ¸³À´Ï´Ù. |
DefaultLoaderRepository | ÃßõÇÏÁö ¾Ê½À´Ï´Ù. ´ë½Å¿¡ MBeanServer.getClassLoaderRepository() ¸¦
»ç¿ëÇØ ÁÖ¼¼¿ä. |
MBeanAttributeInfo | °ü¸®¿ëÀ¸·Î¼ °ø°³µÇ´Â MBean ¼Ó¼ºÀ» ±â¼úÇÕ´Ï´Ù. |
MBeanConstructorInfo | MBean¿¡ ÀÇÇØ °ø°³µÇ´Â »ý¼ºÀÚ¸¦ ±â¼úÇÕ´Ï´Ù. |
MBeanFeatureInfo | MBean ±â¼ú °´Ã¼¿¡ ÀÏ¹Ý Á¤º¸¸¦ Á¦°øÇÕ´Ï´Ù. |
MBeanInfo | MBean¿¡ ÀÇÇØ °ø°³µÈ °ü¸® ÀÎÅÍÆäÀ̽º (°ü¸® ¿ÀÆÛ·¹À̼ǿ¡ »ç¿ëÇÒ ¼ö ÀÖ´Â ¼Ó¼º°ú Á¶ÀÛ¼¼Æ®)¸¦ ±â¼úÇÕ´Ï´Ù. |
MBeanNotificationInfo | MBeanNotificationInfo Ŭ·¡½º´Â MBean¿¡ ÀÇÇØ ¹ßÇàµÈ, ÁöÁ¤ÀÇ ÅëÁö Java Ŭ·¡½º¿¡ ´ëÇÑ º¹¼ö°¡ ´Ù¸¥ ÅëÁö ÀνºÅϽºÀÇ Æ¯¼ºÀ» ±â¼úÇÕ´Ï´Ù. |
MBeanOperationInfo | MBean¿¡ ÀÇÇØ °ø°³µÇ´Â °ü¸® ¿ÀÆÛ·¹À̼ÇÀ» ±â¼úÇÕ´Ï´Ù. |
MBeanParameterInfo | MBean¿¡ ÀÇÇØ °ø°³µÇ´Â ¿ÀÆÛ·¹À̼ÇÀÇ Àμö¸¦ ±â¼úÇÕ´Ï´Ù. |
MBeanPermission | MBeanServer ¿ÀÆÛ·¹À̼ÇÀÇ ¾×¼¼½º¸¦ Á¦¾îÇÏ´Â Á¢±Ù ±ÇÇÑÀÔ´Ï´Ù. |
MBeanServerBuilder | ÀÌ Å¬·¡½º´Â µðÆúÆ® MBeanServer ±¸ÇöÀ» ÀÛ¼ºÇÏ´Â ºô´õ¸¦ ³ªÅ¸³À´Ï´Ù. |
MBeanServerDelegate | °ü¸®ÀÇ ½ÃÁ¡¿¡¼ MBean ¼¹ö¸¦ Ç¥ÇöÇÕ´Ï´Ù. |
MBeanServerFactory | MBean ¼¹ö ÂüÁ¶¸¦ Á¦°øÇÕ´Ï´Ù. |
MBeanServerInvocationHandler | MBean
°ü¸® ÀÎÅÍÆäÀ̽º³»¿¡¼
MBean ¼¹ö·ÎºÎÅÍ MBean¿¡ ¸Þ¼µå¸¦ °Ç³×ÁÖ´Â InvocationHandler ÀÔ´Ï´Ù. |
MBeanServerNotification | MBean ¼¹ö¿¡ÀÇÇØ MBeanServerDelegate MBean ·ÎºÎÅÍ ¹ßÇàµÇ´Â ÅëÁö¸¦ ³ªÅ¸³À´Ï´Ù. |
MBeanServerPermission | MBeanServer °ü·ÃÀÇ ¾×¼ÇÀ» ½ÇÇàÇϱâ À§ÇÑ Á¢±Ù ±ÇÇÑ. |
MBeanTrustPermission | ÀÌ Á¢±Ù ±ÇÇÑÀº ¼¸íÀÚ ¶Ç´Â ÄÚµå º£À̽ºÀÇ ¡¸trust¡¹¸¦ ³ªÅ¸³À´Ï´Ù. |
Notification | Notification Ŭ·¡½º´Â MBean°¡ ¹ßÇàÇÏ´Â ÅëÁö¸¦ ³ªÅ¸³À´Ï´Ù. |
NotificationBroadcasterSupport | NotificationEmitter ÀÎÅÍÆäÀ̽ºÀÇ ±¸ÇöÀ» Á¦°øÇÕ´Ï´Ù. |
NotificationFilterSupport | NotificationFilter ÀÎÅÍÆäÀ̽ºÀÇ ±¸ÇöÀ» Á¦°øÇÕ´Ï´Ù. |
ObjectInstance | MBean °´Ã¼¸í°ú Ŭ·¡½º¸íÀ» ³ªÅ¸³À´Ï´Ù. |
ObjectName | MBean °´Ã¼¸í, ¶Ç´Â º¹¼öÀÇ MBean ¸í¿¡ ÀÏÄ¡ÇÏ´Â ÆÐÅÏÀ» ³ªÅ¸³À´Ï´Ù. |
Query | Äõ¸®°´Ã¼ Á¦¾àÀ» ±¸ÃàÇÕ´Ï´Ù. |
QueryEval | ƯÁ¤ÀÇ MBean ¼¹öÀÇ ÄÁÅØ½ºÆ® À¸·Î Äõ¸®¸¦ ½ÇÇàÇÕ´Ï´Ù. |
StandardMBean | Java ÀÎÅÍÆäÀ̽ºÀÇ ¸®Ç÷º¼Ç¿¡ ÀÇÇØ °ü¸® ÀÎÅÍÆäÀ̽º¸¦ °áÁ¤ÇÏ´Â MBean ÀÔ´Ï´Ù. |
StringValueExp | °ü°è Á¦¾àÀÇ Àμö°¡ µÇ´Â ij¸¯ÅÍ ¶óÀÎÀ» ³ªÅ¸³À´Ï´Ù. |
¿¹¿Ü °³¿ä | |
---|---|
AttributeNotFoundException | ÁöÁ¤µÈ ¼Ó¼ºÀÌ Á¸ÀçÇÏÁö ¾Ê´ÂÁö, ÃëµæÇÒ ¼ö ¾ø½À´Ï´Ù. |
BadAttributeValueExpException | Äõ¸®¸¦ ÀÛ¼ºÇÏ´Â ¸Þ¼µå¿¡ ¹«È¿ÀÎ MBean ¼Ó¼ºÀÌ °Ç³×¹Þ¾ÒÀ» °æ¿ì¿¡ ¿¹¿Ü¸¦ ¹ß»ý½Ãŵ´Ï´Ù. |
BadBinaryOpValueExpException | Äõ¸®¸¦ ÀÛ¼ºÇÏ´Â ¸Þ¼µå¿¡ ¹«È¿ÀÎ ½ÄÀÌ °Ç³×¹Þ¾ÒÀ» °æ¿ì¿¡ ¿¹¿Ü¸¦ ¹ß»ý½Ãŵ´Ï´Ù. |
BadStringOperationException | Äõ¸®¸¦ ÀÛ¼ºÇÏ´Â ¸Þ¼µå¿¡ ¹«È¿ÀΠij¸¯ÅÍ ¶óÀÎ ¿ÀÆÛ·¹À̼ÇÀÌ °Ç³×¹Þ¾ÒÀ» °æ¿ì¿¡ ¿¹¿Ü¸¦ ¹ß»ý½Ãŵ´Ï´Ù. |
InstanceAlreadyExistsException | MBean´Â ÀÌ¹Ì ·¹Æ÷ÁöÆ®¸®¿¡ µî·ÏµÇ¾î ÀÖ½À´Ï´Ù. |
InstanceNotFoundException | ÁöÁ¤µÈ MBean°¡ ¸®Æ÷ÁöÅ͸®(repository)³»¿¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù. |
IntrospectionException | MBean ÀÎÆ®·Î½ºÆäÅ©¼ÇÀÇ ½ÇÇà½Ã¿¡ ¹ß»ýÇÑ ¿¹¿ÜÀÔ´Ï´Ù. |
InvalidApplicationException | MBean ¼ºê Äõ¸®ÀÇ ½Ä ¶Ç´Â MBean ¼ö½Ä ¼Ó¼ºÀÇ ½ÄÀÇ Å¬·¡½º°¡ À߸øµÇ¾î ÀÖ´Â °æ¿ì¿¡ ¿¹¿Ü¸¦ ¹ß»ý½Ãŵ´Ï´Ù. |
InvalidAttributeValueException | ÁöÁ¤µÈ °ªÀº ¼Ó¼º¿¡ ´ëÇÑ À¯È¿ÇÑ °ªÀÌ ¾Æ´Õ´Ï´Ù. |
JMException | JMX ±¸ÇöÀ¸·ÎºÎÅÍ ¹ß»ýµÇ´Â ¿¹¿ÜÀÔ´Ï´Ù. |
JMRuntimeException | JMX ±¸ÇöÀ¸·ÎºÎÅÍ ¸®ÅÏµÈ ½ÇÇà½Ã ¿¹¿ÜÀÔ´Ï´Ù. |
ListenerNotFoundException | ÁöÁ¤µÈ MBean ¸®½º³Ê°¡ ¸®Æ÷ÁöÅ͸®(repository)³»¿¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù. |
MalformedObjectNameException | ij¸¯ÅÍ ¶óÀÎÀÇ Çü½ÄÀÌ À¯È¿ÇÑ ObjectName¿¡ ´ëÀÀÇϰí ÀÖ½À´Ï´Ù. |
MBeanException | ¿¡ÀÌÀüÆ®³»ÀÇ MBean ¸Þ¼µå¿¡ ÀÇÇØ ¹ß»ýµÇ´Â »ç¿ëÀÚ Á¤ÀÇÀÇ ¿¹¿Ü¸¦ ³ªÅ¸³À´Ï´Ù. |
MBeanRegistrationException | MBeanRegistration ÀÎÅÍÆäÀ̽ºÀÇ preRegister() ¸Þ¼µå¿Í preDeregister() ¸Þ¼µå¿¡ ÀÇÇØ ¹ß»ýµÇ´Â ¿¹¿Ü¸¦ ·¦ ÇÕ´Ï´Ù. |
NotCompliantMBeanException | MBean ¼¹ö¿¡ JMX ÁذÅÀÇ MBean°¡ ¾Æ´Ñ °´Ã¼¸¦ µî·ÏÇÏ·Á°í ÇßÀ» °æ¿ì¿¡ ¹ßÇàµÇ´Â ¿¹¿ÜÀÔ´Ï´Ù. |
OperationsException | MBean ¿ÀÆÛ·¹À̼ÇÀÇ ½ÇÇà½Ã¿¡ MBean ¼¹ö³»¿¡¼ ¹ß»ýµÇ´Â ¿¹¿Ü¸¦ ³ªÅ¸³À´Ï´Ù. |
ReflectionException | java.lang.reflect Ŭ·¡½º¸¦ »ç¿ëÇØ MBean »óÀÇ ¸Þ¼µå¸¦ È£ÃâÇÒ ¶§, MBean ¼¹ö³»¿¡¼ ¹ß»ýµÇ´Â ¿¹¿Ü¸¦ ³ªÅ¸³À´Ï´Ù. |
RuntimeErrorException | ¿¡ÀÌÀüÆ®³»¿¡¼ java.lang.Error °¡ ¹ß»ýÇßÀ» °æ¿ì, ijġ ÇØ, RuntimeErrorException À¸·Î¼ ÀçThrow ÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. |
RuntimeMBeanException | ¿¡ÀÌÀüÆ®³»ÀÇ MBean ¸Þ¼µå¿¡ ÀÇÇØ ¹ß»ýµÇ´Â ½ÇÇà½Ã ¿¹¿Ü¸¦ ³ªÅ¸³À´Ï´Ù. |
RuntimeOperationsException | MBean ·Î ¿ÀÆÛ·¹À̼ÇÀÇ ½ÇÇà½Ã¿¡ ¿¡ÀÌÀüÆ®³»¿¡¼ ¹ß»ýµÇ´Â ½ÇÇà½Ã ¿¹¿Ü¸¦ ³ªÅ¸³À´Ï´Ù. |
ServiceNotFoundException | ¿ä±¸µÈ ¼ºñ½º°¡ Áö¿ø µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì¿¡ ¹ßÇàµÇ´Â ¿¹¿Ü¸¦ ³ªÅ¸³À´Ï´Ù. |
Java Management Extensions ÄÚ¾î Ŭ·¡½º¸¦ Á¦°øÇÕ´Ï´Ù.
Java Management Extensions (JMXTM) API´Â °ü¸® ¹× °¨½Ã¿ëÀÇ Ç¥ÁØ API ÀÔ´Ï´Ù. ÀϹÝÀûÀ¸·Î ´ÙÀ½ÀÇ ¿ëµµ·Î »ç¿ëµË´Ï´Ù.
JMX API´Â ½Ã½ºÅÛÀ̳ª ³×Æ®¿öÅ©ÀÇ °ü¸® ¼Ö·ç¼Ç¿¡µµ »ç¿ëµË´Ï´Ù.
remote administration ÇÁ·Î±×·¥Àº JMX API ¿ø°Ý Á¢±Ù ±â´ÉÀ» ÀÌ¿ëÇØ, ½ÇÇàÁßÀÇ ¾îÇø®ÄÉÀ̼ǿ¡ ¿ø°Ý Á¢±Ù ÇÒ ¼ö ÀÖ½À´Ï´Ù.
JMX API ±âº» °³³ä, ¡¸MBean¡¹´Â ÀÚ¿øÀ» ³ªÅ¸³»´Â À̸§ ÷ºÎÀÇ °ü¸® °´Ã¼ÀÔ´Ï´Ù. ´ÙÀ½°ú °°Àº °ü¸® ÀÎÅÍÆäÀ̽º¸¦ °¡Áý´Ï´Ù.
¿¹¸¦ µé¾î
¾îÇø®ÄÉÀ̼ÇÀÇ ±¸¼ºÀ» ³ªÅ¸³»´Â MBean´Â
º¹¼ö°¡ ´Ù¸¥ ±¸¼º Ç׸ñÀ» ³ªÅ¸³»´Â ¼Ó¼ºÀ» °¡Áú ¼ö°¡ ÀÖ½À´Ï´Ù. CacheSize
¼Ó¼ºÀ» Àоî³ÂÀ» °æ¿ì, ±× Ç׸ñÀÇ ÇöÀçÀÇ °ªÀÌ ¸®Åϵ˴ϴÙ
. µ¿¼Ó¼ºÀ» Ãâ·ÂÇßÀ» °æ¿ì, Ç׸ñÀÌ °»½ÅµÇ¾î ½ÇÇàÁßÀÇ ¾îÇø®ÄÉÀ̼ÇÀÇ µ¿ÀÛÀÌ º¯ÈÇÒ °¡´É¼ºÀÌ. save
µîÀÇ ¿ÀÆÛ·¹À̼ÇÀ» ½ÇÇàÇØ, ÇöÀçÀÇ ±¸¼ºÀ» ¿µ¼ÓÀûÀ¸·Î Æ÷ÇÔÇÒ ¼ö ÀÖ½À´Ï´Ù
. ConfigurationChangedNotification
µîÀÇ ÅëÁö´Â ±¸¼ºÀÇ º¯°æ¸¶´Ù ¼Û½ÅÇÒ ¼ö ÀÖ½À´Ï´Ù.
JMX API Ç¥ÁØÀûÀÎ »ç¿ë ¹æ¹ý¿¡¼´Â MBean´Â Java °´Ã¼·Î¼ ±¸ÇöµË´Ï´Ù. ±×·¯³ª, ÀÌÇÏ¿¡ ¼³¸íÇÏ´Â ´ë·Î º¸Åë ÀÌ·¯ÇÑ °´Ã¼°¡ Á÷Á¢ ÂüÁ¶µÉ °ÍÀº ¾ø½À´Ï´Ù.
MBean ±¸ÇöÀ» ´Ü¼øÈ Çϱâ À§ÇÑ, JMX API¿¡´Â ¡¸Standard MBean¡¹ÀÇ °³³äÀÌ µµÀԵǰí ÀÖ½À´Ï´Ù. Standard MBean´Â JavaBeansTM ÀÇ ³×ÀÌ¹Ö ÆÐÅϰú ÀÚÁÖ ´àÀº ³×ÀÌ¹Ö ÆÐÅÏÀ» »ç¿ëÇØ Java ÀÎÅÍÆäÀ̽º·ÎºÎÅÍ ¼Ó¼º°ú ¿ÀÆÛ·¹À̼ÇÀ» ÃßÃøÇÒ ¼ö ÀÖ´Â MBean ÀÔ´Ï´Ù. ¿¹¸¦ µé¾î ´ÙÀ½°ú °°Àº ÀÎÅÍÆäÀ̽º°¡ ÀÖ´Ù°í ÇÕ´Ï´Ù.
public interface ConfigurationMBean { public int getCacheSize(); public void setCacheSize(int size); public long getLastChangedTime(); public void save(); }
getCacheSize
¸Þ¼µå¿Í setCacheSize
¸Þ¼µå´Â int
ÇüÅ·ΠºÒ·Á °£ CacheSize
(JavaBeans
±ÔÄ¢°ú´Â ´Þ¶ó, ÃÖÃÊÀÇ ¹®ÀÚ°¡ ¾ËÆÄºªÀÇ ´ë¹®ÀÚ)
ÀÇ Àо Ãâ·Â ¼Ó¼ºÀ» Á¤ÀÇÇÕ´Ï´Ù.
getLastChangedTime
¸Þ¼µå´Â long
ÇüÀ¸·Î ºÒ·Á °£ LastChangedTime
ÀÇ ¼Ó¼ºÀ» Á¤ÀÇÇÕ´Ï´Ù. À̰ÍÀº, setLastChangedTime
¸Þ¼µå°¡ Á¸ÀçÇÏÁö ¾Ê±â ¶§¹®¿¡
Àбâ Àü¿ë
¼Ó¼ºÀÔ´Ï´Ù.
save
¸Þ¼µå´Â ¿ÀÆÛ·¹À̼ÇÀ¸·Î ºÒ·Á °£ save
¸¦ Á¤ÀÇÇÕ´Ï´Ù. get
, set
,
¶Ç´Â is
·Î
½ÃÀ۵Ǵ À̸§À» °¡ÁöÁö ¾Ê±â ¶§¹®¿¡
¼Ó¼ºÀÌ ¾Æ´Õ´Ï´Ù.
Standard MBean Á¤È®ÇÑ ³×ÀÌ¹Ö ÆÐÅÏÀÇ »ó¼¼ÇÑ °Í¿¡ ´ëÇÏ¿©´Â JMX »ç¾çÀ» ÂüÁ¶ÇØ (ÀÌ)¶ó°í ÁÖ¼¼¿ä.
ÀÌ °ü¸® ÀÎÅÍÆäÀ̽º·Î MBean ÀÎ Java °´Ã¼¸¦ ÀÛ¼ºÇÏ´Â ¹æ¹ýÀº 2 ¹æ¹ý Á¸ÀçÇÕ´Ï´Ù. 1°³´Â Java
ÀÎÅÍÆäÀ̽ºÀÇ À̸§¿¡¼ MBean
Á¢¹Ì¸»À» Á¦¿ÜÇÑ À̸§À» °¡Áö´Â Ŭ·¡½º¿¡ ¼ÓÇÏ´Â °´Ã¼¸¦ ÀÛ¼ºÇÏ´Â ¹æ¹ýÀÔ´Ï´Ù. ¿¹¿¡¼´Â °´Ã¼´Â ConfigurationMBean
(¿Í)°ú °°Àº Java ÆÐŰÁöÀÇ Configuration
Ŭ·¡½º¿¡ ¼ÓÇÏ°Ô µË´Ï´Ù. ÀÌÁ¦(À̹Ì
) 1
°³ÀÇ ¹æ¹ý¿¡¼´Â StandardMBean
Ŭ·¡½º¸¦ »ç¿ëÇÕ´Ï´Ù.
Dynamic MBean´Â °ü¸® ÀÎÅÍÆäÀ̽º¸¦ ½ÇÇà½Ã¿¡ Á¤ÀÇÇÏ´Â MBean ÀÔ´Ï´Ù. ¿¹¸¦ µé¾î ±¸¼º MBean´Â XML ÆÄÀÏÀÇ ÇØ¼®¿¡ÀÇÇØ °ø°³ÇÏ´Â ¼Ó¼ºÀÇ À̸§°ú ÇüŸ¦ °áÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.
DynamicMBean
ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇϴ Ŭ·¡½ºÀÇ Java °´Ã¼´Â Dynamic MBean°¡ µË´Ï´Ù.
Open MBean´Â Dynamic MBean
1
°³ÀÔ´Ï´Ù. ¼Ó¼ºÀÇ ÇüÅÂ, ¿ÀÆÛ·¹ÀÌ¼Ç ÆÄ¶ó¹ÌÅÍÀÇ ÇüÅ ¹× ¹Ýȯ°ªÀº ¸î°³ÀÇ »çÀü Á¤Àǰ¡ ³¡³ Java Ŭ·¡½º¸¦ »ç¿ëÇØ ±¸ÃàµË´Ï´Ù. Open
MBean´Â
¾îÇø®ÄÉÀÌ¼Ç °íÀ¯ÀÇ ÇüÅ (ºñ Java ÇÁ·Î±×·¥À» Æ÷ÇÔÇÑ´Ù)¿¡ ¹Ýµå½Ã ¾×¼¼½º ÇÒ ¼ö ÀÖ´Ù°í´Â ÇÒ ¼ö ¾ø´Â remote administration ÇÁ·Î±×·¥À» »ç¿ëÇØ, ¿ÀÆÛ·¹À̼ÇÀ» °£ÆíÈÇÕ´Ï´Ù. Open MBean´Â
ÆÐŰÁö javax.management.openmbean
±×¸®°í Á¤Àǵ˴ϴÙ.
Model MBean´Â Dynamic MBean
1
°³ÀÔ´Ï´Ù. °ü¸® ÀÎÅÍÆäÀ̽º¿Í ºÎÇÏÀÇ °ü¸® ÀÚ¿ø°£ÀÇ ºê¸´Áö·Î¼ ±â´ÉÇÕ´Ï´Ù. °ü¸® ÀÎÅÍÆäÀ̽º¿Í °ü¸® ÀÚ¿øÀº Java
°´Ã¼·Î¼ ÁöÁ¤µË´Ï´Ù. ´Ù¸¥ °ü¸® ÀÎÅÍÆäÀ̽º, ´Ù¸¥ °ü¸® ÀÚ¿øÀ¸·Î °°Àº Model MBean
±¸ÇöÀ» ¸îȸ¿¡¼µµ ÀçÀÌ¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. Model MBean ±¸ÇöÀº Áö¼Ó¼º, ij½¬ ±â´ÉÀ̶ó°í ÇÏ´Â °øÅëÀÇ ±â´ÉÀ» Á¦°øÇÒ ¼ö°¡ ÀÖ¾î ÆÐŰÁö javax.management.modelmbean
±×¸®°í Á¤Àǵ˴ϴÙ.
MBean¸¦ »ç¿ëÇϱâ À§Çؼ´Â MBean ¼¹ö¿¡ µî·ÏÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. MBean ¼¹ö´Â MBean
ÀÇ ¸®Æ÷ÁöÅ͸®(repository)ÀÔ´Ï´Ù. º¸Åë, MBean ¼¹ö¸¦ ÀÌ¿ëÇÏÁö ¾ÊÀ¸¸é, MBean¿¡´Â ¾×¼¼½º ÇÒ ¼ö ¾ø½À´Ï´Ù. ÄÚµå´Â MBean¸¦ Á÷Á¢ ±¸ÇöÇÏ´Â Java
°´Ã¼¿¡ ¾×¼¼½º ÇÏ´Â ´ë½Å¿¡
MBean
À̸§À» ÁöÁ¤ÇØ MBean ¼¹ö °æÀ¯·Î MBean¿¡ ¾×¼¼½º ÇÏ°Ô µÇ¾ú½À´Ï´Ù. °¢
MBean´Â
MBean ¼¹ö³»¿¡
ObjectName
Ŭ·¡½º¿¡ ÀÇÇØ Á¤ÀÇµÈ ÀÏÀÇÀÇ À̸§À» °¡Áý´Ï´Ù.
MBean ¼¹ö´Â MBeanServer
ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇÏ´Â °´Ã¼ÀÔ´Ï´Ù. J2SE 5.0 Àº µ¿ÀÏÇÑ Java°¡»ó ¸Ó½Å»ó¿¡¼ ½ÇÇàµÇ°í ÀÖ´Â º¹¼ö°¡ ´Ù¸¥ °ü¸® ÄÄÆÛ³ÍÆ®·Î °øÀ¯ °¡´ÉÇÑ ¡¸Platform MBean
Server¡¹¸¦ Á¦°øÇÕ´Ï´Ù. Platform MBean Server ¿¡´Â ManagementFactory.getPlatformMBeanServer()
¸Þ¼µå·Î ¾×¼¼½º ÇÕ´Ï´Ù.
¾îÇø®ÄÉÀÌ¼Ç Äڵ忡¼µµ, MBeanServerFactory
Ŭ·¡½º¸¦ »ç¿ëÇØ »õ·Î¿î MBean ¼¹ö¸¦ ÀÛ¼ºÇϰųª ±âÁ¸ÀÇ MBean
¼¹ö¿¡ ¾×¼¼½º Çϰųª ÇÒ ¼ö ÀÖ½À´Ï´Ù.
MBean´Â 2 ¹æ¹ýÀÇ ¹æ¹ýÀ¸·Î ÀÛ¼ºÇÒ ¼ö ÀÖ½À´Ï´Ù. ¿ì¼±, MBean ·Î ÇÏ´Â Java °´Ã¼¸¦ ±¸ÃàÇØ, registerMBean
¸Þ¼µå¸¦ »ç¿ëÇØ, ÀÌ
Java °´Ã¼¸¦ MBean ¼¹ö¿¡ µî·ÏÇÏ´Â ¹æ¹ýÀÌ ÀÖ½À´Ï´Ù. ÀÌÁ¦(À̹Ì
) 1°³ÀÇ ¹æ¹ý¿¡¼´Â ¸î°³ÀÇ createMBean
¸Þ¼µå¸¦ »ç¿ëÇØ, ´ÜÀÏÀÇ ¿ÀÆÛ·¹À̼ÇÀ¸·Î MBean¸¦ ÀÛ¼ºÇØ, µî·ÏÇÕ´Ï´Ù.
registerMBean
¸Þ¼µå´Â ·ÎÄÿ¡¼´Â °£´ÜÇÏ°Ô »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù¸¸, ¸®¸ðÆ®¿¡¼´Â »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù. createMBean
¸Þ¼µå´Â ¸®¸ðÆ®·Î »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ´Ù¸¸, Ŭ·¡½ºÀÇ ·ÎµåÀÇ ¹®Á¦°¡ ¹ß»ýÇÏ´Â °æ¿ì°¡ ÀÖÀ¸¹Ç·Î ÁÖÀǰ¡ ÇÊ¿äÇÕ´Ï´Ù.
MBeanRegistration
ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇϰí ÀÖ´Â MBean´Â
MBean ¼¹ö¿¡ÀÇ µî·Ï½Ã ¶Ç´Â MBean ¼¹ö·ÎºÎÅÍÀÇ µî·Ï ÇØÁ¦½Ã¿¡ ¾×¼ÇÀ» ½ÇÇàÇÒ ¼ö ÀÖ½À´Ï´Ù.
´ÙÀ½ÀÇ ¿¹ÀÇ °°°Ô, ObjectName
name
¿Í
MBeanServer
mbs
¸¦ ÁöÁ¤ÇÏ´Â °ÍÀ¸·Î½á, ¼Ó¼º°ú ¿ÀÆÛ·¹À̼ǿ¡ ¾×¼¼½º ÇÒ ¼ö ÀÖ½À´Ï´Ù.
int cacheSize = mbs.getAttribute(name, "CacheSize");
Attribute
newCacheSize = new Attribute("CacheSize", new Integer(2000));
mbs.setAttribute(name, newCacheSize);
mbs.invoke(name, "save", new Object[0], new Class[0]);
MBean °ü¸® ÀÎÅÍÆäÀ̽º¿¡ ´ëÀÀÇÏ´Â Java ÀÎÅÍÆäÀ̽º°¡ ÀÖ´Â °æ¿ì´Â ´ÙÀ½°ú °°ÀÌ, MBean ÇÁ·Ï½Ã¸¦ ÀÌ¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
ConfigurationMBean conf = (ConfigurationMBean) MBeanServerInvocationHandler
. newProxyInstance(mbs, name, ConfigurationMBean.class, false);
int cacheSize = conf.getCacheSize();
conf.setCacheSize(2000);
conf.save();
MBean ÇÁ·Ï½Ã´Â ¸Å¿ì Æí¸®ÇÕ´Ï´Ù. 2¹øÂ°ÀÇ ¿¹¿¡¼´Â ÃÖÃÊÀÇ ¿¹¿Í °°Àº MBeanServer
¿ÀÆÛ·¹À̼ÇÀ» È£ÃâÇÕ´Ï´Ù.
MBean ¼¹ö·Î ƯÁ¤ÀÇ ÆÐÅÏ¿¡ ÀÏÄ¡ÇÏ´Â À̸§À» °¡Áö´Â MBean ³ª, ƯÁ¤ÀÇ Á¦¾àÀ» ä¿ì´Â ¼Ó¼ºÀ» °¡Áö´Â MBean¸¦ Á¶È¸ÇÒ ¼ö ÀÖ½À´Ï´Ù. À̸§ÀÇ ÆÐÅÏÀº ObjectName
Ŭ·¡½º¿¡¼ ÀÛ¼ºµË´Ï´Ù. Á¦¾àÀº Query
Ŭ·¡½º¿¡¼ ÀÛ¼ºµË´Ï´Ù. ±× ÈÄ, queryNames
¸Þ¼µå¿Í queryMBeans
¸Þ¼µå¿¡ ÀÇÇØ Äõ¸®°¡ ½ÇÇàµË´Ï´Ù.
ÅëÁö´Â Notification
Ŭ·¡½º ¶Ç´Â ¼ºê Ŭ·¡½ºÀÇ ÀνºÅϽºÀÔ´Ï´Ù. Java Ŭ·¡½º¿¡ °¡¼¼ÇØ, °°Àº Ŭ·¡½ºÀÇ ÅëÁöÀÇ ±¸º°·Î »ç¿ëÇÏ´Â ÇüÅ ij¸¯ÅÍ ¶óÀÎÀ» °¡Áö°í ÀÖ½À´Ï´Ù.
ÅëÁö¸¦ ¹ßÇàÇÏ´Â MBean´Â
NotificationBroadcaster
¶Ç´Â NotificationEmitter
ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. º¸Åë, ÀÌ·¯ÇÑ ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇϱâ À§Çؼ
NotificationBroadcasterSupport
»ó¼ÓÀΰ¡ ÀÌ Å¬·¡½ºÀÇ ÀνºÅϽºÀÇ À§¾çÀ» ÇÕ´Ï´Ù.
ÅëÁö´Â ¸®½º³Ê¿¡ ÀÇÇØ ¼ö½ÅµË´Ï´Ù. ¸®½º³Ê´Â NotificationListener
ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇÏ´Â °´Ã¼ÀÔ´Ï´Ù. MBeanServer.addNotificationListener(ObjectName,
NotificationListener, NotificationFilter, Object)
¸Þ¼µå¸¦ »ç¿ëÇØ, MBean¿¡ ¸®½º³Ê¸¦ Ãß°¡ÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ ¸Þ¼µå¿¡ ÇÊÅ͸¦ Àû¿ëÇØ, ÇÊ¿äÇÑ ÅëÁö¸¸À» ¼±ÅÃÇÒ ¼öµµ ÀÖ½À´Ï´Ù. ÇÊÅÍ´Â NotificationFilter
ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇÏ´Â °´Ã¼ÀÔ´Ï´Ù.
MBean´Â
°°Àº MBean ¼¹ö»óÀÇ ±× ¿ÜÀÇ MBean¿¡ ÀÇÇØ ¹ßÇàµÇ´Â ÅëÁöÀÇ ¸®½º³Ê°¡ µÉ ¼ö°¡ ÀÖ½À´Ï´Ù. ÀÌ °æ¿ì
MBean´Â
NotificationListener
¸¦
±¸ÇöÇØ, MBeanServer.addNotificationListener(ObjectName,
ObjectName, NotificationFilter, Object)
¸Þ¼µå¸¦ ÀÌ¿ëÇØ ÅëÁö¸¦ ´ë±âÇÕ´Ï´Ù.
MBean ¼¹ö¿¡´Â Ä¿³ØÅÍ °æÀ¯·Î ¿ø°Ý Á¢±Ù ÇÒ ¼ö ÀÖ½À´Ï´Ù. Ä¿³ØÅ͸¦ ÀÌ¿ëÇÏ´Â °ÍÀ¸·Î ¸®¸ðÆ® Java
¾îÇø®ÄÉÀ̼ÇÀ¸·ÎºÎÅÍ, ·ÎÄÃÀÇ ¼¹ö¿¡ ¾×¼¼½º ÇÒ ¶§¿Í °°°ÔÀÇÇØ MBean ¼¹ö¿¡ ¾×¼¼½º ÇÒ ¼ö ÀÖ½À´Ï´Ù. Ä¿³ØÅÍ´Â javax.management.remote
ÆÐŰÁö¿¡ Á¤Àǵǰí ÀÖ½À´Ï´Ù.
JMX »ç¾ç¿¡´Â ¾î´ðÅÍÀÇ °³³äµµ Á¤Àǵǰí ÀÖ½À´Ï´Ù. ¾î´ðÅÍ´Â SNMP, HTML µîÀÇ ¿ä±¸ÀÇ ÇÁ·ÎÅäÄÝÀ» º¯È¯ÇØ, MBean
¼¹ö¿¡ ¾×¼¼½º ÇÕ´Ï´Ù. ¿¹¸¦ µé¾î
SNMP GET ¿ÀÆÛ·¹À̼ÇÀº MBean ¼¹ö»óÀÇ getAttribute
(ÀÌ)°¡ µË´Ï´Ù.
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀüÀÇ ÆÐŰÁö ´ÙÀ½ÀÇ ÆÐŰÁö | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.