Adam Bien's Weblog

Thursday Apr 24, 2014

Golden Times For Java Devs -- Interview with WJUG (Warszawa Java User Group)

Adam Bien: When the Warsaw JUG ( was founded? What was the very first meeting?

We had our first meeting in November 2006 with a talk about Apache Geronimo given by WJUG founder - Jacek Laskowski. However Warsaw Java User Group roots go even deeper, all the way back to the Polish BEA User Group.

Adam Bien: What makes WJUG "cool"?

Fellow developers you can talk to, ask questions and learn from. Big community which will help you find an answer, job, or something interesting to do. And above all a place where you can discover interesting technologies, share knowledge and learn best practices for free in a friendly group.

Adam Bien: How you would describe the climate for Java developers in Poland? Is there any demand for Java / Java EE developers on the market?

There’s much more work than people. The community is also strong and supportive. These are golden times for Java devs. It is not only easy to find a good job but also thanks to many international (GeeCON, 33rd Degree, Java Developers Days) and national (Confitura, Warsjawa) conferences, we can share our experiences and learn from the best.

Adam Bien: What are the goals of the WJUG?

Share knowledge and have fun! We also want to spread the word about software craftsmanship and good practices that we find important in our everyday work and hobby.

Adam Bien: After my session we met in a nice bar. The developers were extremely motivated and were constantly searching for new challenges, so we kept talking Javanese. Can you meet the member's expectations with a JUG?

We hope so. We are completely open, twice a year we have a meeting where anyone can join organizers, we have dedicated meetings for Spring/Groovy/JBoss users, we have special set of meetings for people new to Java and technologies around it, we have two big, and completely free conferences every year, we have one-day workshops… There is a lot going on, so I suppose we have something for everyone. Although we are still looking for new ideas and we like to find inspirations outside - this year we are organizing Devoxx4Kids for the first time.

Adam Bien: Would you appreciate more support from Oracle (the Java stuart)? If yes, what do you like to see?

We are doing fine on our own, so we don’t have any needs we can’t handle, but definitely, some love from Oracle would be welcome. Not sure about the details though. Java gadgets are always handy. And speakers. We’d love to have someone from Oracle at our regular meetings once in a while.

Adam Bien: Are you planning to participate in any open source projects / JCP activities?

Last month we had OpenJDK hackathon and we are planning OpenJDK test fest or two in a near future. As for the active participation in the JCP programme we haven't decided yet - there`s so much to be done there and so little time, maybe focusing on contributions to open source projects and libraries is the way to go. We have lots of individual contributors to the well known JVM frameworks and libraries and we encourage other WJUG members to join them and try to impact and improve open source projects as a group, not just as a bunch of individual contributors.Last but not least we will have an open-source brag in June, where anyone will have a chance to present his open source project.

Adam Bien: How many members the WJUG has? Are you happy with the participation. What could be improved?

It is hard to say exactly how many members we have. Our regular meetings gather usually from 50 to 200 people, conferences go over 1k. Our online discussions are subscribed by over 800 people and on our meetup there are over 600 people registered. Still not the numbers are important, but the quality of the meetings. We are constantly looking for interesting subjects, new speakers and ways for more effective networking. Together with our subgroups (Spring-Labs, Groovy User Group, Jboss User Group, etc.) we have practically 2 meetings per week.

Adam Bien: How the readers of this post could support your JUG?

Come over to our meetings, learn something interesting and share your knowledge by giving a talk. It’s simple.

Adam Bien: Thank you for the interview!

NEW: Java EE 7 Testing and Quality Workshop

A book about rethinking Java EE Patterns

Wednesday Apr 23, 2014

javaee7-essentials-archetype v1.2 released

The version 1.2 of the javaee7-essentials-archetype was released.


  1. Java 8 is the default compiler source and target
  2. The name of the war is derived from the artifactId. The version is no more appended.

Create a project directly from the IDE (in NetBeans: New Project -> Maven -> Project From Archetype. Choose com.airhacks as groupId in the search box).

Or use the CLI:

mvn archetype:generate -Dfilter=com.airhacks:javaee7-essentials-archetype

The archetype's source is available at: The project can be also directly cloned from:

Enjoy the lean way of coding! :-)

