Dear Wiki user,

You have subscribed to a wiki page or wiki category on "James Wiki" for change 
notification.

The following page has been changed by BerndFondermann:
http://wiki.apache.org/james/ConfigureJmx

------------------------------------------------------------------------------
  
  To enable JMX you will need a running James instance (see JamesQuickstart).
  
- = Configuring James =
+ = Make James publish managed components =
  
- go to the home directory of your James installation and edit conf/kernel.xml
+ JMX uses a so called ''MBean server'', which makes managed components 
available for you to access.
+ 
+ James is able to (a) start it's own MBean server or (b) use an already 
running MBean server.
+ You'll probably want to do (a) under JDK 1.4.
+ 
+ == Use James' built-in MBean server ==
+ 
+ If you want to make James start its own MBean Server, go to the home 
directory of your James installation and edit conf/kernel.xml
  
  change
  
@@ -72, +79 @@

          </component>
  }}}
  
- Restart James now, it should come up like always, only now in addition to the 
other ports also binding to port 1099.
+ Restart James now, it should come up like always, only now binding to port 
1099, in addition to the other ports.
+ 
+ == Use existing MBeans server ==
+ 
+ If you are running under Java SE 5 or newer, the virtual machine incorporates 
capabilities to start its own MBean server.
+ [http://java.sun.com/j2se/1.5.0/docs/guide/jmx/index.html]
+ 
+ The advantage of this setup is that the JVM itself publishes additional 
useful MBeans. This is used, for example, by JamesPostage when profiling James.
+ 
+ Go to the home directory of your James installation and edit conf/kernel.xml
+ 
+ change
+ 
+ {{{
+         <component role="org.apache.avalon.phoenix.interfaces.SystemManager"
+             
class="org.apache.avalon.phoenix.components.manager.NoopSystemManager"
+             logger="manager" />
+ 
+ }}}
+ 
+ into
+ 
+ {{{
+         <component role="org.apache.avalon.phoenix.interfaces.SystemManager"
+             
class="org.apache.avalon.phoenix.components.manager.HostedSystemManager"
+             logger="manager">
+ }}}
+ 
+ Please note, that ''!NoopSystemManager'' was changed into 
''!HostedSystemManager'' and the trailing slash has been removed!
+ 
+ Finally, change
+ 
+ {{{
+         <!--
+         </component>
+         -->
+ }}}
+ 
+ into 
+ 
+ {{{
+         </component>
+ }}}
+ 
+ Now, edit file bin/phoenix.[sh|bat]
+ 
+ Replace line
+ 
+ {{{
+ JVM_OPTS="-Djava.ext.dirs=$JVM_EXT_DIRS"
+ }}}
+ 
+ with (on one line)
+ 
+ {{{
+ JVM_OPTS="-Djava.ext.dirs=$JVM_EXT_DIRS -Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.port=10201 "
+ }}}
+ 
+ Restart James now, it should come up like always, only now binding to port 
10201, in addition to the other ports.
  
  = Connecting using MC4J =
  
@@ -83, +148 @@

  
  Choose "Connect to server..." from the menu to activate the Connection 
Wizzard.
  
+ == Use James' built-in MBean server ==
+ 
  On panel 1, choose "MX4J 1.x" from the drop-down list. Enter a name into the 
edit field: e.g. ''James''. Click "next".
  
  Panel 2 is magically skipped.
@@ -90, +157 @@

  On panel 3, click "next".
  
  On panel 4, click "finish".
+ 
+ == Use existing MBeans server ==
+ 
+ On panel 1, choose "JSR160" from the drop-down list. 
+ Enter a name into the edit field: e.g. ''James''. 
+ As Server URL, enter: ''service:jmx:rmi:///jndi/rmi://localhost:10201/jmxrmi''
+ Click "next".
+ 
+ Panel 2 is magically skipped.
+ 
+ On panel 3, click "next".
+ 
+ On panel 4, click "finish".
+ 
+ == After completing the wizzard ==
  
  MC4J now connects and tells you it is loading some MBeans.
  

Reply via email to