Over a million developers have joined DZone.

Plug in Policies Into JBoss Apiman

DZone's Guide to

Plug in Policies Into JBoss Apiman

· Java Zone ·
Free Resource

Take 60 minutes to understand the Power of the Actor Model with "Designing Reactive Systems: The Role Of Actors In Distributed Architecture". Brought to you in partnership with Lightbend.

The JBoss apiman project did just release 1.0.3.Final this week.  It's mostly a bug fix release, with just a couple of relatively minor improvements. One particular feature, that made it's way into the framework since I last blogged about it is the support for plugins. Those plugins can easily be added to the system in order to provide additional functionality.

Add Policies As Plugins
Currently the only functionality that can be contributed through the plugin framework is new policies. Fortunately policies are also the most important aspect of apiman, as they are responsible for doing all of the important work at runtime.

Creating a Plugin
An apiman plugin is basically a java web archive (WAR) with a little bit of extra sauce. This approach makes it very easy to build using maven, and should be quite familiar to most Java developers. Because a plugin consists of some resources files, compiled java classes, front-end resource such as HTML and javascript, and dependencies in the form of JARs, the WAR format is a natural choice. If you want to give it a try yourself, make sure to dig trough the extensive documentation in the developer guide.
The following video walks you through it quickly: 

apiman Plugins (Version 1.0.x) from apiman on Vimeo.

How To Run Apiman
There is a very handy quickstart available, which allows you to build, deploy and start apiman on WildFly with a single command:

$ mvn clean install -Pinstall-all-wildfly8
$ cd tools/server-all/target/wildfly-8.1.0.Final/
$ ./bin/standalone.sh

Make sure to also read my previous blog posts about API Management with apiman:

You can follow @apiman_io and chat with the team on IRC.

Learn how the Actor model provides a simple but powerful way to design and implement reactive applications that can distribute work across clusters of cores and servers. Brought to you in partnership with Lightbend.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}