Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

"Jammazwan" is Hindi for "camel keeper", and is explained in this blog.

a jammazwan? also a jammazwan TL;DR? about:
pete jammazwanPhotoSmall about


This is a simple project to demonstrate how you can use docker to set up supporting infrastructure for your camel learning projects, without spending hours doing machine admin.

It assumes you already have your machine set up to run docker. If that isn't the case, then you have a whole different set of problems! Because docker is inevitable. Resistance is futile. You will eventually cave, FYI. Fortunately it is getting easier, as the months go by.

Our mission: MySQL, ActiveMQ, FTP servers:

Let's say you want to do some sample projects to learn Camel, such as jammazwan.100. But you don't want your box all cluttered up with junk that you might not otherwise use.

Go to your docker prompt, and paste in these commands.

docker pull mysql
docker run -p 3306:3306 --name e-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -e MYSQL_DATABASE=squid -d mysql

Now you've got a mysql server up and running. Go ahead, try it. It's that simple.

On to activemq for JMS:

docker pull ivankrizsan/activemq-docker
docker run -p 8161:8161 -p 61616:61616 --name b-activemq -e CONTAINER_TIMEZONE=America/Chicago -d ivankrizsan/activemq-docker

Now you also have an activeMQ server running. Hit this to test it in the browser.

FTP server?

docker pull stilliard/pure-ftpd
docker run -p 21:21 --name ftpd_server -d stilliard/pure-ftpd

Your FTP server is now running, but it won't do you any good because nobody has permissions to hit it.

So what you have to do is first ssh inside the container, like so:

docker exec -it ftpd_server /bin/bash

Then from inside the FTP server shell, these bash commands, except the Fred part, of course.

pure-pw useradd myusername -u ftpuser -d /home/ftpusers/fred (enter [myuserpassword] twice for pw)
pure-pw mkdb

Your FTP server should now be working.

Testing FTP server on your macbook, like me?

Don't try ftp commands from your mac bash shell. Or at least that's what I learned. It's a known mac bug. But it works great from my camel projects!

Dumb docker commands you might find useful:

docker ps
docker images

Actually, I found that I did very little inside the docker shell for these three servers. Just made sure they were up and running...

A tip for saving the above setup:

The bad news is that when you set up your servers, they go away as soon as you close the shells that kicked them off. So you have to run the above sequence every time.

Most of us run mac or windows for our dev enviroments, so we need to use headless VirtualBox vm (installed by docker installer) to run our docker vms. This is transparent, but we can use this to our advantage....

Once you set up your servers, instead of closing them by killing your docker shell, do this to save your docker running servers exactly as you set them up!

  • Open up your VirtualBox client UI
  • Find your running docker VM
  • Right click, Close > Save.

Now you can restart this VM from VirtualBox UI before starting up docker client next time, and your servers will be as you left them.

The instructions on setting up servers above run pretty quickly, so maybe you don't care. But if you do, here's an easy solution.

But Wait! There's a better way.

This demo is a cool demo, and it's dumb as a box of rocks. But you can also use fabric8. That is more powerful, just not as simple.

How to connect up to these servers with your Camel projects?

There may be other config necessary such as in your maven pom, but here are some snippets you might need.


and jms configuration:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""
  <broker:broker useJmx="false" persistent="false" brokerName="localhost">
      <broker:transportConnector name="tcp" uri="tcp://localhost:61616" />
  <bean id="jms" class="org.apache.activemq.camel.component.ActiveMQComponent">
    <property name="brokerURL" value="tcp://" />
    <property name="trustAllPackages" value="true"/>
<!-- some of this I am not so sure about, but this worked for me so I quit messing with it -->

And some of the substantial database config - this is the persistence.xml I used

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="" 
  xmlns:xsi="" version="1.0">
  <persistence-unit name="camel" transaction-type="RESOURCE_LOCAL">
      <property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver" />
      <property name="openjpa.ConnectionURL" value="jdbc:mysql://" />
      <property name="openjpa.ConnectionUserName" value="root" />
      <property name="openjpa.ConnectionPassword" value="my-secret-pw" />
      <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema" />


You'll probably want to install php-myadmin or any of dozens of other clients, to look at your db, create schema, stuff like that. I found a docker image for that, but I already had php-myadmin running locally.


These are just the docker images I found a few months ago. They work, but you might find better images instead.

Happy Trails!


Instantaneous supporting infrastructure for localized Camel example/demos



No releases published


No packages published


You can’t perform that action at this time.