See you at Java EE Workshops at MUC Airport!

NEW: Java EE 7 Testing and Quality Workshop

A book about rethinking Java EE Patterns

Friday Apr 18, 2014

Java 8, Method Handles and Concurrency Utilities For Java EE

Java 8 with method handles enables direct execution of synchronous (legacy) code asynchronously within a managed thread pool:

Prepare your questions—I will attempt to answer them…live. See you soon!

See also other screencasts at: or subscribe to

See you at Java EE Workshops at MUC Airport!

NEW: Java EE 7 Testing and Quality Workshop

A book about rethinking Java EE Patterns

Tuesday Apr 15, 2014

Java 8: Reducing a List Into A CSV String

import java.util.ArrayList;
import java.util.List;
import static;
import static org.junit.Assert.*;
import org.junit.Test;

public class CSVStreamTest {

    public void listToString() {
        List<String> mascots = new ArrayList<>();

        String expected = "duke,juggy";
        String actual =
                reduce((t, u) -> t + "," + u).
        assertThat(actual, is(expected));

See you at Java EE Workshops at MUC Airport!

NEW: Java EE 7 Testing and Quality Workshop

A book about rethinking Java EE Patterns

Monday Apr 14, 2014

How To Tackle JavaEE - DevCrowd Keynote

How to structure a JavaEE application? How to organize your code? What are the essential ingredients of a maintainable JavaEE application? How to be productive with JavaEE?

I discussed such questions during the DevCrowd keynote:

Warning: I used slides in the first part of the keynote :-).

Any questions left? Prepare your questions and I will attempt to answer them …live. Drop a comment / question && see you at each first Monday of the month at 6 p.m (CET) []!

See you at Java EE Workshops at MUC Airport, particularly at the Java EE Architectures workshop, screencasts at: or subscribe to!

NEW: Java EE 7 Testing and Quality Workshop

A book about rethinking Java EE Patterns

Tuesday Apr 08, 2014

1st Airhacks Q&A And The Answers Are:

Additional 10 live questions, 1h and 83 live views. The first edition Airhacks Q & A was fun for me. I started with answering the 10 proposed questions, then got additional blog comments, tweets and chats in real time. After a 1h I had to catch QuestionsOverflowException and postponed some answers to the 2nd edition of Airhacks Q & A (Monday, May 5th, 6 PM (CET)):

Thanks for all the interactions during the event. It was fun for me ...and I saved lots of time.

Write your questions as comments to this post, drop me a tweet or write a comment on my youtube channel: I will pick again the 10 most recent questions and will answer them at the next edition of Airhacks Q & A.

We have sufficient stuff to cover, this blog has about 5000 comments, and probably 20% of that number are unanswered questions.

See you at the regular Java EE Workshops at MUC Airport and particularly at Distributed Computing and Persistence with Enterprise Java. ...and live each first Monday of the month at 6 P.M (CET)!

See also other screencasts at: or subscribe to

NEW: Java EE 7 Testing and Quality Workshop

A book about rethinking Java EE Patterns

Monday Apr 07, 2014

1st Airhacks Q&A And The Questions Are:

