Java EE 6 and 7 at JUGICE, Iceland, JFokus 2012, and UmeĂĄ JUG, Sweden
After an easy January month, the conference circuit is starting with a tour of the Nordics.
What ? Java EE 6 hands-on workshopDate ? Saturday, Feb 11, 2012
Time ? 9am - 1pm
Where ? Reykjavik University, Fönix (m-105)
Register ? jugice-ag2012-eorg.eventbrite.com
Prep work: Download and Install NetBeans 7.0.1 or later ("All" version) from netbeans.org, JDK 6 latest update from oracle.com/javase.
Twitter: @JUGICE

What ? Java EE 6 hands-on workshop (Feb 13, 9am), PaaSing a Java EE Application (Feb 15, 9am), Java EE 7: Developing for the Cloud (Feb 15, 1pm)
Date ? Monday - Wednesday, Feb 13 - 15, 2012
Time ? All Day
Where ? Stockholm Waterfront Congress Center, Sweden
Register ? jfokus.com (almost sold out, register quick)
Prep work: (For hands-on workshop only) Download and Install NetBeans 7.0.1 or later ("All" version) from netbeans.org, JDK 6 latest update from oracle.com/javase.
Website: jfokus.com
Twitter: @jfokus
Check out my reports from JFokus 2011.

