Category Archives: web development

Continuous delivery BeJUG session notes

BeJUG session May 5, Continuous delivery, Axel Fontaine,

Reliable software solutions through build, test and deployment automation

The take-away message is that automation and agility has improved the development process, but that deployment is still more according to a waterfall model. This can be improved by applying the same kind of agility. It can be done as indicated by sites like stackoverflow (see the version number in the bottom right corner) or flickr (they display it on their tools page).

Green build is top priority!
Don’t check in when the build is red.
Roll back when build is red for too long.

Types of tests:
– typically unit tests
– run entirely in RAM, no db, no network,…
– JUnit
– fast
– parallelizable when written properly
– technology oriented
– component tests
– run in RAM but can access local resources like local disk and DB
– DBunit
– slower than small tests but still quite fast
– technology oriented
– black box system tests
– can also cross process boundary
– Selenium
– slow(ish)
– end-user oriented (which does not need to be human)


Do not deploy snapshots!

What gets deployed?
– code, deployment package, needs deployment script
– configuration:
— environment: put in configuration server (eg LDAP, REST service,…)
— application+environment: deployment package, use environment detection
— application: in the code
— security: file system
– DB delta, in deployment package, LiquiBase or better Flyway (with good maven integration), see also “evolutionary database design” and “refactoring databases”


Branch by abstraction, use a feature switch to allow switching features on/off for development/testing or deployment.
This allows you to continue working on trunk/master.
When new funstionality is done, remove the switch and the old code.

How to allow previous version to be removed “quickly”. Session affinity, all new sessions on new version.
If we assure that session state can be serialized/deserialized between versions, you can store sessions in something like memcache.
The new version can then be switched almost instantly once the new version is up.
Called blue/green deployment.

Deploy using standard package like .msi, .deb, .tar to allow standard deployment tools like puppet, apt etc to be used.

Continuous delivery by Jez Humble

BeJUG Activiti talk notes

BeJUG session about Activiti, Tom Baeyens & Joram Barrez, March 31

Business process
– management view : flow chart
– technical : make it runnable

BPMN 2.0
– OMG standard: shapes, execution, semantics, XML format,…

Large pool of people knowing BPMN
many editors eg Visio, Aris,…

–> executable on Activiti

– 100% java
– open source (APache)
– lightweight
– performant
– embeddable

Diagram as input
API (startProcess etc, and many forms as output)

Manual steps + automatic steps

Developers are crucial for a BPM process
– almost always coding of steps is needed

Custom tasks : implement JavaDelegate (use in a ServiceTask).

Activiti allows unit testing of processes
– @Deployment annotation loads the process (based on test class name etc)

– stop and other process or parallell process

Service bean & spring integration:
– activiti:method-expr=”${loanRequestBean.newLoanRequest(customerName, amount)}”
– activiti:result-variable-name=”loanRequest”
– loanRequestBean is a Spring or CDI bean

CDI/Spring annotations:
– @ProcessScope on class
– @StartProcess on method
– …

Activiti = many parts, including the best BPM engine

Activiti Modeler : web application for modelling BPMN 2.0 processes
Activiti Explorer : see tasks/process, run tasks
Activiti Probe : system administration
Activiti cycle : BPM collaboration done right
Activiti KickStart : allow very easy creation of processes, simple processes or rapid prototyping
Activiti REST API
Activiti Eclipse designer : modelling BPMN 2.0 processes in Eclipse
Mobile Activiti
Android client
Grails integration

Software development problem
– discuss requirements
– bild what they want
– show results
– re-iterate
–> you want faster prototyping

Process engine : combine automatic and manual steps

Automatic steps
– Java or scripting
– WS
– add activiti types automatically in designer
– SAAS, on-premise back-office integration : developer work

Why use process engine
– overview diagram
– rapid prototyping
– fast implementation, many automatic activities
– business benefit: improve communication between business and developers

Why Activiti?
– BPMN .0
– liberal OS license
– large and thriving community

– analyst build abstract process (requirement)
– developer makes that process executable (software)

Activiti cycle
– Collaboration for process solutions, using repositories (Alfresco, svn, jira, …)
– Link and discuss artifacts from different repos
– lifecycle guidance
– revamped in 5.4 (released April 1, no joke)

ACM and BPM, adaptive vs structured, see

Activiti will be integrated in Alfresco. A first development release with embedded Activiti is available now. It will be available in the next community release in August. This should then result in a new enterprise version in November which contains the Activiti integration.

The full talk was recorded and should become available on Parleys soon.

GWT, maven and using the standard maven src/main/webapp directory

We have changed some of our GWT projects back to using the standard maven location of src/main/webapp for the web resources. When we started these projects, the Eclipse GWT plug-in did not support that, so my colleagues insisted on using the war directory (I am an IntelliJ IDEA user/fan myself). Apart from being non-standard, this had the disadvantage that some generated content was also put in that directory cluttering the directory content and risking accident commits of these files (I know svn ignore can help, but still).

Unfortunately, the change was not as plain sailing as hoped. In fact, the gwt-maven-plugin seems to have some problems making this impossible. The advantage of open source solutions, you can create a patch :-).

Here are some excerpts from a pom configuration to make this work. To allow “mvn jetty:run” to work from a clean workspace:

            <baseResource implementation="org.mortbay.resource.ResourceCollection">
                <!-- need both the webbapp dir and location where GWT puts stuff -->

To allow “mvn gwt:run” to work from a clean workspace:

        <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>

You can find the patched version of the gwt-maven-plugin as version 1.2.CPFIX on the Geomajas repo Details of the patch can be found in the their issue tracker.