  1. Jeff Picklyk: "How would you suggest convincing the ivory tower decision makers to leave plain old Tomcat + Spring in favour of JavaEE 6 or 7?"
  2. Andreas Haufler: "...and you should evaluate: Do I even need a JavaEE monster? Scalability can be achieved at a much lower price (in terms of learning curve and complexity)."
  3. My thoughts on Controversial 80 characters max withs.
  4. Tony Anecito: "JavaFX and ClassPath"
  5. Alberto Gori: "If this is true, I would say it's better to call em.clear() just after em.flush()."?
  6. Manfred Pauli: "You state you're never design your application by technical structures. Where would you pack exceptions to? Especially if they are used through the whole project. "
  7. Yasser: "I am trying to use your example, but my test fails at "facade.service = service". It looks like my test case doesn't have access to the @EJB Service in the ServiceFacade."
  8. Tim B. "If you have two applications communicate via REST and DTOs are forbidden, how do you share the model between those two?"
  9. Anonymous: "How one generates eg: REST client stubs in Delphi for java endpoints? There is still no widespread WSDL-like tools for REST"
  10. Conversation with Jeanne Boyarsky about @Ignore in unit test

I will at least answer the above questions today. If you have any other questions, just write a comment to this post. There are a few hours left...

You can also ask questions during the show using the built-in chat: or via twitter mentioning me: (@AdamBien) or using the hashtag: #airhacks.

See you at Java EE Workshops at MUC Airport or on demand and in a location very near you:!

NEW: Java EE 7 Testing and Quality Workshop

A book about rethinking Java EE Patterns

Thursday Apr 03, 2014

GlassFish v4.0.1 Daily Build Supports Java 8 Lambda

GlassFish v4.0 does not support lambdas. If you attempt to deploy a Java EE 7 application with CDI and Lambdas you are going to get the following exception:

Severe:   Exception while visiting WEB-INF/classes/com/airhacks/lambda/test/BackendService.class of size 1825
java.lang.ArrayIndexOutOfBoundsException: 52264
	at org.objectweb.asm.ClassReader.readClass(
	at org.objectweb.asm.ClassReader.accept(
	at org.objectweb.asm.ClassReader.accept(
	at org.glassfish.hk2.classmodel.reflect.Parser$5.on(
	at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(
	at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(
	at org.glassfish.hk2.classmodel.reflect.Parser.doJob(
	at org.glassfish.hk2.classmodel.reflect.Parser.access$300(
	at org.glassfish.hk2.classmodel.reflect.Parser$
	at org.glassfish.hk2.classmodel.reflect.Parser$
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$

The following test source was used:

public class BackendService {

    public double average() {
        List<Integer> numbers = new ArrayList<>();
        return -> i).average().getAsDouble();


However, GlassFish v4.0.1 nightly builds builds starting with March, 20th 2014 supports Java 8 and lambdas. You can deploy Java EE 7 applications running on Java 8 with lambdas.

See you at Java EE Workshops at MUC Airport!

NEW: Java EE 7 Testing and Quality Workshop

A book about rethinking Java EE Patterns

Wednesday Apr 02, 2014

Airhacks Q & A and How To Tackle Java EE (7)

Two free (no registration required) streaming, but interactive, events are waiting for you:

  1. Airhacks Questions and Answers: At the first Monday of each month at 6 P.M. CET. (next event is scheduled for: Monday, April, 7th, 6 P.M CET). I'm going to answer all remaining questions about Java (SE/EE/FX/Nashorn) from, this blog, and from "the streets" :-). The length of the event directly depends on the question's queue depth.
  2. Virtual Keynote: "How To Tackle Java EE 7" from Abstract:
    You don't have to know the complete Java EE 7 API to create maintainable enterprise applications efficiently. The reverse is true: well designed Java EE applications comprise 95% business logic and only 5% plumbing. In this talk I would like to introduce a business driven approach to maintainable Java EE with lots of code and some slides
You can attend both events without any registration at: Questions can be asked during the event using the built-in chat or twitter with hashtag #airhacks.

See you at Java EE Workshops at MUC Airport or on demand and in a location very near you:!

NEW: Java EE 7 Testing and Quality Workshop

A book about rethinking Java EE Patterns

Thursday Mar 27, 2014

Java 8 + Nashorn Scripting + Mustache = Static Page Generator

SPG is a Static Page Generator written in JavaScript as an executable script on top of Java 8. SPG comprises a single file, comes with a single JavaScript dependency (mustache.js) and only requires Java 8 installed on your system.

SPG is simple: input.json + input.htm (processed by template) => input.htm (result).

SPG relies on mustache.js for rendering and therefore comes with support for sections, functions, conditional rendering etc.

SPG was created to maintain the registration pages for (externalize the dates, show badges like "registration closed"), so it is heavily used in production :-).

You will find sources at github. SPG is open source and Apache 2 licensed.

See you at Java EE Workshops at MUC Airport. SPG is going to be discussed during the Java EE 7 + HTML 5 workshop.

NEW: Java EE 7 Testing and Quality Workshop

A book about rethinking Java EE Patterns
...the last 150 posts
...the last 10 comments