SLP-Examples-Jetty6
- Introduction to the Service Location Protocol
- Deployment scenarios
- Examples
- Why LiveTribe :: SLP does not implement RFC 2614
- Frequently Asked Questions
Jetty6 ServiceAgent exposing JMX
In Jetty6 it is possible to configure an SLP ServiceAgent that exposes the MBeanServer where Jetty registers its MBeans.
Follow these steps to configure Jetty6 or Jetty7:
- Create directory $JETTY_HOME/lib/ext/slp. Jetty6 will scan all subdirectories under $JETTY_HOME/lib/ext for additional jars.
- Place livetribe-slp-2.y.z.jar in the $JETTY_HOME/lib/ext/slp directory.
- Create the following Jetty configuration file, that contains the JMX and SLP configuration for Jetty:
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> <Configure id="Server" class="org.mortbay.jetty.Server"> <Call id="mbeanServer" class="java.lang.management.ManagementFactory" name="getPlatformMBeanServer" /> <Call id="jmxConnectorServer" class="javax.management.remote.JMXConnectorServerFactory" name="newJMXConnectorServer"> <Arg> <New class="javax.management.remote.JMXServiceURL"> <Arg>service:jmx:rmi:///</Arg> </New> </Arg> <Arg /> <Arg><Ref id="mbeanServer" /></Arg> <Call name="start" /> <Call id="jmxServiceURL" name="getAddress" /> </Call> <New id="slpService" class="org.livetribe.slp.ServiceInfo"> <Arg> <New class="org.livetribe.slp.ServiceURL"> <Arg type="string"> <Ref id="jmxServiceURL"><Call name="toString" /></Ref> </Arg> </New> </Arg> <Arg>en</Arg> <Arg> <Get class="org.livetribe.slp.Scopes" name="DEFAULT" /> </Arg> <Arg /> </New> <Call id="serviceAgent" class="org.livetribe.slp.SLP" name="newServiceAgent"> <Arg /> <Call name="start" /> </Call> </Configure>