Produced by Araxis Merge on 5/25/2018 9:21:44 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | C:\AraxisMergeCompare\Pri_un\ZIP\DSM-cif\Direct Implementation\java\install\build\download\apache-tomcat-6.0.37.tar\apache-tomcat-6.0.37\webapps\docs | monitoring.html | Mon Apr 29 09:36:10 2013 UTC |
| 2 | C:\AraxisMergeCompare\Pri_re\ZIP\DSM-cif\Direct Implementation\java\install\build\download\apache-tomcat-6.0.37.tar\apache-tomcat-6.0.37\webapps\docs | monitoring.html | Thu May 24 19:54:24 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 2158 |
| Changed | 2 | 4 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | <html><hea d><META ht tp-equiv=" Content-Ty pe" conten t="text/ht ml; charse t=iso-8859 -1"><title >Apache To mcat 6.0 ( 6.0.37) - Monitoring and Manag ing Tomcat </title><s tyle type= "text/css" media="pr int"> | |
| 2 | .noPri nt {displa y: none;} | |
| 3 | td#mai nBody {wid th: 100%;} | |
| 4 | </st yle></head ><body bgc olor="#fff fff" text= "#000000" link="#525 D76" alink ="#525D76" vlink="#5 25D76"><ta ble border ="0" width ="100%" ce llspacing= "0"><!--PA GE HEADER- -><tr><td> <!--PROJEC T LOGO-->< a href="ht tp://tomca t.apache.o rg/"><img src="./ima ges/tomcat .gif" alig n="right" alt=" | |
| 5 | The Apache Tom cat Servle t/JSP Cont ainer | |
| 6 | " bord er="0"></a ></td><td> <h1><font face="aria l,helvetic a,sanserif ">Apache T omcat 6.0< /font></h1 ><font fac e="arial,h elvetica,s anserif">V ersion 6.0 .37, Apr 2 9 2013</fo nt></td><t d><!--APAC HE LOGO--> <a href="h ttp://www. apache.org /"><img sr c="./image s/asf-logo .gif" alig n="right" alt="Apach e Logo" bo rder="0">< /a></td></ tr></table ><table bo rder="0" w idth="100% " cellspac ing="4"><! --HEADER S EPARATOR-- ><tr><td c olspan="2" ><hr nosha de="noshad e" size="1 "></td></t r><tr><!-- LEFT SIDE NAVIGATION --><td wid th="20%" v align="top " nowrap=" nowrap" cl ass="noPri nt"><p><st rong>Links </strong>< /p><ul><li ><a href=" index.html ">Docs Hom e</a></li> <li><a hre f="http:// wiki.apach e.org/tomc at/FAQ">FA Q</a></li> </ul><p><s trong>User Guide</st rong></p>< ul><li><a href="intr oduction.h tml">1) In troduction </a></li>< li><a href ="setup.ht ml">2) Set up</a></li ><li><a hr ef="appdev /index.htm l">3) Firs t webapp</ a></li><li ><a href=" deployer-h owto.html" >4) Deploy er</a></li ><li><a hr ef="manage r-howto.ht ml">5) Man ager</a></ li><li><a href="real m-howto.ht ml">6) Rea lms and AA A</a></li> <li><a hre f="securit y-manager- howto.html ">7) Secur ity Manage r</a></li> <li><a hre f="jndi-re sources-ho wto.html"> 8) JNDI Re sources</a ></li><li> <a href="j ndi-dataso urce-examp les-howto. html">9) J DBC DataSo urces</a>< /li><li><a href="cla ss-loader- howto.html ">10) Clas sloading</ a></li><li ><a href=" jasper-how to.html">1 1) JSPs</a ></li><li> <a href="s sl-howto.h tml">12) S SL</a></li ><li><a hr ef="ssi-ho wto.html"> 13) SSI</a ></li><li> <a href="c gi-howto.h tml">14) C GI</a></li ><li><a hr ef="proxy- howto.html ">15) Prox y Support< /a></li><l i><a href= "mbeans-de scriptor-h owto.html" >16) MBean Descripto r</a></li> <li><a hre f="default -servlet.h tml">17) D efault Ser vlet</a></ li><li><a href="clus ter-howto. html">18) Clustering </a></li>< li><a href ="balancer -howto.htm l">19) Loa d Balancer </a></li>< li><a href ="connecto rs.html">2 0) Connect ors</a></l i><li><a h ref="monit oring.html ">21) Moni toring and Managemen t</a></li> <li><a hre f="logging .html">22) Logging</ a></li><li ><a href=" apr.html"> 23) APR/Na tive</a></ li><li><a href="virt ual-hostin g-howto.ht ml">24) Vi rtual Host ing</a></l i><li><a h ref="aio.h tml">25) A dvanced IO </a></li>< li><a href ="extras.h tml">26) A dditional Components </a></li>< li><a href ="maven-ja rs.html">2 7) Maveniz ed</a></li ></ul><p>< strong>Ref erence</st rong></p>< ul><li><a href="RELE ASE-NOTES. txt">Relea se Notes</ a></li><li ><a href=" config/ind ex.html">C onfigurati on</a></li ><li><a hr ef="api/in dex.html"> Javadocs</ a></li><li ><a href=" http://tom cat.apache .org/conne ctors-doc/ ">JK 1.2 D ocumentati on</a></li ></ul><p>< strong>Apa che Tomcat Developme nt</strong ></p><ul>< li><a href ="building .html">Bui lding</a>< /li><li><a href="cha ngelog.htm l">Changel og</a></li ><li><a hr ef="http:/ /wiki.apac he.org/tom cat/Tomcat Versions"> Status</a> </li><li>< a href="de velopers.h tml">Devel opers</a>< /li><li><a href="arc hitecture/ index.html ">Architec ture</a></ li><li><a href="func specs/inde x.html">Fu nctional S pecs.</a>< /li></ul>< /td><!--RI GHT SIDE M AIN BODY-- ><td width ="80%" val ign="top" align="lef t" id="mai nBody"><h1 >Apache To mcat 6.0</ h1><h2>Mon itoring an d Managing Tomcat</h 2><table b order="0" cellspacin g="0" cell padding="2 "><tr><td bgcolor="# 525D76"><f ont color= "#ffffff" face="aria l,helvetic a.sanserif "><a name= "Table of Contents"> <!--()-->< /a><a name ="Table_of _Contents" ><strong>T able of Co ntents</st rong></a>< /font></td ></tr><tr> <td><block quote> | |
| 7 | <ul><li><a href="#In troduction ">Introduc tion</a></ li><li><a href="#Ena bling_JMX_ Remote">En abling JMX Remote</a ></li><li> <a href="# Manage_Tom cat_with_J MX_remote_ Ant_Tasks" >Manage To mcat with JMX remote Ant Tasks </a></li>< li><a href ="#JMXAcce ssorOpenTa sk_-_JMX_o pen_connec tion_task" >JMXAccess orOpenTask - JMX ope n connecti on task</a ></li><li> <a href="# JMXAccesso rGetTask:_ _get_attri bute_value _Ant_task" >JMXAccess orGetTask: get attr ibute valu e Ant task </a></li>< li><a href ="#JMXAcce ssorSetTas k:__set_at tribute_va lue_Ant_ta sk">JMXAcc essorSetTa sk: set a ttribute v alue Ant t ask</a></l i><li><a h ref="#JMXA ccessorInv okeTask:__ invoke_MBe an_operati on_Ant_tas k">JMXAcce ssorInvoke Task: inv oke MBean operation Ant task</ a></li><li ><a href=" #JMXAccess orQueryTas k:__query_ MBean_Ant_ task">JMXA ccessorQue ryTask: q uery MBean Ant task< /a></li><l i><a href= "#JMXAcces sorCreateT ask:__remo te_create_ MBean_Ant_ task">JMXA ccessorCre ateTask: remote cre ate MBean Ant task</ a></li><li ><a href=" #JMXAccess orUnregist erTask:__r emote_unre gister_MBe an_Ant_tas k">JMXAcce ssorUnregi sterTask: remote un register M Bean Ant t ask</a></l i><li><a h ref="#JMXA ccessorCon dition:__e xpress_con dition">JM XAccessorC ondition: express c ondition</ a></li><li ><a href=" #JMXAccess orEqualsCo ndition:__ equals_MBe an_Ant_con dition">JM XAccessorE qualsCondi tion: equ als MBean Ant condit ion</a></l i></ul> | |
| 8 | </blockquo te></td></ tr></table ><table bo rder="0" c ellspacing ="0" cellp adding="2" ><tr><td b gcolor="#5 25D76"><fo nt color=" #ffffff" f ace="arial ,helvetica .sanserif" ><a name=" Introducti on"><stron g>Introduc tion</stro ng></a></f ont></td>< /tr><tr><t d><blockqu ote> | |
| 9 | ||
| 10 | <p>Monit oring is a key aspec t of syste m administ ration. Lo oking insi de a | |
| 11 | runni ng server, obtaining some stat istics or reconfigur ing some a spects of | |
| 12 | an ap plication are all da ily admini stration t asks.</p> | |
| 13 | ||
| 14 | </blockq uote></td> </tr></tab le><table border="0" cellspaci ng="0" cel lpadding=" 2"><tr><td bgcolor=" #525D76">< font color ="#ffffff" face="ari al,helveti ca.sanseri f"><a name ="Enabling JMX Remot e"><!--()- -></a><a n ame="Enabl ing_JMX_Re mote"><str ong>Enabli ng JMX Rem ote</stron g></a></fo nt></td></ tr><tr><td ><blockquo te> | |
| 15 | ||
| 16 | <p><st rong>Note: </strong> This confi guration i s needed i f you are | |
| 17 | going to monitor Tomcat re motely. If you are g oing | |
| 18 | to mon itor it lo cally, usi ng the sam e user tha t Tomcat r uns with, then | |
| 19 | with J ava 6 it i s not need ed at all, and with Java 5 it is as simp le as | |
| 20 | adding <code>-Dc om.sun.man agement.jm xremote</c ode>, see Java docum entation.< /p> | |
| 21 | ||
| 22 | <p>The Oracle we bsite incl udes the l ist of opt ions and h ow to conf igure JMX Remote on Java 5: | |
| 23 | <a href="htt p://docs.o racle.com/ javase/1.5 .0/docs/gu ide/manage ment/agent .html"> | |
| 24 | ht tp://docs. oracle.com /javase/1. 5.0/docs/g uide/manag ement/agen t.html</a> | |
| 25 | an d on Java 6: | |
| 26 | <a href="htt p://docs.o racle.com/ javase/6/d ocs/techno tes/guides /managemen t/agent.ht ml"> | |
| 27 | ht tp://docs. oracle.com /javase/6/ docs/techn otes/guide s/manageme nt/agent.h tml</a>. | |
| 28 | </p> | |
| 29 | <p>The following is a quic k configur ation guid e for Java 5:</p> | |
| 30 | <p>Add the follo wing param eters to < code>seten v.bat</cod e> script of your | |
| 31 | Tomcat (see <a h ref="RUNNI NG.txt">RU NNING.txt< /a> for de tails).<br > | |
| 32 | <em>No te:</em> T his syntax is for Mi crosoft Wi ndows. The command h as | |
| 33 | to be on the sam e line. It is wrappe d to be mo re readabl e. If Tomc at is | |
| 34 | runnin g as a Win dows servi ce, use it s configur ation dial og to set | |
| 35 | java o ptions for the servi ce. | |
| 36 | For un *xes remov e <code>"s et "</code > from beg inning of the line. | |
| 37 | </p> | |
| 38 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 39 | set CATALI NA_OPTS=-D com.sun.ma nagement.j mxremote | |
| 40 | -Dcom.su n.manageme nt.jmxremo te.port=%m y.jmx.port % | |
| 41 | -Dcom.su n.manageme nt.jmxremo te.ssl=fal se | |
| 42 | -Dcom.su n.manageme nt.jmxremo te.authent icate=fals e | |
| 43 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 44 | ||
| 45 | <ol> | |
| 46 | <li>If you requi re authori zation, ad d and chan ge this : | |
| 47 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 48 | -Dcom.su n.manageme nt.jmxremo te.authent icate=true | |
| 49 | -Dcom.su n.manageme nt.jmxremo te.passwor d.file=../ conf/jmxre mote.passw ord | |
| 50 | -Dcom.su n.manageme nt.jmxremo te.access. file=../co nf/jmxremo te.access | |
| 51 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 52 | </li> | |
| 53 | <li>ed it the acc ess author ization fi le <em>$CA TALINA_BAS E/conf/jmx remote.acc ess</em> : | |
| 54 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 55 | monitorRol e readonly | |
| 56 | controlRol e readwrit e | |
| 57 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 58 | </li> | |
| 59 | <li>ed it the pas sword file <em>$CATA LINA_BASE/ conf/jmxre mote.passw ord</em> : | |
| 60 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 61 | monitorRol e tomcat | |
| 62 | controlRol e tomcat | |
| 63 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 64 | <b>Tip </b>: The password f ile should be read-o nly and on ly accessi ble by the | |
| 65 | operat ing system user Tomc at is runn ing as. | |
| 66 | </li> | |
| 67 | </ol> | |
| 68 | <p><st rong>Note: </strong> The JSR 16 0 JMX-Adap tor opens a second d ata channe l | |
| 69 | on a r andom port . That is a problem when you h ave a loca l firewall installed . | |
| 70 | To fix it, confi gure a <co de>JmxRemo teLifecycl eListener< /code>, as described | |
| 71 | in <a href="conf ig/listene rs.html">l isteners</ a> documen tation. | |
| 72 | </p> | |
| 73 | ||
| 74 | </blockq uote></td> </tr></tab le><table border="0" cellspaci ng="0" cel lpadding=" 2"><tr><td bgcolor=" #525D76">< font color ="#ffffff" face="ari al,helveti ca.sanseri f"><a name ="Manage T omcat with JMX remot e Ant Task s"><!--()- -></a><a n ame="Manag e_Tomcat_w ith_JMX_re mote_Ant_T asks"><str ong>Manage Tomcat wi th JMX rem ote Ant Ta sks</stron g></a></fo nt></td></ tr><tr><td ><blockquo te> | |
| 75 | <p>To s implify JM X usage wi th Ant 1.6 .x, a set of tasks i s provided that may | |
| 76 | be used with antl ib.</p> | |
| 77 | <p><b>a ntlib</b>: Copy your catalina- ant.jar fr om $CATALI NA_HOME/li b to $ANT_ HOME/lib.< /p> | |
| 78 | <p>The following example sh ows the JM X Accessor usage:<br > | |
| 79 | <em>Not e:</em> Th e <code>na me</code> attribute value was wrapped he re to be | |
| 80 | more re adable. It has to be all on th e same lin e, without spaces.</ p> | |
| 81 | <table border="1" > | |
| 82 | <tr><td ><pre> | |
| 83 | <projec t name="Ca talina Ant JMX" | |
| 84 | xmln s:jmx="ant lib:org.ap ache.catal ina.ant.jm x" | |
| 85 | defa ult="state " | |
| 86 | base dir="."> ; | |
| 87 | <prop erty name= "jmx.serve r.name" va lue="local host" /> ; | |
| 88 | <prop erty name= "jmx.serve r.port" va lue="9012" /> | |
| 89 | <prop erty name= "cluster.s erver.addr ess" value ="192.168. 1.75" /> ; | |
| 90 | <prop erty name= "cluster.s erver.port " value="9 025" /> | |
| 91 | ||
| 92 | <targ et name="s tate" desc ription="S how JMX Cl uster stat e"> | |
| 93 | <jm x:open | |
| 94 | host ="${jmx.se rver.name} " | |
| 95 | port ="${jmx.se rver.port} " | |
| 96 | user name="cont rolRole" | |
| 97 | pass word="tomc at"/> | |
| 98 | <jm x:get | |
| 99 | name = | |
| 100 | "Catalina: type=IData Sender,hos t=localhos t, | |
| 101 | senderAddr ess=${clus ter.server .address}, senderPort =${cluster .server.po rt}" | |
| 102 | attr ibute="con nected" | |
| 103 | resu ltproperty ="IDataSen der.backup .connected " | |
| 104 | echo ="false" | |
| 105 | /> | |
| 106 | <jm x:get | |
| 107 | name ="Catalina :type=Clus terSender, host=local host" | |
| 108 | attr ibute="sen derObjectN ames" | |
| 109 | resu ltproperty ="senderOb jectNames" | |
| 110 | echo ="false" | |
| 111 | /> | |
| 112 | <!- - get curr ent maxAct iveSession from Clus terTest ap plication | |
| 113 | ech o it to An t output a nd store a t | |
| 114 | pro perty < em>clus tertest.ma xActiveSes sions.orgi nal</em > | |
| 115 | --> | |
| 116 | <jm x:get | |
| 117 | name ="Catalina :type=Mana ger,path=/ ClusterTes t,host=loc alhost" | |
| 118 | attr ibute="max ActiveSess ions" | |
| 119 | resu ltproperty ="clustert est.maxAct iveSession s.orginal" | |
| 120 | echo ="true" | |
| 121 | /> | |
| 122 | <!- - set maxA ctiveSessi on to 100 | |
| 123 | --> | |
| 124 | <jm x:set | |
| 125 | name ="Catalina :type=Mana ger,path=/ ClusterTes t,host=loc alhost" | |
| 126 | attr ibute="max ActiveSess ions" | |
| 127 | valu e="100" | |
| 128 | type ="int" | |
| 129 | /> | |
| 130 | <!- - get all sessions a nd split r esult as d elimiter & lt;em>S PACE</e m> for easy | |
| 131 | acc ess all se ssion ids directly w ith Ant pr operty ses sions.[0.. n]. | |
| 132 | --> | |
| 133 | <jm x:invoke | |
| 134 | name ="Catalina :type=Mana ger,path=/ ClusterTes t,host=loc alhost" | |
| 135 | oper ation="lis tSessionId s" | |
| 136 | resu ltproperty ="sessions " | |
| 137 | echo ="false" | |
| 138 | deli miter=" " | |
| 139 | /> | |
| 140 | <!- - Access s ession att ribute < ;em>Hel lo</em& gt; from f irst sessi on. | |
| 141 | --> | |
| 142 | <jm x:invoke | |
| 143 | name ="Catalina :type=Mana ger,path=/ ClusterTes t,host=loc alhost" | |
| 144 | oper ation="get SessionAtt ribute" | |
| 145 | resu ltproperty ="Hello" | |
| 146 | echo ="false" | |
| 147 | > | |
| 148 | < arg value= "${session s.0}"/> | |
| 149 | < arg value= "Hello"/&g t; | |
| 150 | </j mx:invoke& gt; | |
| 151 | <!- - Query fo r all appl ication ma nager.of t he server from all h osts | |
| 152 | and bind all attributes from all found mana ger MBeans . | |
| 153 | --> | |
| 154 | <jm x:query | |
| 155 | name ="Catalina :type=Mana ger,*" | |
| 156 | resu ltproperty ="manager" | |
| 157 | echo ="true" | |
| 158 | attr ibutebindi ng="true" | |
| 159 | /> | |
| 160 | <!- - echo the create pr operties - -> | |
| 161 | <echo&g t; | |
| 162 | senderObje ctNames: $ {senderObj ectNames.0 } | |
| 163 | IDataSende r.backup.c onnected: ${IDataSen der.backup .connected } | |
| 164 | session: $ {sessions. 0} | |
| 165 | manager.le ngth: ${ma nager.leng th} | |
| 166 | manager.0. name: ${ma nager.0.na me} | |
| 167 | manager.1. name: ${ma nager.1.na me} | |
| 168 | hello: ${H ello} | |
| 169 | manager.Cl usterTest. 0.name: ${ manager.Cl usterTest. 0.name} | |
| 170 | manager.Cl usterTest. 0.activeSe ssions: ${ manager.Cl usterTest. 0.activeSe ssions} | |
| 171 | manager.Cl usterTest. 0.counterS end_EVT_SE SSION_EXPI RED: | |
| 172 | ${manager .ClusterTe st.0.count erSend_EVT _SESSION_E XPIRED} | |
| 173 | manager.Cl usterTest. 0.counterS end_EVT_GE T_ALL_SESS IONS: | |
| 174 | ${manager .ClusterTe st.0.count erSend_EVT _GET_ALL_S ESSIONS} | |
| 175 | </echo& gt; | |
| 176 | ||
| 177 | </tar get> | |
| 178 | ||
| 179 | </proje ct> | |
| 180 | </pre> | |
| 181 | </td></ tr> | |
| 182 | </table> | |
| 183 | <p><b>i mport:</b> Import th e JMX Acce ssor Proje ct with | |
| 184 | <em>< ;import fi le="${CATA LINA.HOME} /bin/catal ina-tasks. xml" /> </em> and | |
| 185 | referen ce the tas ks with <e m>jmxOpen< /em>, <em> jmxSet</em >, <em>jmx Get</em>, | |
| 186 | <em>jmx Query</em> , <em>jmxI nvoke</em> , <em>jmxE quals</em> and <em>j mxConditio n</em>.</p > | |
| 187 | ||
| 188 | </blockq uote></td> </tr></tab le><table border="0" cellspaci ng="0" cel lpadding=" 2"><tr><td bgcolor=" #525D76">< font color ="#ffffff" face="ari al,helveti ca.sanseri f"><a name ="JMXAcces sorOpenTas k - JMX op en connect ion task"> <!--()-->< /a><a name ="JMXAcces sorOpenTas k_-_JMX_op en_connect ion_task"> <strong>JM XAccessorO penTask - JMX open c onnection task</stro ng></a></f ont></td>< /tr><tr><t d><blockqu ote> | |
| 189 | <p> | |
| 190 | List of At tributes<b r> | |
| 191 | <table bor der="1" ce llpadding= "5"> | |
| 192 | ||
| 193 | <tr> | |
| 194 | <th al ign="cente r" bgcolor ="aqua">At tribute</t h> | |
| 195 | <th al ign="cente r" bgcolor ="aqua">De scription< /th> | |
| 196 | <th al ign="cente r" bgcolor ="aqua">De fault valu e</th> | |
| 197 | </tr> | |
| 198 | ||
| 199 | <tr> | |
| 200 | <td>ur l</td> | |
| 201 | <td>Se t JMX conn ection URL - <em>ser vice:jmx:r mi:///jndi /rmi://loc alhost:805 0/jmxrmi</ em> | |
| 202 | </td> | |
| 203 | <td></ td> | |
| 204 | </tr> | |
| 205 | ||
| 206 | <tr> | |
| 207 | <td>ho st</td> | |
| 208 | <td>Se t the host , shortcut the very long URL s yntax. | |
| 209 | </td> | |
| 210 | <td><c ode>localh ost</code> </td> | |
| 211 | </tr> | |
| 212 | ||
| 213 | <tr> | |
| 214 | <td>po rt</td> | |
| 215 | <td>Se t the remo te connect ion port | |
| 216 | </td> | |
| 217 | <td><c ode>8050</ code></td> | |
| 218 | </tr> | |
| 219 | ||
| 220 | <tr> | |
| 221 | <td>us ername</td > | |
| 222 | <td>re mote JMX c onnection user name. | |
| 223 | </td> | |
| 224 | <td></ td> | |
| 225 | </tr> | |
| 226 | ||
| 227 | <tr> | |
| 228 | <td>pa ssword</td > | |
| 229 | <td>re mote JMX c onnection password. | |
| 230 | </td> | |
| 231 | <td></ td> | |
| 232 | </tr> | |
| 233 | ||
| 234 | <tr> | |
| 235 | <td>re f</td> | |
| 236 | <td>Na me of the internal c onnection reference. With this attribute you can | |
| 237 | co nfigure mo re the one connectio n inside t he same An t project. | |
| 238 | </td> | |
| 239 | <td><c ode>jmx.se rver</code ></td> | |
| 240 | </tr> | |
| 241 | ||
| 242 | <tr> | |
| 243 | <td>ec ho</td> | |
| 244 | <td>Ec ho the com mand usage (for acce ss analysi s or debug ging) | |
| 245 | </td> | |
| 246 | <td><c ode>false< /code></td > | |
| 247 | </tr> | |
| 248 | ||
| 249 | <tr> | |
| 250 | <td>if </td> | |
| 251 | <td>On ly execute if a prop erty of th e given na me <b>exis ts</b> in the curren t project. | |
| 252 | </td> | |
| 253 | <td></ td> | |
| 254 | </tr> | |
| 255 | ||
| 256 | <tr> | |
| 257 | <td>un less</td> | |
| 258 | <td>On ly execute if a prop erty of th e given na me <b>not exists</b> in the cu rrent proj ect. | |
| 259 | </td> | |
| 260 | <td></ td> | |
| 261 | </tr> | |
| 262 | ||
| 263 | </table> | |
| 264 | </p> | |
| 265 | <p> | |
| 266 | Example to open a ne w JMX conn ection<br> | |
| 267 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 268 | <jmx: open | |
| 269 | host=" ${jmx.serv er.name}" | |
| 270 | port=" ${jmx.serv er.port}" | |
| 271 | /> | |
| 272 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 273 | </p> | |
| 274 | <p> | |
| 275 | Example to open a JM X connecti on from UR L, with au thorizatio n and | |
| 276 | store at o ther refer ence <br> | |
| 277 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 278 | <jmx: open | |
| 279 | url="s ervice:jmx :rmi:///jn di/rmi://l ocalhost:9 024/jmxrmi " | |
| 280 | ref="j mx.server. 9024" | |
| 281 | userna me="contro lRole" | |
| 282 | passwo rd="tomcat " | |
| 283 | /> | |
| 284 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 285 | </p> | |
| 286 | ||
| 287 | <p> | |
| 288 | Example to open a JM X connecti on from UR L, with au thorizatio n and | |
| 289 | store at o ther refer ence, but only when property < em>jmx.if< /em> exist s and | |
| 290 | <em>jmx.un less</em> not exists <br> | |
| 291 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 292 | <jmx: open | |
| 293 | url="s ervice:jmx :rmi:///jn di/rmi://l ocalhost:9 024/jmxrmi " | |
| 294 | ref="j mx.server. 9024" | |
| 295 | userna me="contro lRole" | |
| 296 | passwo rd="tomcat " | |
| 297 | if="jm x.if" | |
| 298 | unless ="jmx.unle ss" | |
| 299 | /> | |
| 300 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 301 | </p> | |
| 302 | <p><b>Note </b>: All properties from <em> jmxOpen</e m> task al so exists at all | |
| 303 | other task s and cond itions. | |
| 304 | </p> | |
| 305 | ||
| 306 | </blockquo te></td></ tr></table ><table bo rder="0" c ellspacing ="0" cellp adding="2" ><tr><td b gcolor="#5 25D76"><fo nt color=" #ffffff" f ace="arial ,helvetica .sanserif" ><a name=" JMXAccesso rGetTask: get attri bute value Ant task" ><!--()--> </a><a nam e="JMXAcce ssorGetTas k:__get_at tribute_va lue_Ant_ta sk"><stron g>JMXAcces sorGetTask : get att ribute val ue Ant tas k</strong> </a></font ></td></tr ><tr><td>< blockquote > | |
| 307 | <p> | |
| 308 | List of At tributes<b r> | |
| 309 | <table bor der="1" ce llpadding= "5"> | |
| 310 | ||
| 311 | <tr> | |
| 312 | <th al ign="cente r" bgcolor ="aqua">At tribute</t h> | |
| 313 | <th al ign="cente r" bgcolor ="aqua">De scription< /th> | |
| 314 | <th al ign="cente r" bgcolor ="aqua">De fault valu e</th> | |
| 315 | </tr> | |
| 316 | ||
| 317 | <tr> | |
| 318 | <td>na me</td> | |
| 319 | <td>Fu ll qualifi ed JMX Obj ectName -- <em>Catal ina:type=S erver</em> | |
| 320 | </td> | |
| 321 | <td></ td> | |
| 322 | </tr> | |
| 323 | ||
| 324 | <tr> | |
| 325 | <td>at tribute</t d> | |
| 326 | <td>Ex isting MBe an attribu te (see To mcat MBean descripti on above) | |
| 327 | </td> | |
| 328 | <td></ td> | |
| 329 | </tr> | |
| 330 | ||
| 331 | <tr> | |
| 332 | <td>re f</td> | |
| 333 | <td>JM X Connecti on referen ce | |
| 334 | </td> | |
| 335 | <td><c ode>jmx.se rver</code ></td> | |
| 336 | </tr> | |
| 337 | ||
| 338 | <tr> | |
| 339 | <td>ec ho</td> | |
| 340 | <td>Ec ho command usage (ac cess and r esult) | |
| 341 | </td> | |
| 342 | <td><c ode>false< /code></td > | |
| 343 | </tr> | |
| 344 | ||
| 345 | <tr> | |
| 346 | <td>re sultproper ty</td> | |
| 347 | <td>Sa ve result at this pr oject prop erty | |
| 348 | </td> | |
| 349 | <td></ td> | |
| 350 | </tr> | |
| 351 | ||
| 352 | <tr> | |
| 353 | <td>de limiter</t d> | |
| 354 | <td>Sp lit result with deli miter (jav a.util.Str ingTokeniz ier) | |
| 355 | an d use resu ltproperty as prefix to store tokens. | |
| 356 | </td> | |
| 357 | <td></ td> | |
| 358 | </tr> | |
| 359 | ||
| 360 | <tr> | |
| 361 | <td>se paratearra yresults</ td> | |
| 362 | <td>Wh en return value is a n array, s ave result as proper ty list | |
| 363 | (<em>$ resultprop erty.[0..N ]</em> and <em>$resu ltproperty .length</e m>) | |
| 364 | </td> | |
| 365 | <td><c ode>true</ code></td> | |
| 366 | </tr> | |
| 367 | ||
| 368 | </table> | |
| 369 | </p> | |
| 370 | <p> | |
| 371 | Example to get remot e MBean at tribute fr om default JMX conne ction <br> | |
| 372 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 373 | <jmx: get | |
| 374 | name=" Catalina:t ype=Manage r,path=/se rvlets-exa mples,host =localhost " | |
| 375 | attrib ute="maxAc tiveSessio ns" | |
| 376 | result property=" servlets-e xamples.ma xActiveSes sions" | |
| 377 | /> | |
| 378 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 379 | </p> | |
| 380 | <p> | |
| 381 | Example to get and r esult arra y and spli t it at se parate pro perties<br > | |
| 382 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 383 | <jmx: get | |
| 384 | name=" Catalina:t ype=Cluste rSender,ho st=localho st" | |
| 385 | attrib ute="sende rObjectNam es" | |
| 386 | result property=" senderObje ctNames" | |
| 387 | /> | |
| 388 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 389 | Access the senderObj ectNames p roperties with: | |
| 390 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 391 | ${sender ObjectName s.length} give the n umber of r eturned se nder list. | |
| 392 | ${sender ObjectName s.[0..N]} found all sender obj ect names | |
| 393 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 394 | </p> | |
| 395 | ||
| 396 | <p> | |
| 397 | Example to get IData Sender att ribute con nected onl y when clu ster is co nfigured.< br> | |
| 398 | <em>Note:< /em> The < code>name< /code> att ribute val ue was wra pped here to be | |
| 399 | more reada ble. It ha s to be al l on the s ame line, without sp aces. | |
| 400 | </p> | |
| 401 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 402 | <jmx: query | |
| 403 | failon error="fal se" | |
| 404 | name=" Catalina:t ype=Cluste r,host=${t omcat.appl ication.ho st}" | |
| 405 | result property=" cluster" | |
| 406 | /> | |
| 407 | <jmx: get | |
| 408 | name= | |
| 409 | "Catalina: type=IData Sender,hos t=${tomcat .applicati on.host}, | |
| 410 | senderAddr ess=${clus ter.backup .address}, senderPort =${cluster .backup.po rt}" | |
| 411 | attrib ute="conne cted" | |
| 412 | result property=" datasender .connected " | |
| 413 | if="cl uster.0.na me" /> | |
| 414 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 415 | ||
| 416 | ||
| 417 | </blockquo te></td></ tr></table ><table bo rder="0" c ellspacing ="0" cellp adding="2" ><tr><td b gcolor="#5 25D76"><fo nt color=" #ffffff" f ace="arial ,helvetica .sanserif" ><a name=" JMXAccesso rSetTask: set attri bute value Ant task" ><!--()--> </a><a nam e="JMXAcce ssorSetTas k:__set_at tribute_va lue_Ant_ta sk"><stron g>JMXAcces sorSetTask : set att ribute val ue Ant tas k</strong> </a></font ></td></tr ><tr><td>< blockquote > | |
| 418 | <p> | |
| 419 | List of At tributes<b r> | |
| 420 | <table bor der="1" ce llpadding= "5"> | |
| 421 | ||
| 422 | <tr> | |
| 423 | <th al ign="cente r" bgcolor ="aqua">At tribute</t h> | |
| 424 | <th al ign="cente r" bgcolor ="aqua">De scription< /th> | |
| 425 | <th al ign="cente r" bgcolor ="aqua">De fault valu e</th> | |
| 426 | </tr> | |
| 427 | ||
| 428 | <tr> | |
| 429 | <td>na me</td> | |
| 430 | <td>Fu ll qualifi ed JMX Obj ectName -- <em>Catal ina:type=S erver</em> | |
| 431 | </td> | |
| 432 | <td></ td> | |
| 433 | </tr> | |
| 434 | ||
| 435 | <tr> | |
| 436 | <td>at tribute</t d> | |
| 437 | <td>Ex isting MBe an attribu te (see To mcat MBean descripti on above) | |
| 438 | </td> | |
| 439 | <td></ td> | |
| 440 | </tr> | |
| 441 | ||
| 442 | <tr> | |
| 443 | <td>va lue</td> | |
| 444 | <td>va lue that s et to attr ibute | |
| 445 | </td> | |
| 446 | <td></ td> | |
| 447 | </tr> | |
| 448 | ||
| 449 | <tr> | |
| 450 | <td>ty pe</td> | |
| 451 | <td>ty pe of the attribute. | |
| 452 | </td> | |
| 453 | <td>ja va.lang.St ring</td> | |
| 454 | </tr> | |
| 455 | ||
| 456 | <tr> | |
| 457 | <td>re f</td> | |
| 458 | <td>JM X Connecti on referen ce | |
| 459 | </td> | |
| 460 | <td><c ode>jmx.se rver</code ></td> | |
| 461 | </tr> | |
| 462 | ||
| 463 | <tr> | |
| 464 | <td>ec ho</td> | |
| 465 | <td>Ec ho command usage (ac cess and r esult) | |
| 466 | </td> | |
| 467 | <td><c ode>false< /code></td > | |
| 468 | </tr> | |
| 469 | ||
| 470 | </table> | |
| 471 | </p> | |
| 472 | <p> | |
| 473 | Example to set remot e MBean at tribute va lue<br> | |
| 474 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 475 | <jmx: set | |
| 476 | name=" Catalina:t ype=Manage r,path=/se rvlets-exa mples,host =localhost " | |
| 477 | attrib ute="maxAc tiveSessio ns" | |
| 478 | value= "500" | |
| 479 | type=" int" | |
| 480 | /> | |
| 481 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 482 | </p> | |
| 483 | ||
| 484 | </blockquo te></td></ tr></table ><table bo rder="0" c ellspacing ="0" cellp adding="2" ><tr><td b gcolor="#5 25D76"><fo nt color=" #ffffff" f ace="arial ,helvetica .sanserif" ><a name=" JMXAccesso rInvokeTas k: invoke MBean ope ration Ant task"><!- -()--></a> <a name="J MXAccessor InvokeTask :__invoke_ MBean_oper ation_Ant_ task"><str ong>JMXAcc essorInvok eTask: in voke MBean operation Ant task< /strong></ a></font>< /td></tr>< tr><td><bl ockquote> | |
| 485 | <p> | |
| 486 | List of At tributes<b r> | |
| 487 | <table bor der="1" ce llpadding= "5"> | |
| 488 | ||
| 489 | <tr> | |
| 490 | <th al ign="cente r" bgcolor ="aqua">At tribute</t h> | |
| 491 | <th al ign="cente r" bgcolor ="aqua">De scription< /th> | |
| 492 | <th al ign="cente r" bgcolor ="aqua">De fault valu e</th> | |
| 493 | </tr> | |
| 494 | ||
| 495 | <tr> | |
| 496 | <td>na me</td> | |
| 497 | <td>Fu ll qualifi ed JMX Obj ectName -- <em>Catal ina:type=S erver</em> | |
| 498 | </td> | |
| 499 | <td></ td> | |
| 500 | </tr> | |
| 501 | ||
| 502 | <tr> | |
| 503 | <td>op eration</t d> | |
| 504 | <td>Ex isting MBe an operati on (see To mcat | |
| 505 | <a href="fun cspecs/fs- admin-oper s.html">fu ncspecs/fs -admin-ope rs.html</a >). | |
| 506 | </td> | |
| 507 | <td></ td> | |
| 508 | </tr> | |
| 509 | ||
| 510 | <tr> | |
| 511 | <td>re f</td> | |
| 512 | <td>JM X Connecti on referen ce | |
| 513 | </td> | |
| 514 | <td><c ode>jmx.se rver</code ></td> | |
| 515 | </tr> | |
| 516 | ||
| 517 | <tr> | |
| 518 | <td>ec ho</td> | |
| 519 | <td>Ec ho command usage (ac cess and r esult) | |
| 520 | </td> | |
| 521 | <td><c ode>false< /code></td > | |
| 522 | </tr> | |
| 523 | ||
| 524 | <tr> | |
| 525 | <td>re sultproper ty</td> | |
| 526 | <td>Sa ve result at this pr oject prop erty | |
| 527 | </td> | |
| 528 | <td></ td> | |
| 529 | </tr> | |
| 530 | ||
| 531 | <tr> | |
| 532 | <td>de limiter</t d> | |
| 533 | <td>Sp lit result with deli miter (jav a.util.Str ingTokeniz ier) | |
| 534 | an d use resu ltproperty as prefix to store tokens. | |
| 535 | </td> | |
| 536 | <td></ td> | |
| 537 | </tr> | |
| 538 | ||
| 539 | <tr> | |
| 540 | <td>se paratearra yresults</ td> | |
| 541 | <td>Wh en return value is a n array, s ave result as proper ty list | |
| 542 | (<em>$ resultprop erty.[0..N ]</em> and <em>$resu ltproperty .length</e m>) | |
| 543 | </td> | |
| 544 | <td><c ode>true</ code></td> | |
| 545 | </tr> | |
| 546 | ||
| 547 | </table> | |
| 548 | </p> | |
| 549 | <p> | |
| 550 | stop an ap plication <br> | |
| 551 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 552 | <jmx: invoke | |
| 553 | name=" Catalina:t ype=Manage r,path=/se rvlets-exa mples,host =localhost " | |
| 554 | operat ion="stop" /> | |
| 555 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 556 | Now you ca n find the sessionid at <em>${ sessions.[ 0..N}</em> propertie s and acce ss the cou nt | |
| 557 | with ${ses sions.leng th} proper ty. | |
| 558 | </p> | |
| 559 | <p> | |
| 560 | Example to get all s essionids <br> | |
| 561 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 562 | <jmx: invoke | |
| 563 | name=" Catalina:t ype=Manage r,path=/se rvlets-exa mples,host =localhost " | |
| 564 | operat ion="listS essionIds" | |
| 565 | result property=" sessions" | |
| 566 | delimi ter=" " | |
| 567 | /> | |
| 568 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 569 | Now you ca n find the sessionid at <em>${ sessions.[ 0..N}</em> propertie s and acce ss the cou nt | |
| 570 | with ${ses sions.leng th} proper ty. | |
| 571 | </p> | |
| 572 | <p> | |
| 573 | Example to get remot e MBean se ssion attr ibute from session $ {sessionid .0}<br> | |
| 574 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 575 | <jmx: invoke | |
| 576 | name=" Catalina:t ype=Manage r,path=/Cl usterTest, host=local host" | |
| 577 | operat ion="getSe ssionAttri bute" | |
| 578 | result property=" hello"> | |
| 579 | <a rg value=" ${sessioni d.0}"/> | |
| 580 | <a rg value=" Hello" /&g t; | |
| 581 | </jmx :invoke> ; | |
| 582 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 583 | </p> | |
| 584 | <p> | |
| 585 | Example to create a new access logger va lve at vho st <em>loc alhost</em > | |
| 586 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 587 | <jmx:i nvoke | |
| 588 | n ame="Catal ina:type=M BeanFactor y" | |
| 589 | o peration=" createAcce ssLoggerVa lve" | |
| 590 | r esultprope rty="acces sLoggerObj ectName" | |
| 591 | > | |
| 592 | <a rg value=" Catalina:t ype=Host,h ost=localh ost"/> | |
| 593 | </jmx: invoke> | |
| 594 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 595 | Now you ca n find new MBean wit h name sto red at <em >${accessL oggerObjec tName}</em > | |
| 596 | property. | |
| 597 | </p> | |
| 598 | ||
| 599 | </blockquo te></td></ tr></table ><table bo rder="0" c ellspacing ="0" cellp adding="2" ><tr><td b gcolor="#5 25D76"><fo nt color=" #ffffff" f ace="arial ,helvetica .sanserif" ><a name=" JMXAccesso rQueryTask : query M Bean Ant t ask"><!--( )--></a><a name="JMX AccessorQu eryTask:__ query_MBea n_Ant_task "><strong> JMXAccesso rQueryTask : query M Bean Ant t ask</stron g></a></fo nt></td></ tr><tr><td ><blockquo te> | |
| 600 | <p> | |
| 601 | List of At tributes<b r> | |
| 602 | <table bor der="1" ce llpadding= "5"> | |
| 603 | ||
| 604 | <tr> | |
| 605 | <th al ign="cente r" bgcolor ="aqua">At tribute</t h> | |
| 606 | <th al ign="cente r" bgcolor ="aqua">De scription< /th> | |
| 607 | <th al ign="cente r" bgcolor ="aqua">De fault valu e</th> | |
| 608 | </tr> | |
| 609 | ||
| 610 | <tr> | |
| 611 | <td>na me</td> | |
| 612 | <td>JM X ObjectN ame query string -- <em>Catali na:type=Ma nager,*</e m> | |
| 613 | </td> | |
| 614 | <td></ td> | |
| 615 | </tr> | |
| 616 | ||
| 617 | <tr> | |
| 618 | <td>re f</td> | |
| 619 | <td>JM X Connecti on referen ce | |
| 620 | </td> | |
| 621 | <td><c ode>jmx.se rver</code ></td> | |
| 622 | </tr> | |
| 623 | ||
| 624 | <tr> | |
| 625 | <td>ec ho</td> | |
| 626 | <td>Ec ho command usage (ac cess and r esult) | |
| 627 | </td> | |
| 628 | <td><c ode>false< /code></td > | |
| 629 | </tr> | |
| 630 | ||
| 631 | <tr> | |
| 632 | <td>re sultproper ty</td> | |
| 633 | <td>Pr efix proje ct propert y name to all founde d MBeans ( <em>mbeans .[0..N].ob jectname</ em>) | |
| 634 | </td> | |
| 635 | <td></ td> | |
| 636 | </tr> | |
| 637 | ||
| 638 | <tr> | |
| 639 | <td>at tributebin duing</td> | |
| 640 | <td>bi nd ALL MBe an attribu tes in add ition to < em>name</e m> | |
| 641 | </td> | |
| 642 | <td><c ode>false< /code></td > | |
| 643 | </tr> | |
| 644 | ||
| 645 | <tr> | |
| 646 | <td>de limiter</t d> | |
| 647 | <td>Sp lit result with deli miter (jav a.util.Str ingTokeniz ier) | |
| 648 | an d use resu ltproperty as prefix to store tokens. | |
| 649 | </td> | |
| 650 | <td></ td> | |
| 651 | </tr> | |
| 652 | ||
| 653 | <tr> | |
| 654 | <td>se paratearra yresults</ td> | |
| 655 | <td>Wh en return value is a n array, s ave result as proper ty list | |
| 656 | (<em>$ resultprop erty.[0..N ]</em> and <em>$resu ltproperty .length</e m>) | |
| 657 | </td> | |
| 658 | <td><c ode>true</ code></td> | |
| 659 | </tr> | |
| 660 | ||
| 661 | </table> | |
| 662 | </p> | |
| 663 | <p> | |
| 664 | Get all Ma nager Obje ctNames fr om all ser vices and Hosts <br> | |
| 665 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 666 | <jmx: query | |
| 667 | name=" Catalina:t ype=Manage r,* | |
| 668 | result property=" manager" / > | |
| 669 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 670 | Now you ca n find the Session M anager at <em>${mana ger.[0..N] .name}</em > | |
| 671 | properties and acces s the resu lt object counter wi th ${manag er.length} property. | |
| 672 | </p> | |
| 673 | <p> | |
| 674 | Example to get the M anager fro m <em>serv let-exampl es</em> ap plication an bind al l MBean pr operties<b r> | |
| 675 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 676 | <jmx: query | |
| 677 | name=" Catalina:t ype=Manage r,path=/se rvlet-exam ples,host= localhost* " | |
| 678 | attrib utebinding ="true" | |
| 679 | result property=" manager.se rvletExamp les" /> | |
| 680 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 681 | Now you ca n find the manager a t <em>${ma nager.serv letExample s.0.name}< /em> prope rty | |
| 682 | and can ac cess all p roperties from this manager wi th <em>${m anager.ser vletExampl es.0.[mana ger attrib ute names] </em>}. | |
| 683 | The result object co unter from MBeans is stored ad ${manager .length} p roperty. | |
| 684 | </p> | |
| 685 | ||
| 686 | <p> | |
| 687 | Example to get all M Beans from a server and store inside an external X ML propert y file<br> | |
| 688 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 689 | <projec t name="jm x.query" | |
| 690 | xmlns:jm x="antlib: org.apache .catalina. ant.jmx" | |
| 691 | default= "query-all " basedir= "."> | |
| 692 | <proper ty name="j mx.host" v alue="loca lhost"/> ; | |
| 693 | <proper ty name="j mx.port" v alue="8050 "/> | |
| 694 | <proper ty name="j mx.usernam e" value=" controlRol e"/> | |
| 695 | <proper ty name="j mx.passwor d" value=" tomcat"/&g t; | |
| 696 | ||
| 697 | <target name="que ry-all" de scription= "Query all MBeans of a server" > | |
| 698 | <!-- Configure connection --> | |
| 699 | <jmx: open | |
| 700 | host=" ${jmx.host }" | |
| 701 | port=" ${jmx.port }" | |
| 702 | ref="j mx.server" | |
| 703 | userna me="${jmx. username}" | |
| 704 | passwo rd="${jmx. password}" /> | |
| 705 | <!-- Query MBea n list --& gt; | |
| 706 | <jmx: query | |
| 707 | name=" *:*" | |
| 708 | result property=" mbeans" | |
| 709 | attrib utebinding ="false"/& gt; | |
| 710 | ||
| 711 | <echo properties | |
| 712 | destfi le="mbeans .propertie s" | |
| 713 | prefix ="mbeans." | |
| 714 | format ="xml"/> ; | |
| 715 | ||
| 716 | <!-- Print resu lts --> | |
| 717 | <echo message= | |
| 718 | "Numbe r of MBean s in serve r ${jmx.ho st}:${jmx. port} is $ {mbeans.le ngth}"/> ; | |
| 719 | </targe t> | |
| 720 | </proje ct> | |
| 721 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 722 | Now you ca n find all MBeans in side the f ile <em>mb eans.prope rties</em> . | |
| 723 | </p> | |
| 724 | ||
| 725 | </blockquo te></td></ tr></table ><table bo rder="0" c ellspacing ="0" cellp adding="2" ><tr><td b gcolor="#5 25D76"><fo nt color=" #ffffff" f ace="arial ,helvetica .sanserif" ><a name=" JMXAccesso rCreateTas k: remote create MB ean Ant ta sk"><!--() --></a><a name="JMXA ccessorCre ateTask:__ remote_cre ate_MBean_ Ant_task"> <strong>JM XAccessorC reateTask: remote c reate MBea n Ant task </strong>< /a></font> </td></tr> <tr><td><b lockquote> | |
| 726 | <p> | |
| 727 | List of At tributes<b r> | |
| 728 | <table bor der="1" ce llpadding= "5"> | |
| 729 | ||
| 730 | <tr> | |
| 731 | <th al ign="cente r" bgcolor ="aqua">At tribute</t h> | |
| 732 | <th al ign="cente r" bgcolor ="aqua">De scription< /th> | |
| 733 | <th al ign="cente r" bgcolor ="aqua">De fault valu e</th> | |
| 734 | </tr> | |
| 735 | ||
| 736 | <tr> | |
| 737 | <td>na me</td> | |
| 738 | <td>Fu ll qualifi ed JMX Obj ectName -- <em>Catal ina:type=M BeanFactor y</em> | |
| 739 | </td> | |
| 740 | <td></ td> | |
| 741 | </tr> | |
| 742 | ||
| 743 | <tr> | |
| 744 | <td>cl assName</t d> | |
| 745 | <td>Ex isting MBe an full qu alified cl ass name ( see Tomcat MBean des cription a bove) | |
| 746 | </td> | |
| 747 | <td></ td> | |
| 748 | </tr> | |
| 749 | ||
| 750 | <tr> | |
| 751 | <td>cl assLoader< /td> | |
| 752 | <td>Ob jectName o f server o r web appl ication cl assloader <br> | |
| 753 | ( <em> Catalina:t ype=Server ClassLoade r,name=[se rver,commo n,shared]< /em> or<br > | |
| 754 | <em>C atalina:ty pe=WebappC lassLoader ,path=/mya pps,host=l ocalhost</ em>) | |
| 755 | </td> | |
| 756 | <td></ td> | |
| 757 | </tr> | |
| 758 | ||
| 759 | <tr> | |
| 760 | <td>re f</td> | |
| 761 | <td>JM X Connecti on referen ce | |
| 762 | </td> | |
| 763 | <td><c ode>jmx.se rver</code ></td> | |
| 764 | </tr> | |
| 765 | ||
| 766 | <tr> | |
| 767 | <td>ec ho</td> | |
| 768 | <td>Ec ho command usage (ac cess and r esult) | |
| 769 | </td> | |
| 770 | <td><c ode>false< /code></td > | |
| 771 | </tr> | |
| 772 | ||
| 773 | </table> | |
| 774 | </p> | |
| 775 | <p> | |
| 776 | Example to create re mote MBean <br> | |
| 777 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 778 | <jmx: create | |
| 779 | ref="$ {jmx.refer ence}" | |
| 780 | name=" Catalina:t ype=MBeanF actory" | |
| 781 | classN ame="org.a pache.comm ons.modele r.BaseMode lMBean" | |
| 782 | classL oader="Cat alina:type =ServerCla ssLoader,n ame=server "> | |
| 783 | <ar g value="o rg.apache. catalina.m beans.MBea nFactory" /> | |
| 784 | </jmx :create> ; | |
| 785 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 786 | </p> | |
| 787 | <p> | |
| 788 | <b>War ning</b>: Many Tomca t MBeans c an't be li nked to th eir parent once<br> | |
| 789 | create d. The Val ve, Cluste r and Real m MBeans a re not aut omatically <br> | |
| 790 | connec ted with t heir paren t. Use the <em>MBean Facrory</e m> create< br> | |
| 791 | operat ion instea d. | |
| 792 | </p> | |
| 793 | ||
| 794 | </blockquo te></td></ tr></table ><table bo rder="0" c ellspacing ="0" cellp adding="2" ><tr><td b gcolor="#5 25D76"><fo nt color=" #ffffff" f ace="arial ,helvetica .sanserif" ><a name=" JMXAccesso rUnregiste rTask: re mote unreg ister MBea n Ant task "><!--()-- ></a><a na me="JMXAcc essorUnreg isterTask: __remote_u nregister_ MBean_Ant_ task"><str ong>JMXAcc essorUnreg isterTask: remote u nregister MBean Ant task</stro ng></a></f ont></td>< /tr><tr><t d><blockqu ote> | |
| 795 | <p> | |
| 796 | List of At tributes<b r> | |
| 797 | <table bor der="1" ce llpadding= "5"> | |
| 798 | ||
| 799 | <tr> | |
| 800 | <th al ign="cente r" bgcolor ="aqua">At tribute</t h> | |
| 801 | <th al ign="cente r" bgcolor ="aqua">De scription< /th> | |
| 802 | <th al ign="cente r" bgcolor ="aqua">De fault valu e</th> | |
| 803 | </tr> | |
| 804 | ||
| 805 | <tr> | |
| 806 | <td>na me</td> | |
| 807 | <td>Fu ll qualifi ed JMX Obj ectName -- <em>Catal ina:type=M BeanFactor y</em> | |
| 808 | </td> | |
| 809 | <td></ td> | |
| 810 | </tr> | |
| 811 | ||
| 812 | <tr> | |
| 813 | <td>re f</td> | |
| 814 | <td>JM X Connecti on referen ce | |
| 815 | </td> | |
| 816 | <td><c ode>jmx.se rver</code ></td> | |
| 817 | </tr> | |
| 818 | ||
| 819 | <tr> | |
| 820 | <td>ec ho</td> | |
| 821 | <td>Ec ho command usage (ac cess and r esult) | |
| 822 | </td> | |
| 823 | <td><c ode>false< /code></td > | |
| 824 | </tr> | |
| 825 | ||
| 826 | </table> | |
| 827 | </p> | |
| 828 | <p> | |
| 829 | Example to unregiste r remote M Bean<br> | |
| 830 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 831 | <jmx: unregister | |
| 832 | name=" Catalina:t ype=MBeanF actory" | |
| 833 | /> | |
| 834 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 835 | </p> | |
| 836 | <p> | |
| 837 | <b>War ning</b>: A lot of T omcat MBea ns can't b e unregist er.<br> | |
| 838 | The MB eans are n ot unlinke d from the ir parent. Use <em>M BeanFacror y</em><br> | |
| 839 | remove operation instead. | |
| 840 | </p> | |
| 841 | ||
| 842 | </blockquo te></td></ tr></table ><table bo rder="0" c ellspacing ="0" cellp adding="2" ><tr><td b gcolor="#5 25D76"><fo nt color=" #ffffff" f ace="arial ,helvetica .sanserif" ><a name=" JMXAccesso rCondition : express condition "><!--()-- ></a><a na me="JMXAcc essorCondi tion:__exp ress_condi tion"><str ong>JMXAcc essorCondi tion: exp ress condi tion</stro ng></a></f ont></td>< /tr><tr><t d><blockqu ote> | |
| 843 | <p> | |
| 844 | List of At tributes<b r> | |
| 845 | <table bor der="1" ce llpadding= "5"> | |
| 846 | ||
| 847 | <tr> | |
| 848 | <th al ign="cente r" bgcolor ="aqua">At tribute</t h> | |
| 849 | <th al ign="cente r" bgcolor ="aqua">De scription< /th> | |
| 850 | <th al ign="cente r" bgcolor ="aqua">De fault valu e</th> | |
| 851 | </tr> | |
| 852 | ||
| 853 | <tr> | |
| 854 | <td>ur l</td> | |
| 855 | <td>Se t JMX conn ection URL - <em>ser vice:jmx:r mi:///jndi /rmi://loc alhost:805 0/jmxrmi</ em> | |
| 856 | </td> | |
| 857 | <td></ td> | |
| 858 | </tr> | |
| 859 | ||
| 860 | <tr> | |
| 861 | <td>ho st</td> | |
| 862 | <td>Se t the host , shortcut the very long URL s yntax. | |
| 863 | </td> | |
| 864 | <td><c ode>localh ost</code> </td> | |
| 865 | </tr> | |
| 866 | ||
| 867 | <tr> | |
| 868 | <td>po rt</td> | |
| 869 | <td>Se t the remo te connect ion port | |
| 870 | </td> | |
| 871 | <td><c ode>8050</ code></td> | |
| 872 | </tr> | |
| 873 | ||
| 874 | <tr> | |
| 875 | <td>us ername</td > | |
| 876 | <td>re mote JMX c onnection user name. | |
| 877 | </td> | |
| 878 | <td></ td> | |
| 879 | </tr> | |
| 880 | ||
| 881 | <tr> | |
| 882 | <td>pa ssword</td > | |
| 883 | <td>re mote JMX c onnection password. | |
| 884 | </td> | |
| 885 | <td></ td> | |
| 886 | </tr> | |
| 887 | ||
| 888 | <tr> | |
| 889 | <td>re f</td> | |
| 890 | <td>Na me of the internal c onnection reference. With this attribute you can | |
| 891 | co nfigure mo re the one connectio n inside t he same An t project. | |
| 892 | </td> | |
| 893 | <td><c ode>jmx.se rver</code ></td> | |
| 894 | </tr> | |
| 895 | ||
| 896 | <tr> | |
| 897 | <td>na me</td> | |
| 898 | <td>Fu ll qualifi ed JMX Obj ectName -- <em>Catal ina:type=S erver</em> | |
| 899 | </td> | |
| 900 | <td></ td> | |
| 901 | </tr> | |
| 902 | ||
| 903 | <tr> | |
| 904 | <td>ec ho</td> | |
| 905 | <td>Ec ho conditi on usage ( access and result) | |
| 906 | </td> | |
| 907 | <td><c ode>false< /code></td > | |
| 908 | </tr> | |
| 909 | ||
| 910 | <tr> | |
| 911 | <td>if </td> | |
| 912 | <td>On ly execute if a prop erty of th e given na me <b>exis ts</b> in the curren t project. | |
| 913 | </td> | |
| 914 | <td></ td> | |
| 915 | </tr> | |
| 916 | ||
| 917 | <tr> | |
| 918 | <td>un less</td> | |
| 919 | <td>On ly execute if a prop erty of th e given na me <b>not exists</b> in the cu rrent proj ect. | |
| 920 | </td> | |
| 921 | <td></ td> | |
| 922 | </tr> | |
| 923 | ||
| 924 | <tr> | |
| 925 | <td>va lue (requi ered)</td> | |
| 926 | <td>Se cond arg f or operati on | |
| 927 | </td> | |
| 928 | <td></ td> | |
| 929 | </tr> | |
| 930 | ||
| 931 | <tr> | |
| 932 | <td>ty pe</td> | |
| 933 | <td>Va lue type t o express operation (support < em>long</e m> and <em >double</e m>) | |
| 934 | </td> | |
| 935 | <td><c ode>long</ code></td> | |
| 936 | </tr> | |
| 937 | ||
| 938 | <tr> | |
| 939 | <td>op eration</t d> | |
| 940 | <td> e xpress one | |
| 941 | <ul> | |
| 942 | <li>== equals</ li> | |
| 943 | <li>!= not equa ls</li> | |
| 944 | <li>&g t; greater than (&am p;gt;)</li > | |
| 945 | <li>&g t;= greate r than or equals (&a mp;gt;=)</ li> | |
| 946 | <li>&l t; lesser than (& ;lt;)</li> | |
| 947 | <li>&l t;= lesser than or e quals (&am p;lt;=)</l i> | |
| 948 | </ul> | |
| 949 | </td> | |
| 950 | <td><c ode>==</co de></td> | |
| 951 | </tr> | |
| 952 | ||
| 953 | </table> | |
| 954 | </p> | |
| 955 | <p> | |
| 956 | Wait for s erver conn ection and that clus ter backup node is a ccessable< br> | |
| 957 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 958 | <target name="wai t"> | |
| 959 | <wai tfor maxwa it="${maxw ait}" maxw aitunit="s econd" tim eoutproper ty="server .timeout" > | |
| 960 | <a nd> | |
| 961 | < ;socket se rver="${se rver.name} " port="${ server.por t}"/> | |
| 962 | < ;http url= "${url}"/& gt; | |
| 963 | < ;jmx:condi tion | |
| 964 | o peration=" ==" | |
| 965 | h ost="local host" | |
| 966 | p ort="9014" | |
| 967 | u sername="c ontrolRole " | |
| 968 | p assword="t omcat" | |
| 969 | n ame= | |
| 970 | "Catalina: type=IData Sender,hos t=localhos t,senderAd dress= IP ,senderPor t= PORT " | |
| 971 | a ttribute=" connected" | |
| 972 | v alue="true " | |
| 973 | /&g t; | |
| 974 | </a nd> | |
| 975 | </wai tfor> | |
| 976 | <fail if="serve r.timeout" message=" Server ${u rl} don't answer ins ide ${maxw ait} sec" /> | |
| 977 | <echo message=" Server ${u rl} alive" /> | |
| 978 | </targe t> | |
| 979 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 980 | </p> | |
| 981 | ||
| 982 | </blockquo te></td></ tr></table ><table bo rder="0" c ellspacing ="0" cellp adding="2" ><tr><td b gcolor="#5 25D76"><fo nt color=" #ffffff" f ace="arial ,helvetica .sanserif" ><a name=" JMXAccesso rEqualsCon dition: e quals MBea n Ant cond ition"><!- -()--></a> <a name="J MXAccessor EqualsCond ition:__eq uals_MBean _Ant_condi tion"><str ong>JMXAcc essorEqual sCondition : equals MBean Ant condition< /strong></ a></font>< /td></tr>< tr><td><bl ockquote> | |
| 983 | <p> | |
| 984 | List of At tributes<b r> | |
| 985 | <table bor der="1" ce llpadding= "5"> | |
| 986 | ||
| 987 | <tr> | |
| 988 | <th al ign="cente r" bgcolor ="aqua">At tribute</t h> | |
| 989 | <th al ign="cente r" bgcolor ="aqua">De scription< /th> | |
| 990 | <th al ign="cente r" bgcolor ="aqua">De fault valu e</th> | |
| 991 | </tr> | |
| 992 | ||
| 993 | <tr> | |
| 994 | <td>ur l</td> | |
| 995 | <td>Se t JMX conn ection URL - <em>ser vice:jmx:r mi:///jndi /rmi://loc alhost:805 0/jmxrmi</ em> | |
| 996 | </td> | |
| 997 | <td></ td> | |
| 998 | </tr> | |
| 999 | ||
| 1000 | <tr> | |
| 1001 | <td>ho st</td> | |
| 1002 | <td>Se t the host , shortcut the very long URL s yntax. | |
| 1003 | </td> | |
| 1004 | <td><c ode>localh ost</code> </td> | |
| 1005 | </tr> | |
| 1006 | ||
| 1007 | <tr> | |
| 1008 | <td>po rt</td> | |
| 1009 | <td>Se t the remo te connect ion port | |
| 1010 | </td> | |
| 1011 | <td><c ode>8050</ code></td> | |
| 1012 | </tr> | |
| 1013 | ||
| 1014 | <tr> | |
| 1015 | <td>us ername</td > | |
| 1016 | <td>re mote JMX c onnection user name. | |
| 1017 | </td> | |
| 1018 | <td></ td> | |
| 1019 | </tr> | |
| 1020 | ||
| 1021 | <tr> | |
| 1022 | <td>pa ssword</td > | |
| 1023 | <td>re mote JMX c onnection password. | |
| 1024 | </td> | |
| 1025 | <td></ td> | |
| 1026 | </tr> | |
| 1027 | ||
| 1028 | <tr> | |
| 1029 | <td>re f</td> | |
| 1030 | <td>Na me of the internal c onnection reference. With this attribute you can | |
| 1031 | co nfigure mo re the one connectio n inside t he same An t project. | |
| 1032 | </td> | |
| 1033 | <td><c ode>jmx.se rver</code ></td> | |
| 1034 | </tr> | |
| 1035 | ||
| 1036 | <tr> | |
| 1037 | <td>na me</td> | |
| 1038 | <td>Fu ll qualifi ed JMX Obj ectName -- <em>Catal ina:type=S erver</em> | |
| 1039 | </td> | |
| 1040 | <td></ td> | |
| 1041 | </tr> | |
| 1042 | ||
| 1043 | ||
| 1044 | <tr> | |
| 1045 | <td>ec ho</td> | |
| 1046 | <td>Ec ho conditi on usage ( access and result) | |
| 1047 | </td> | |
| 1048 | <td><c ode>false< /code></td > | |
| 1049 | </tr> | |
| 1050 | ||
| 1051 | </table> | |
| 1052 | </p> | |
| 1053 | <p> | |
| 1054 | Wait for s erver conn ection and that clus ter backup node is a ccessible< br> | |
| 1055 | <div align ="left"><t able cells pacing="4" cellpaddi ng="0" bor der="0"><t r><td bgco lor="#0232 64" width= "1" height ="1"><img src="./ima ges/void.g if" alt="" width="1" height="1 " vspace=" 0" hspace= "0" border ="0"></td> <td bgcolo r="#023264 " height=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td><t d bgcolor= "#023264" width="1" height="1" ><img src= "./images/ void.gif" alt="" wid th="1" hei ght="1" vs pace="0" h space="0" border="0" ></td></tr ><tr><td b gcolor="#0 23264" wid th="1"><im g src="./i mages/void .gif" alt= "" width=" 1" height= "1" vspace ="0" hspac e="0" bord er="0"></t d><td bgco lor="#ffff ff" height ="1"><pre> | |
| 1056 | <target name="wai t"> | |
| 1057 | <wait for maxwai t="${maxwa it}" maxwa itunit="se cond" time outpropert y="server. timeout" & gt; | |
| 1058 | <an d> | |
| 1059 | < socket ser ver="${ser ver.name}" port="${s erver.port }"/> | |
| 1060 | < http url=" ${url}"/&g t; | |
| 1061 | < jmx:equals | |
| 1062 | ho st="localh ost" | |
| 1063 | po rt="9014" | |
| 1064 | us ername="co ntrolRole" | |
| 1065 | pa ssword="to mcat" | |
| 1066 | na me= | |
| 1067 | "Catalina: type=IData Sender,hos t=localhos t,senderAd dress= IP ,senderPor t= PORT " | |
| 1068 | at tribute="c onnected" | |
| 1069 | va lue="true" | |
| 1070 | /> ; | |
| 1071 | </a nd> | |
| 1072 | </wai tfor> | |
| 1073 | <fail if="serve r.timeout" message=" Server ${u rl} don't answer ins ide ${maxw ait} sec" /> | |
| 1074 | <echo message=" Server ${u rl} alive" /> | |
| 1075 | </targe t> | |
| 1076 | </pre></td ><td bgcol or="#02326 4" width=" 1"><img sr c="./image s/void.gif " alt="" w idth="1" h eight="1" vspace="0" hspace="0 " border=" 0"></td></ tr><tr><td bgcolor=" #023264" w idth="1" h eight="1"> <img src=" ./images/v oid.gif" a lt="" widt h="1" heig ht="1" vsp ace="0" hs pace="0" b order="0"> </td><td b gcolor="#0 23264" hei ght="1"><i mg src="./ images/voi d.gif" alt ="" width= "1" height ="1" vspac e="0" hspa ce="0" bor der="0"></ td><td bgc olor="#023 264" width ="1" heigh t="1"><img src="./im ages/void. gif" alt=" " width="1 " height=" 1" vspace= "0" hspace ="0" borde r="0"></td ></tr></ta ble></div> | |
| 1077 | </p> | |
| 1078 | ||
| 1079 | </blockquo te></td></ tr></table ></td></tr ><!--FOOTE R SEPARATO R--><tr><t d colspan= "2"><hr no shade="nos hade" size ="1"></td> </tr><!--P AGE FOOTER --><tr><td colspan=" 2"><div al ign="cente r"><font c olor="#525 D76" size= "-1"><em> | |
| 1080 | Co pyright &c opy; 1999- 2013, Apac he Softwar e Foundati on | |
| 1081 | </ em></font> </div></td ></tr></ta ble></body ></html> |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.