| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!-- |
| 3 |
~ Copyright 2009-2012 Roland Huss |
| 4 |
~ |
| 5 |
~ Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 |
~ you may not use this file except in compliance with the License. |
| 7 |
~ You may obtain a copy of the License at |
| 8 |
~ |
| 9 |
~ http://www.apache.org/licenses/LICENSE-2.0 |
| 10 |
~ |
| 11 |
~ Unless required by applicable law or agreed to in writing, software |
| 12 |
~ distributed under the License is distributed on an "AS IS" BASIS, |
| 13 |
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 |
~ See the License for the specific language governing permissions and |
| 15 |
~ limitations under the License. |
| 16 |
--> |
| 17 |
|
| 18 |
<beans xmlns="http://www.springframework.org/schema/beans" |
| 19 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 20 |
xmlns:jolokia="http://www.jolokia.org/jolokia-spring/schema/config" |
| 21 |
xmlns:context="http://www.springframework.org/schema/context" |
| 22 |
xmlns:util="http://www.springframework.org/schema/util" |
| 23 |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd |
| 24 |
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd |
| 25 |
http://www.jolokia.org/jolokia-spring/schema/config http://www.jolokia.org/jolokia-spring/schema/config/jolokia-config.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> |
| 26 |
|
| 27 |
<context:property-placeholder system-properties-mode="ENVIRONMENT"/> |
| 28 |
|
| 29 |
<context:mbean-export server="jolokiaMBeanServer"/> |
| 30 |
|
| 31 |
<jolokia:mbean-server id="jolokiaMBeanServer"/> |
| 32 |
|
| 33 |
<jolokia:config id="bla" agentContext="/bla/" order="5"/> |
| 34 |
|
| 35 |
<jolokia:config id="blub" agentContext="/j4p/" order="10"/> |
| 36 |
|
| 37 |
<util:map id="configuration"> |
| 38 |
<entry key="jmx.jolokiaPort" value="${jolokia.port}"/> |
| 39 |
</util:map> |
| 40 |
|
| 41 |
|
| 42 |
<jolokia:agent id="jolokia" lookupConfig="true"> |
| 43 |
<jolokia:config id="blub2" |
| 44 |
autoStart="true" |
| 45 |
port="#{configuration['jmx.jolokiaPort']}" |
| 46 |
host="127.0.0.1" |
| 47 |
/> |
| 48 |
</jolokia:agent> |
| 49 |
</beans> |