What ? Java EE 6 hands-on workshop
Date ? Thursday, Feb 16, 2012
Time ? 6pm
Where ? Umeå University (Triple-Helix), Umeå, Sweden
Register ? Just show up
Prep work: Download and Install NetBeans 7.0.1 or later ("All" version) from netbeans.org, JDK 6 latest update from oracle.com/javase.
Website: umejug.blogspot.com
Where will I meet or run with you ? :)
Nexus 2.0 is coming. Join Jason for the first demo.
Join us Tuesday, February 21 at 11:00AM (GMT-0500) for a 30 minute demonstration of Nexus 2.0, with Jason van Zyl, Sonatype Founder & CTO. You’ll see all the new features and learn how Nexus 2.0 will help you:
- Avoid downtime by using a highly available architecture
- Improve repository management with enhanced component information
- Standardize on a single repository for .NET, Java, and OSGi
If you register, you’ll also receive access to the recording after the event. So if something comes up and you can’t make it, you won’t miss out.
Hibernate Search 4.1.0.Beta1: improve Infinispan Query mapping
Hibernate Search version 4.1.0.Beta1 was tagged; the most essential change compared to January's release 4.1.0.Alpha1 was HSEARCH-1034, made to allow Infinispan Query to use the fluent Programmatic Mapping API as already available to Hibernate users.
More changes are being developed: stay tuned for new MassIndexer improvements, some new performance improving tricks, and a fierce discussion is going on to provide a new pragmatic way to define index mappings starting from the Query use cases.
Integrations with InfinispanThe Infinispan project released a new milestone version 5.1.1.FINAL, which is relevant to Hibernate Search users in many ways:
- Hibernate Search can use Infinispan to distribute the index among several clustered nodes.
- JBoss AS 7.1 will use this version as the fundamental clustering technology.
- Hibernate OGM can map JPA entities to Infinispan instead of a database, and use Hibernate Search as query engine and replicate the indexes storing them in Infinispan.
- Infinispan Query uses the Hibernate Search Engine component to make it possible to search across the values stored in Infinispan. All you need to do is add the dependency to infinispan-query, enable indexing in the configuration and either annotate the objects you store in the grid like you would do with Hibernate Search entitites, or define the mappings using the programmatic API.
More details on Infinispan Query can be found in the Infinispan reference, but if you're familiar with Hibernate Search there's not much to learn as they share most features and configuration options as defined on the Hibernate Search reference manual.
The usual links- Download from Sourceforge.
- or get it via Maven artifacts.
- User forums.
- New ideas and suggestions via the mailing list.
- Issue tracker is JIRA; bug reports are welcome, especially those providing patches and/or tests.
- Source code is on GitHub , pull requests welcome.
Tieing JBoss AS 7 to multiple realities
We had an interesting discussion at FOSDEM about collaboring on a Free and Open Source Software project like JBoss AS 7. To really allow FOSS developers to participate you need to make sure only FOSS build tools and dependencies are used. Anything else and you would raise the bar for your contributors.
An interesting point was the usage of a non-FOSS issue tracker. Should you use an issue tracker which does have free access, but is not FOSS?
Personally I would say: why not? As long as you control and own the data it should pose no real threat. Just make sure the acquired license does allow for an unlimited number of free access.
Using Fedora 17 makes sure your build tools, dependencies and even transitive dependencies are FOSS. But does it lower the bar for contributors?
In actuallity no, because the build tool used (mvn-rpmbuild) and the component set available (latest and greatest only) makes for a different result than upstream. But this does not only go for Fedora (and it's mvn-rpmbuild), it goes for every Maven (or other build tool) project that draws in dependencies.
Looking at building Maven 3.0.3 using Maven 3.0.3 it would download and use maven-artifact 2.0 to 2.0.9, while at runtime it only uses maven-artifact 3.0.3 by its own definition.
Java developers give little thought about the runtime platform where their component is going to run. Regardless of the use of Maven, Gradle or Ant / Ivy. Or running on RHEL, Fedora, Debian or Windows. It will create issues once you want to integrate on a well-defined component set.
So we should really give more thought into where our components are going to run, be it Windows, OS X, Debian, RHEL or Fedora.
And we should try to foster an environment in which all these realities can collaborate.
RHQ CLI over XMPP
Securing Rhino in Java6
POJOMapping in Jersey for type-safe clients
Over on his blog, Jason Lee has a detailed post on the new POJOMapping feature in Jersey/GlassFish which offers strongly-typed client API's and illustrates this with a GlassFish Cluster administration sample.
POJOMapping Client/Server Example">
The post shows how to enable POJOMapping with a Jersey servlet initialization parameter and goes on to show the Cluster domain model. An archive with the entire sample is available there.
JUDCon 2012, Bangalore - Photos and presentations uploaded
Review of Oracle Service Bus 11g Development Cookbook (Packt Publishing) by Edwin Biemond, Guido Schmutz, Eric Elzinga et. al.
Sending an email with attachment from Oracle BPEL
Create a JasperReport from Oracle BPEL
JBossWS 4.0.1 release
Have a look at the release notes for further details [1][2]! Feedback is welcome as always.
Tab Sweep - Remote GlassFish on EC2, JavaEE 6 intro, Java 7 readiness, WADL, losing JCP voting rights, ...
Note: if you're reading this using a feedreader, please make sure you've updated to the updated TheAquarium feed.
Recent Tips and News on Java, Java EE 6, GlassFish & more :
• Asadmin with Remote GlassFish (on EC2) (Bobby)
• Easy OAuth using DaliCore and GlassFish (Joeri)
• Introduction to Java Enterprise Edition 6 (JTV Technology Blog)
• Container based authentication with JSPWiki, GlassFish and OpenDJ (Dave)
• Exception "java.lang.IllegalArgumentException: object is not an instance of declaring class" And Solution (Adam)
• JCP's Evolution into Openness Continues: Lost Voting Rights and JSR 355 (java.net)
• Server side action methods on JSF ValueChange events using AJAX listeners (Lincoln)
• Gentle introduction to WADL (in Java) (Tomasz)
• Is your project ready for Java 7? (Dmitry)
• XMPP/Vorpal Screencast: Are you there? (Chuk)
Intercepting user customization – such as column reordering in tables – in ADF 11g change persistence
m2e(clipse)-wtp 0.15.0 : New & Noteworthy
Maven Integration for Eclipse WTP 0.15.0, a.k.a m2eclipse-wtp, a.k.a m2e-wtp is available.
This release contains mostly bug fixes, but a few improvements managed to slip in. The complete release notes are available here.
m2e-wtp 0.15.0 is compatible with the JavaEE distributions of Eclipse Helios and Indigo, requires at least m2e 1.0 (works with 1.1) and mavenarchiver plugin >= 0.14.0 (0.15.0 should be automatically installed).
As usual, m2e-wtp can be installed from :
- the Maven Discovery mechanism, for new installations : Window > Preferences > Maven > Discovery > Open catalog
- the Eclipse Marketplace : Help > Eclipse Marketplace
- the update site : http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/
So let's see what are the highlights of this new release :
Packaging inclusion/exclusion support improvements
For war project, previous m2e-wtp versions used to use <packagingIncludes> and <packagingExcludes> attributes from the maven-war-plugin config to enable (or not) the deployment of project dependencies to WTP servers. In 0.15.0, the same level of support has been added to EAR projects using maven-ear-plugin 2.7+. However, the problem with this approach is, other resources (web pages, classes ...) are not properly excluded (using the <*SourceInclude> and <*SourceExclude> attributes).
In order to address this problem, Rob Stryker, committer on WTP and lead of JBoss AS tooling in JBoss Tools, provided an implementation for JBoss AS servers that might be generalized to other WTP server adapters (if they decide to do so). Basically, some new metadata is added to the project's .settings/org.eclipse.wst.common.component like :
<?xml version="1.0" encoding="UTF-8"?> <project-modules id="moduleCoreId" project-version="1.5.0"> <wb-module deploy-name="webOrEar"> ... <property name="component.inclusion.patterns" value="pattern1,pattern2"/> <property name="component.exclusion.patterns" value="pattern3,pattern4"/> </wb-module> </project-modules>
The patterns are separated with a comma and exclusions take precedence over inclusions : resources matching one of the exclusion patterns are not deployed, even if they match one of the inclusion patterns. That solution is not maven-bound so any other kind of project can benefit from it.
Now all m2e-wtp 0.15.0 does is map the maven patterns to their equivalent component metadata. This gives :
In the example above, a warning is displayed as both <warSourceIncludes> and <packagingIncludes> are defined. Since both patterns could overlap, it might lead to some weird behavior where WTP would actually deploy more files than a maven CLI build. In order to minimize (we can not totally solve) that potential discrepancy we only keep the packaging patterns in the component files and recommend using <packagingIncludes> only.
Currently, this feature only works in combination with the JBoss AS Tools from JBoss Tools 3.3.0.Beta1 (nightly builds available from http://download.jboss.org/jbosstools/updates/nightly/trunk/), but we'll try to make other WTP Server adapter vendors support it in the future (as part of WTP core API).
Warnings added when unsupported dependency types are detected
As of today, if a project depends on another workspace project of type ejb-client or test-jar, that specific dependency will not be packaged properly by WTP, as Maven would do in command line. Moreover, you'll experience some class leakage on the compilation and test classpaths in Eclipse (ex: non client classes being visible). The only known workarounds to this issue are to disable workspace resolution, or close the dependent project and rely on the dependencies from the local maven repository.
Ideally, in order to make the deployment part work, we would need to introduce new WTP components, but the current WTP API doesn't support it, yet. So, until this is fixed, warning markers are added whenever a project depends on such "unsupported" types. That should hopefully give users an idea of the problem and how to circumvent it.
Better handling of dependencies in war projectsPrevious m2e-wtp versions had, in some use cases, some outstanding issues with regard to dependency management of war projects. In particular,
- when 2 dependencies of the same artifact, but having a different classifier were added to a web project, only one would show up on the classpath. This has been properly fixed.
- in some cases, the timestamped version of a SNAPSHOT dependencies from the local repository, would be copied under the target/ folder, causing some jar locking issues in windows. The rationale behind this behavior is, maven-war-plugin packages snapshot dependencies using the timestamp identifier. Since the name of file in the maven classpath library needs to match the one deployed by WTP, a copy was performed. To fix this problem, the default file pattern matching used for dependency deployment has been changed to @{artifactId}@-@{baseVersion}@@{dashClassifier?}@.@{extension}@. This means that, by default in m2e-wtp, SNAPSHOT dependencies are now deployed using the SNAPSHOT suffix instead of the timestamp. If you need to force the use of timestamped artifacts, then you need to explicitely decalre the following in your pom.xml :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<outputFileNameMapping>@{artifactId}@-@{version}@@{dashClassifier?}@.@{extension}@</outputFileNameMapping>
</configuration>
</plugin>
Removal of conflicting facets on packaging change
If you had a java utility project, that you wanted to upgrade to an EJB project for example, a constraint violation would be raised upon project configuration update (EJB and Utility facets can't be both installed).
This has been fixed by removing all conflicting facets when you change the packaging of a Java EE project, making that conversion completely transparent.
What's next?
m2e 1.1 introduces a new Eclipse to Maven project conversion API. It means that, in m2e-wtp.next, we will be able to automatically convert existing WTP project configuration to maven's. Dependencies will still need to be set/translated manually but that's a pretty good start IMHO.
Finally ...
I would like to thank the m2e-wtp community at large for their support and contributions, that's what make this project move forward and make it one of the most popular projects on the eclipse marketplace.
Contributions can take the form of :
- patches/pull requests (source is available on https://github.com/sonatype/m2eclipse-wtp/), as Laszlo Varadi did to fix some overlay issue in windows,
- bug reports (at https://issues.sonatype.org/browse/MECLIPSEWTP)
- help on the documentation in the wiki.
- answering questions on the m2e mailing list
Keep it up.
Fred.
FOSDEM'12
From his blog:
FOSDEM is the “Free and Open Source Software Developers Meeting” and it’s happening this weekend in Brussels. It’s a fairly large conference (5000-10000 attendees) covering all sorts of free software.
And I’ve been working on a presentation for it about jBPM Designer this week. Putting a presentation together can sometimes be more work than you expect — hmm, maybe more work than I expected then, at the least.
Here, good readers, is a link to a description of the presentation. Geoffrey De Smet, another core Drools/jBPM developer, is doing the first half the presentation on Guvnor, which Designer integrates into. You can find his blog post about it here. He’s also the lead developer on the Drools Planner project which I like. “You should check it out” are the words that you just read and that you already knew were coming.
A good friend of mine who’s somewhat of an expert in learning told me that all presentations and trainings should attempt to pose one question to the viewers and answer it. In this presentation, my question is
How do we let business analysts to do their work well (so that they leave the business software developers alone)?
It’s a question which I have at times found very pertinent, even though I have worked with some very good business analysts.
Designer is a great little web project that already is a polished, easily usable web application and integral part of Guvnor (from the jBPM standpoint) — and it’s getting better every day. In short, Tihomir (Surdilovic), who’s probably done most of the work on the project, has added lots of little nice features that make it easy to develop a (BPMN 2.0) process. The Guvnor integration means that, as Tiho put it, Guvnor becomes a “one-stop shop” for developing, storing and deploying processes.
You can just open up Guvnor (in a browser), create a new process, edit it, save it, build the package and then go directly to jbpm-console and BAM!, start your process. That’s kinda nice.. !
In my presentation, I’ll go over the background of BPM, BPMN and JBPM (if you’re attending, please practice saying that 10 times quickly), some of the main features of Designer, and then give a quick (max 10 minute?) demo. We might finish a few minutes early — depending on questions.
Drools Developer's Cookbook review

A few weeks ago Packt Publishing released the Drools Developer's Cookbook, written by Lucas Amador. I had the opportunity to review an early draft of the book last year and when I received my copy of the released book I was eager to read it and check out how was it. I am glad to say I am pleasantly surprised.
Packt is known for publishing many high quality books on open source projects and it has already published 2 other books on Drools, but managed to publish this 3rd book with a completely different perspective and as so, allows readers to choose which ones they would benefit more from.
While JBoss Drools Business Rules, by Paul Browne, focus its content on higher level rule authoring and an earlier version of Guvnor, Drools JBoss Rules 5.0 Developer's Guide, by Michal Bali, is a deeper tutorial-style reading that builds on the examples from chapter to chapter, detailing how every piece of the puzzle fits together.
Drools Developer's Cookbook on the other hand, as the name implies, contains recipes on how to leverage Drools' features to effectively build business solutions. This is an excellent format for those with some knowledge of the platform and that want a detailed reference on how to use specific features. While the Developer's Guide is more suited for a throughout reading, the cookbook is a good reference material that can be read on a chapter basis in any order the reader wishes.
Each recipe is divided in usually 3 sections:
- "Getting ready" details which setup steps are necessary to use the feature/complete the task in that recipe, like for instance, additional jar dependencies or configuration options are required.
- "How to do it..." is a step by step explanation of how to use the feature/complete the task.
- "How it works..." is my favorite section and explains how and why things work the way they do. This is important knowledge that can be leveraged to achieve different goals.
The book covers an extensive set of components and features, as can be seen in the table of contents: from the core Drools Expert, to Guvnor, Fusion, Planner, Camel/Spring/JPA integration and even a bit of jBPM. I think the book will be really helpful to a large percentage of the Drools user base.
Unfortunately, the book is not perfect. There are some minor issues, like some typos in some of the printed examples. The good news is that this is totally offset by the great support Packt provides to all their published books. The (fixed) source code is available for download, and I imagine the errata should be soon available as well.
The over 40 recipes in this book are an excellent resource, and I am sure it will left the readers looking forward for more!
Happy Drooling
Traveling Salesman Problem demo with Drools Planner
Just take a look at the Traveling Salesman Problem (TSP) demo. It shows adding cities in real-time and demonstrates how easy it is to change the constraints:
Coming soon: a vehicle routing example and even better scalability.
Scala Artifacts Now on Central

Two weeks ago, all Scala projects required a little bit of extra configuration to point to a custom repository for Scala artifacts hosted at scala-tools.org. Today, Scala artifacts are now available directly from Central. The contents of scala-tools.org are now integrated into the Sonatype OSS repository hosting service, and other projects have started to publish artifacts Central.
The Scala community will see immediate benefits from this move. There are no more extra repositories to configure. It just got incrementally easier to use Scala. If you are new to Scala, you don’t need to reconfigure your repository manager to proxy another remote repository. The community will benefit from Sonatype’s continued investment in the infrastructure that runs Central: a cluster of machines in both the US and the EU continuously monitored by a dynamic DNS server that can reroute traffic instantly in the event of downtime.
How did this happen? Joshua Suereth, David Bernard, and Derek Chen-Becker provided the bulk of the administrative work, and they recently decided to decommision this server and transition repository hosting to the free Sonatype OSS service. Here’s the announcement by Joshua Suereth to the user forums on scala-lang.org on January 17th:
Scala-tools.org is going down and not accepting any new OSS projects. For those of us who wish to continue release software, I recommend migrating over to Sonatype. They put a few (good practice) limitations on contributions, but scala-tools.org would have done the same before long anyway. The benefit of Sonatype hosting is that your projects will make it onto the maven-central repository and benefit from the myriads of mirrors. Here’s the link for how to get started contacting Sonatype: http://nexus.sonatype.org/oss-repository-hosting.html Publishing Your Scala Project to Central via Sonatype OSSIf you maintain a project that previously published to the scala-tools.org repository, here are three resources that provide guidance for Scala developers looking to publish Scala artifacts to Central:
- Publishing artifacts to Sonatype instruction written by Joshua Suereth on publishing to Sonatype OSS
- Publishing SBT Projects to Sonatype OSS from Cake Solution’s Specs2 Spring Project
- PublishToSonatype.scala some Scala code from Paul Phillips to automate the process of publishing artifacts to Sonatype’s OSS
GlassFish 3.1.2 Release Candidate builds are here!
GlassFish 3.1.2 has never been so close to a GA/FCS release with promoted build b19 now available as Release Candidate (RC) 1. In fact you might as well go straight to RC2 (build 20), also now available from the promoted builds page.
If you're not sure which archive to use, try this one. Another RC build (RC3) is planned in the next few days. Hopefully it'll be the last one before the product ships.
So make sure you test your applications work properly with the latest promoted build and check out recent blog posts on 3.1.2 if you're wondering what to expect from this release. See you in a short while for a stable public release!
Now you know what to do over the week-end! :)


