|
|
|
@ -5,41 +5,36 @@
|
|
|
|
|
## |
|
|
|
|
--> |
|
|
|
|
<beans |
|
|
|
|
xmlns="http://www.springframework.org/schema/beans" |
|
|
|
|
xmlns:amq="http://activemq.apache.org/schema/core" |
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
|
|
|
xsi:schemaLocation="http://www.springframework.org/schema/beans |
|
|
|
|
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd |
|
|
|
|
http://activemq.apache.org/schema/core |
|
|
|
|
http://activemq.apache.org/schema/core/activemq-core.xsd |
|
|
|
|
http://camel.apache.org/schema/spring |
|
|
|
|
http://camel.apache.org/schema/spring/camel-spring.xsd"> |
|
|
|
|
xmlns="http://www.springframework.org/schema/beans" |
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
|
|
|
xsi:schemaLocation="http://www.springframework.org/schema/beans |
|
|
|
|
http://www.springframework.org/schema/beans/spring-beans.xsd |
|
|
|
|
http://activemq.apache.org/schema/core |
|
|
|
|
http://activemq.apache.org/schema/core/activemq-core.xsd"> |
|
|
|
|
|
|
|
|
|
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> |
|
|
|
|
<property name="locations"> |
|
|
|
|
<value>file:///@l_prefix@/etc/activemq/activemq.properties</value> |
|
|
|
|
</property> |
|
|
|
|
<property name="locations"> |
|
|
|
|
<value>file:///@l_prefix@/etc/activemq/activemq.properties</value> |
|
|
|
|
</property> |
|
|
|
|
</bean> |
|
|
|
|
|
|
|
|
|
<bean id="logQuery" class="org.fusesource.insight.log.log4j.Log4jLogQuery" |
|
|
|
|
lazy-init="false" scope="singleton" |
|
|
|
|
init-method="start" destroy-method="stop"> |
|
|
|
|
</bean> |
|
|
|
|
|
|
|
|
|
<broker |
|
|
|
|
xmlns="http://activemq.apache.org/schema/core" |
|
|
|
|
<broker xmlns="http://activemq.apache.org/schema/core" |
|
|
|
|
brokerName="localhost" |
|
|
|
|
dataDirectory="@l_prefix@/var/activemq/data"> |
|
|
|
|
|
|
|
|
|
<destinationPolicy> |
|
|
|
|
<policyMap> |
|
|
|
|
<policyEntries> |
|
|
|
|
<policyEntry queue=">" memoryLimit="4mb"> |
|
|
|
|
</policyEntry> |
|
|
|
|
<policyEntry topic=">" memoryLimit="4mb"> |
|
|
|
|
<dispatchPolicy> |
|
|
|
|
<strictOrderDispatchPolicy/> |
|
|
|
|
</dispatchPolicy> |
|
|
|
|
<subscriptionRecoveryPolicy> |
|
|
|
|
<timedSubscriptionRecoveryPolicy recoverDuration="60000"/> |
|
|
|
|
</subscriptionRecoveryPolicy> |
|
|
|
|
</policyEntry> |
|
|
|
|
</policyEntries> |
|
|
|
|
<policyEntries> |
|
|
|
|
<policyEntry topic=">" > |
|
|
|
|
<pendingMessageLimitStrategy> |
|
|
|
|
<constantPendingMessageLimitStrategy limit="1000"/> |
|
|
|
|
</pendingMessageLimitStrategy> |
|
|
|
|
</policyEntry> |
|
|
|
|
</policyEntries> |
|
|
|
|
</policyMap> |
|
|
|
|
</destinationPolicy> |
|
|
|
|
|
|
|
|
@ -47,87 +42,83 @@
|
|
|
|
|
<managementContext createConnector="false"/> |
|
|
|
|
</managementContext> |
|
|
|
|
|
|
|
|
|
<networkConnectors> |
|
|
|
|
<networkConnector name="default-nc" uri="multicast://default"/> |
|
|
|
|
<!-- <networkConnector name="host1 and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)"/> --> |
|
|
|
|
</networkConnectors> |
|
|
|
|
|
|
|
|
|
<persistenceAdapter> |
|
|
|
|
<amqPersistenceAdapter syncOnWrite="false" directory="@l_prefix@/var/activemq/data" maxFileLength="20 mb"/> |
|
|
|
|
<kahaDB directory="@l_prefix@/var/activemq/data"/> |
|
|
|
|
</persistenceAdapter> |
|
|
|
|
|
|
|
|
|
<systemUsage> |
|
|
|
|
<systemUsage> |
|
|
|
|
<memoryUsage> |
|
|
|
|
<memoryUsage limit="20 mb"/> |
|
|
|
|
<memoryUsage percentOfJvmHeap="70" /> |
|
|
|
|
</memoryUsage> |
|
|
|
|
<storeUsage> |
|
|
|
|
<storeUsage limit="1 gb" name="example"/> |
|
|
|
|
<storeUsage limit="100 gb"/> |
|
|
|
|
</storeUsage> |
|
|
|
|
<tempUsage> |
|
|
|
|
<tempUsage limit="100 mb"/> |
|
|
|
|
<tempUsage limit="50 gb"/> |
|
|
|
|
</tempUsage> |
|
|
|
|
</systemUsage> |
|
|
|
|
</systemUsage> |
|
|
|
|
|
|
|
|
|
<transportConnectors> |
|
|
|
|
<transportConnector name="openwire" uri="tcp://localhost:61616" discoveryUri="multicast://default"/> |
|
|
|
|
<transportConnector name="ssl" uri="ssl://localhost:61617"/> |
|
|
|
|
<transportConnector name="stomp" uri="stomp://localhost:61613"/> |
|
|
|
|
<transportConnector name="stomp+ssl" uri="stomp+ssl://localhost:61612"/> |
|
|
|
|
<transportConnector name="xmpp" uri="xmpp://localhost:61222"/> |
|
|
|
|
<transportConnector name="openwire" uri="tcp://localhost:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/> |
|
|
|
|
<transportConnector name="amqp" uri="amqp://localhost:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/> |
|
|
|
|
<transportConnector name="stomp" uri="stomp://localhost:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/> |
|
|
|
|
<transportConnector name="mqtt" uri="mqtt://localhost:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/> |
|
|
|
|
<transportConnector name="ws" uri="ws://localhost:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/> |
|
|
|
|
</transportConnectors> |
|
|
|
|
</broker> |
|
|
|
|
|
|
|
|
|
<camelContext |
|
|
|
|
id="camel" |
|
|
|
|
xmlns="http://camel.apache.org/schema/spring"> |
|
|
|
|
<package>org.example</package> |
|
|
|
|
<route> |
|
|
|
|
<from uri="activemq:example.A"/> |
|
|
|
|
<to uri="activemq:example.B"/> |
|
|
|
|
</route> |
|
|
|
|
</camelContext> |
|
|
|
|
|
|
|
|
|
<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent"> |
|
|
|
|
<property name="connectionFactory"> |
|
|
|
|
<bean class="org.apache.activemq.ActiveMQConnectionFactory"> |
|
|
|
|
<property name="brokerURL" value="vm://localhost?create=false&waitForStart=10000"/> |
|
|
|
|
<property name="userName" value="${activemq.username}"/> |
|
|
|
|
<property name="password" value="${activemq.password}"/> |
|
|
|
|
</bean> |
|
|
|
|
</property> |
|
|
|
|
</bean> |
|
|
|
|
<shutdownHooks> |
|
|
|
|
<bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" /> |
|
|
|
|
</shutdownHooks> |
|
|
|
|
</broker> |
|
|
|
|
|
|
|
|
|
<commandAgent |
|
|
|
|
xmlns="http://activemq.apache.org/schema/core" |
|
|
|
|
brokerUrl="vm://localhost" |
|
|
|
|
username="${activemq.username}" |
|
|
|
|
password="${activemq.password}" |
|
|
|
|
/> |
|
|
|
|
<import resource="jetty.xml"/> |
|
|
|
|
</beans> |
|
|
|
|
</file> |
|
|
|
|
<file name="jetty.xml"> |
|
|
|
|
<!-- |
|
|
|
|
## |
|
|
|
|
## jetty.xml: Jetty server configuration |
|
|
|
|
## |
|
|
|
|
--> |
|
|
|
|
<beans xmlns="http://www.springframework.org/schema/beans" |
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
|
|
|
xsi:schemaLocation="http://www.springframework.org/schema/beans |
|
|
|
|
http://www.springframework.org/schema/beans/spring-beans.xsd"> |
|
|
|
|
|
|
|
|
|
<!-- Embedded Jetty for admin console, REST and AJAX APIs --> |
|
|
|
|
<bean id="securityLoginService" class="org.eclipse.jetty.security.HashLoginService"> |
|
|
|
|
<property name="name" value="ActiveMQRealm"/> |
|
|
|
|
<property name="name" value="ActiveMQRealm" /> |
|
|
|
|
<property name="config" value="file:///@l_prefix@/etc/activemq/jetty.properties"/> |
|
|
|
|
</bean> |
|
|
|
|
<bean id="securityConstraint" class="org.eclipse.jetty.http.security.Constraint"> |
|
|
|
|
<property name="name" value="BASIC"/> |
|
|
|
|
<property name="roles" value="admin"/> |
|
|
|
|
<property name="authenticate" value="false"/> |
|
|
|
|
|
|
|
|
|
<bean id="securityConstraint" class="org.eclipse.jetty.util.security.Constraint"> |
|
|
|
|
<property name="name" value="BASIC" /> |
|
|
|
|
<property name="roles" value="user,admin" /> |
|
|
|
|
<property name="authenticate" value="true" /> |
|
|
|
|
</bean> |
|
|
|
|
<bean id="adminSecurityConstraint" class="org.eclipse.jetty.util.security.Constraint"> |
|
|
|
|
<property name="name" value="BASIC" /> |
|
|
|
|
<property name="roles" value="admin" /> |
|
|
|
|
<property name="authenticate" value="true" /> |
|
|
|
|
</bean> |
|
|
|
|
<bean id="securityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping"> |
|
|
|
|
<property name="constraint" ref="securityConstraint"/> |
|
|
|
|
<property name="pathSpec" value="/*"/> |
|
|
|
|
<property name="constraint" ref="securityConstraint" /> |
|
|
|
|
<property name="pathSpec" value="/admin/*,*.jsp" /> |
|
|
|
|
</bean> |
|
|
|
|
<bean id="adminSecurityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping"> |
|
|
|
|
<property name="constraint" ref="adminSecurityConstraint" /> |
|
|
|
|
<property name="pathSpec" value="*.action" /> |
|
|
|
|
</bean> |
|
|
|
|
<bean id="securityHandler" class="org.eclipse.jetty.security.ConstraintSecurityHandler"> |
|
|
|
|
<property name="loginService" ref="securityLoginService"/> |
|
|
|
|
<property name="loginService" ref="securityLoginService" /> |
|
|
|
|
<property name="authenticator"> |
|
|
|
|
<bean class="org.eclipse.jetty.security.authentication.BasicAuthenticator"/> |
|
|
|
|
<bean class="org.eclipse.jetty.security.authentication.BasicAuthenticator" /> |
|
|
|
|
</property> |
|
|
|
|
<property name="constraintMappings"> |
|
|
|
|
<list> |
|
|
|
|
<ref bean="securityConstraintMapping"/> |
|
|
|
|
<ref bean="adminSecurityConstraintMapping" /> |
|
|
|
|
<ref bean="securityConstraintMapping" /> |
|
|
|
|
</list> |
|
|
|
|
</property> |
|
|
|
|
<property name="handler"> |
|
|
|
@ -135,58 +126,70 @@
|
|
|
|
|
<property name="handlers"> |
|
|
|
|
<list> |
|
|
|
|
<bean class="org.eclipse.jetty.webapp.WebAppContext"> |
|
|
|
|
<property name="contextPath" value="/openpkg-activemq/admin"/> |
|
|
|
|
<property name="resourceBase" value="@l_prefix@/share/activemq/admin"/> |
|
|
|
|
<property name="logUrlOnStart" value="true"/> |
|
|
|
|
<property name="contextPath" value="/openpkg-activemq/hawtio" /> |
|
|
|
|
<property name="war" value="@l_prefix@/share/activemq/hawtio" /> |
|
|
|
|
<property name="logUrlOnStart" value="true" /> |
|
|
|
|
</bean> |
|
|
|
|
<bean class="org.eclipse.jetty.webapp.WebAppContext"> |
|
|
|
|
<property name="contextPath" value="/openpkg-activemq/camel"/> |
|
|
|
|
<property name="resourceBase" value="@l_prefix@/share/activemq/camel"/> |
|
|
|
|
<property name="logUrlOnStart" value="true"/> |
|
|
|
|
<property name="contextPath" value="/openpkg-activemq/admin" /> |
|
|
|
|
<property name="resourceBase" value="@l_prefix@/share/activemq/admin" /> |
|
|
|
|
<property name="logUrlOnStart" value="true" /> |
|
|
|
|
</bean> |
|
|
|
|
<bean class="org.eclipse.jetty.webapp.WebAppContext"> |
|
|
|
|
<property name="contextPath" value="/openpkg-activemq/service"/> |
|
|
|
|
<property name="resourceBase" value="@l_prefix@/share/activemq/service"/> |
|
|
|
|
<property name="logUrlOnStart" value="true"/> |
|
|
|
|
<property name="contextPath" value="/openpkg-activemq/fileserver" /> |
|
|
|
|
<property name="resourceBase" value="@l_prefix@/share/activemq/fileserver" /> |
|
|
|
|
<property name="logUrlOnStart" value="true" /> |
|
|
|
|
<property name="parentLoaderPriority" value="true" /> |
|
|
|
|
</bean> |
|
|
|
|
<!-- |
|
|
|
|
<bean class="org.eclipse.jetty.webapp.WebAppContext"> |
|
|
|
|
<property name="contextPath" value="/openpkg-activemq/demo"/> |
|
|
|
|
<property name="resourceBase" value="@l_prefix@/share/activemq/demo"/> |
|
|
|
|
<property name="logUrlOnStart" value="true"/> |
|
|
|
|
</bean> |
|
|
|
|
<bean class="org.eclipse.jetty.webapp.WebAppContext"> |
|
|
|
|
<property name="contextPath" value="/openpkg-activemq/fileserver"/> |
|
|
|
|
<property name="resourceBase" value="@l_prefix@/share/activemq/fileserver"/> |
|
|
|
|
<property name="logUrlOnStart" value="true"/> |
|
|
|
|
<property name="parentLoaderPriority" value="true"/> |
|
|
|
|
<property name="contextPath" value="/openpkg-activemq/api" /> |
|
|
|
|
<property name="resourceBase" value="@l_prefix@/share/activemq/api" /> |
|
|
|
|
<property name="logUrlOnStart" value="true" /> |
|
|
|
|
</bean> |
|
|
|
|
<bean class="org.eclipse.jetty.server.handler.ResourceHandler"> |
|
|
|
|
<property name="directoriesListed" value="false"/> |
|
|
|
|
<property name="directoriesListed" value="false" /> |
|
|
|
|
<property name="welcomeFiles"> |
|
|
|
|
<list> |
|
|
|
|
<value>index.html</value> |
|
|
|
|
</list> |
|
|
|
|
</property> |
|
|
|
|
<property name="resourceBase" value="@l_prefix@/share/activemq/"/> |
|
|
|
|
<property name="resourceBase" value="@l_prefix@/share/activemq/" /> |
|
|
|
|
</bean> |
|
|
|
|
--> |
|
|
|
|
<bean id="defaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"> |
|
|
|
|
<property name="serveIcon" value="false"/> |
|
|
|
|
<property name="serveIcon" value="false" /> |
|
|
|
|
</bean> |
|
|
|
|
</list> |
|
|
|
|
</property> |
|
|
|
|
</bean> |
|
|
|
|
</property> |
|
|
|
|
</bean> |
|
|
|
|
|
|
|
|
|
<bean id="rewrite" class="org.eclipse.jetty.rewrite.handler.RewriteHandler"> |
|
|
|
|
<property name="rules"> |
|
|
|
|
<set> |
|
|
|
|
<bean class="org.eclipse.jetty.rewrite.handler.RedirectRegexRule"> |
|
|
|
|
<property name="regex" value="/api/jolokia(.*)"/> |
|
|
|
|
<property name="replacement" value="/hawtio/jolokia$1"/> |
|
|
|
|
</bean> |
|
|
|
|
</set> |
|
|
|
|
</property> |
|
|
|
|
</bean> |
|
|
|
|
|
|
|
|
|
<bean id="contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"> |
|
|
|
|
</bean> |
|
|
|
|
<bean id="Server" class="org.eclipse.jetty.server.Server" init-method="start" destroy-method="stop"> |
|
|
|
|
|
|
|
|
|
<bean id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start"> |
|
|
|
|
<property name="host" value="localhost"/> |
|
|
|
|
<property name="port" value="8161"/> |
|
|
|
|
</bean> |
|
|
|
|
|
|
|
|
|
<bean id="Server" depends-on="jettyPort" class="org.eclipse.jetty.server.Server" init-method="start" |
|
|
|
|
destroy-method="stop"> |
|
|
|
|
<property name="connectors"> |
|
|
|
|
<list> |
|
|
|
|
<bean id="Connector" class="org.eclipse.jetty.server.nio.SelectChannelConnector"> |
|
|
|
|
<property name="host" value="localhost" /> |
|
|
|
|
<property name="port" value="8161" /> |
|
|
|
|
<property name="host" value="localhost"/> |
|
|
|
|
<property name="port" value="8162"/> |
|
|
|
|
</bean> |
|
|
|
|
</list> |
|
|
|
|
</property> |
|
|
|
@ -194,6 +197,7 @@
|
|
|
|
|
<bean id="handlers" class="org.eclipse.jetty.server.handler.HandlerCollection"> |
|
|
|
|
<property name="handlers"> |
|
|
|
|
<list> |
|
|
|
|
<ref bean="rewrite"/> |
|
|
|
|
<ref bean="contexts" /> |
|
|
|
|
<ref bean="securityHandler" /> |
|
|
|
|
</list> |
|
|
|
|