I really like this matrix to explain what technical debt is.
Update: fixed the matrix, swapped nagative and positive.
Update2: This diagram was part of a presentation on technical debt by Philippe Kruchten, not something i came up with.
I really like this matrix to explain what technical debt is.
Update: fixed the matrix, swapped nagative and positive.
Update2: This diagram was part of a presentation on technical debt by Philippe Kruchten, not something i came up with.
Out of the box ServiceMix comes with a preconfigured ActiveMQ broker, which is started when you start ServiceMix.
karaf@root> osgi:list | grep mq [ 43] [Active ] [Created ] [ ] [ 60] activemq-core (5.4.1.fuse-00-00) [ 45] [Active ] [ ] [ ] [ 60] activemq-console (5.4.1.fuse-00-00) [ 46] [Active ] [ ] [ ] [ 60] activemq-ra (5.4.1.fuse-00-00) [ 47] [Active ] [ ] [ ] [ 60] activemq-pool (5.4.1.fuse-00-00) [ 48] [Active ] [Created ] [ ] [ 60] activemq-karaf (5.4.1.fuse-00-00) [ 53] [Resolved ] [ ] [ ] [ 60] activemq-blueprint (5.4.1.fuse-00-00) [ 54] [Active ] [Created ] [ ] [ 60] activemq-broker.xml (0.0.0)
Bundle 54 is the default broker. You can configure it by changing the file SERVICEMIX_HOME/etc/activemq-broker.xml
You can add an extra broker by using the command activemq:create-broker in the ServiceMix shell:
karaf@root> activemq:create-broker --name=test Creating file: @|green C:\java\apache-servicemix-4.3.0-fuse-02-00\deploy\test-broker.xml| Default ActiveMQ Broker (test) configuration file created at: C:\java\apache-servicemix-4.3.0-fuse-02-00\deploy\test-broker.xml Please review the configuration and modify to suite your needs.
This command creates a configuration file for your new browser, for this example it’s called SERVICEMIX_HOME/deploy/test-broker.xml
You need to change it because it’s using the same ports as the default broker. Look for the following lines in the configuration file and change the ports to something unused.
...
<!-- The transport connectors ActiveMQ will listen to -->
<transportConnectors>
<transportConnector name="openwire" uri="tcp://localhost:61816"/>
<transportConnector name="stomp" uri="stomp://localhost:61813"/>
</transportConnectors>
</broker>
<bean id="activemqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61816" />
</bean>
...
Next, you need to install the activemq-spring feature to avoid as the broker configuration file generated uses spring, instead of osgi blueprint as the default does.
karaf@root> features:install activemq-spring
If you list the ActiveMQ brokers, you’ll see that you have two:
karaf@root> activemq:list --jmxlocal BrokerName = test BrokerName = default
When you try to list your ActiveMQ brokers in ServiceMix you may run into the following jmx problem:
karaf@root> activemq:list
Connecting to JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
ERROR: java.lang.RuntimeException: Failed to execute list task. Reason: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.NameNotFoundException: jmxrmi
java.lang.RuntimeException: Failed to execute list task. Reason: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.NameNotFoundException: jmxrmi
at org.apache.activemq.console.command.ListCommand.runTask(ListCommand.java:52)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJmxCommand.java:292)
at org.apache.activemq.karaf.commands.ActiveMQCommandSupport.doExecute(ActiveMQCommandSupport.java:46)
at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:41)
at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
at org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.java:50)
at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:229)
at org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:162)
at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:101)
at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:79)
at org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)
at org.apache.karaf.shell.console.jline.Console.run(Console.java:181)
at java.lang.Thread.run(Thread.java:619)
Error executing command: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.NameNotFoundException: jmxrmi
The solution is simple, add the option –jmxlocal, and documented in Deploying into the OSGi Container:
karaf@root> activemq:list --jmxlocal BrokerName = default