Česky   |  Deutsch   |  English   |  Español   |  Français   |  Indonesia   |  日本語   |  한글   |  Polski   |  Português (BR)   |  Türkçe   |  中文   |  正體中文   |  Your Language  
Planet NetBeans is an aggregation of NetBeans related musings from all over the Blogosphere.
[RSS 1.0 Feed] [RSS 2.0 Feed]
[FOAF Subscriptions] [OPML Subscriptions]
Do you blog about NetBeans ? Add your blog to PlanetNetBeans.
Feed Subscriptions
APIDesign - Blogs (feed)
David R. Heffelfinger (feed)
Carsten Zerbst's Weblog (feed)
Winston Prakash's Weblog (feed)
NetBeans – Michael's blog (feed)
ProNetBeans (feed)
Paulo Canedo » NetBeans English (feed)
Anchialas' Java Blog (feed)
markiewb's blog (feed)
Need to find a title (feed)
Category: NetBeans | Software and Science (feed)
Roger Searjeant's blog (feed)
Inspiration and Expression » Netbeans (feed)
Adam Bien (feed)
Ignacio Sánchez Ginés » NetBeans (feed)
Bernhard's Weblog (feed)
Michel Graciano's Weblog (feed)
Ramon.Ramos (feed)
Ozone and Programming » netbeans (feed)
NetBeans Ruminations » NetBeans (feed)
Arun Gupta, Miles to go ... (feed)
Geertjan's Blog (feed)
.JARa's Bilingual Weblog (feed)
JavaFX Composer (feed)
The Java Jungle (feed)
Jesse Glick (feed)
Martin Grebac (feed)
The NetBeans Community Podcast (feed)
NetBeans Profiler (feed)
NetBeans for PHP (feed)
NetBeans Web Client (feed)
Rechtacek's (feed)
Virtual Steve (feed)
The Aquarium (feed)
Tinuola Awopetu (feed)
Insert Witty Irony Here (feed)
Netbeans – Gualtiero Testa (feed)
netbeans – James Selvakumar’s Blog (feed)
NetBeans – nB gUru (feed)
netbeans – Newsintegrator Blog (feed)
NetBeans – Praxis LIVE (feed)
NetBeans – TechAshram (feed)
Netbeans – There's no place like (feed)
Anuradha (feed)
Netbeans6/6.5 my best practices (feed)
Java Evangelist John Yeary (feed)
Neil's Dev Stuff (feed)
Computer says null; (feed)
NetBeans Adventures, Java and more (feed)
Bistro! 2.0 (feed)
NetBeans Community Docs Blog (feed)
The Netbeans Experience (feed)
NbPython/ jpydbg / pymvs (feed)
Shanbag's Blog (ರಜತ ಲೋಕ) (feed)
Wade Chandler's Programming Blog (feed)
Devlin's Lab (feed)
Big Al's Blog (feed)
Code Snakes (feed)
In perfect (spherical) shape (feed)
Van Couvering Is Not a Verb (feed)
Diego Torres Milano's blog (feed)
Vroom Framework (feed)
Messages from mrhaki (feed)
Jeff's Blog (feed)
Manikantan's Netbeans (feed)
Oliver Wahlen's Blog (feed)
Shuttle between Galaxies (feed)
Welcome to my live... (feed)
Netbeans IDE Blog by Tushar Joshi, Nagpur (feed)
Devel Blog (feed)
diamond-powder (feed)
Antonio's blog (feed)
Where's my Blog?!

Powered by:    Planet

Last updated:
February 08, 2016 07:04 AM
All times are UTC

Sponsored by
sponsored by Oracle

visit NetBeans website
Adam Bien - February 08, 2016 05:13 AM
Is It Possible To Create You Own JSR? -- An Interview About Java Community Process (JCP) with Heather VanCura

Heather please introduce yourself.

I lead the JCP Program Management Office (PMO) at Oracle, and am responsible for the day-to-day nurturing, support, and growth of the community, including the JCP.org web site, JSR management, community building, events, marketing, communications, and membership. I am also a leader of the global Adopt-a-JSR programs, working with Java User Groups (JUGs) around the world. In 2014, I took on the role of serving as Spec Lead of JSR 364, Broadening JCP Membership, which is evolving the JCP program itself. For JCP updates follow @jcp_org on Twitter. You can also find me @heathervc.

What is the relation between JCP and Oracle?

Oracle has a permanent seat on the JCP Executive Committee (EC), and together with the other EC members, the EC votes on the work of the Expert Groups and evolves the JCP itself. The EC is led by a non-voting Chair from the PMO; the PMO is the group within Oracle that is responsible for administering the JCP and chairing the EC. The EC does not micro-manage the day-to-day workings of Expert Groups - the EC has the opportunity to review the work of each Expert Group at well-defined points as their specifications proceed through the JCP program. The primary function of the EC is to ensure that specifications do not overlap or conflict with one another and that the specifications meet the needs of the industry segment for which they are being written.

How democratic is JCP? How much power has the community?

Anyone with an internet connection can review and comment on draft specifications and JSR proposals on JCP.org. Anyone with an internet connection and an e-mail address can register as a user of the site. Any registered user can nominate himself for an Expert Group (but must be JCP Members to serve), maintain a watch list of JSRs of interest,request to be associated with an existing JCP Member, or become a JCP Member. Any organization or individual which has signed a Java Specification Participation Agreement (JSPA) has become a JCP Member.

JCP Members can propose new JSRs, serve on Expert Groups, vote in the annual Executive Committee elections process, and run for a seat on an Executive Committee.

How hard is the introduction of a new JSR by an individual?

Any full JCP Member can submit a Java Specification Request (JSR) for approval by the EC. The Specification Lead is a representative of a JCP Member who leads a group of experts in developing a specification described in a JSR, and is responsible for delivering the Specification, the Reference Implementation (RI), and the Technology Compatibility Kit (TCK) for the JSR. These things together are a substantial software deliverable, and it does take quite a bit of effort on the part of the Individual, but there are a few Individuals that have successfully led JSRs to completion.

Some JSRs are in "maintenance mode". How much changes or additions are allowed? When it is better to introduce a new JSR?

Maintenance is for making minor changes to a JSR once it has completed the Final Release of the specification. Maintenance is an optional stage, since Spec Leads may choose to complete work at Final Release or present major changes or features to the specification in a new JSR. If significant changes are desired, a new JSR should be submitted by the Spec Lead. The community may submit requests for clarification, interpretation, and enhancements to the Specification by logging issues through the JSR's Issue Tracker. All changes proposed make their way into the Specification either through the Maintenance process or through a new JSR. Changes appropriate for Maintenance include bug-fixes, clarifications of the Specification, changes to the implementation of existing APIs, and implementation-specific enhancements.

Is it possible to take-over an "abandoned" or inactive JSR? Which steps are to take in such a case?

This is addressed in the JCP Process document section 1.2.4:

"There may be rare instances when members of the Expert Group feel that the Spec Lead is not acting in ways that advance the work of the Expert Group and is being unresponsive or inactive. The EG is expected to make a reasonable effort to resolve any such issues in a timely manner. However, if the situation cannot be resolved these concerns should be brought to the attention of the EC as quickly as possible so they may be proactively addressed and resolved. If the problems cannot be resolved informally, any three members of the EG may request the EC to replace the Spec Lead. All such requests must clearly state the cause of the concern and provide all necessary evidence. If the EC agrees that there is cause, it may ask the PMO to replace the Spec Lead. In the case where the Spec Lead is a Member Representative the PMO shall ask the Member to replace the Spec Lead. If the Member refuses to do so, the PMO shall seek to put in place an alternative Spec Lead, in which case the EC must conduct a transfer ballot as specified in section 5.1.2 of the JCP Process document: If no Spec Lead replacement can be found, the EC shall initiate a JSR Renewal Ballot to determine whether the JSR should be shut down. If the Maintenance Lead decides to discontinue his or her work at any time (including discontinuing maintenance activities or declining to take on the role of Spec Lead during a significant revision initiated by a new JSR) the ML, with the assistance of the PMO, should make a reasonable effort to locate another Member who is willing to take on the task. If a replacement is identified the PMO must initiate a Transfer Ballot within 30 days to enable EC members to approve the transfer of responsibilities. If the ballot succeeds, the new ML must assume his or her responsibilities within 30 days. If no replacement can be found, or if the Transfer Ballot fails, then the PMO shall declare the Specification to be Dormant and no further maintenance can be carried out. No further Transfer Ballots will be initiated by the PMO unless a Member volunteers as ML, in which case the PMO will again have 30 days to initiate a Transfer Ballot."

The JCP process is continuously changed and versioned. Who decides when it is time to introduce a new version? How frequently new versions are released?

We call this effort 'JCP.Next', and evolving the JCP program itself is addressed in Appendix A of the JCP Process Document:

Revisions to the Java Community Process (JCP) and the Java Specification Participation Agreement (JSPA) are be carried out using the Java Community Process with the following changes:

Only EC members can initiate a JSR to revise one of these documents.
The EC must approve the JSR.
The Expert Group consists of all EC members with a member of the PMO as Spec Lead.
There is no Reference Implementation or Technology Compatibility Kit to be delivered and no TCK appeals process to be defined.
There is not a specified time for new versions of the JCP program to be released, but we are listening and responding to the needs of the community over time. To give you an idea of the history, in June 2000, JCP 2.0 replaced the previous JCP 1.0 version for new submissions. Further refinements to the voting rules resulted in JCP 2.1, introduced in July 2001. A major revision of the licensing rules for the Spec, RI and TCK as well as IP policy changes and process changes was put in place by JCP 2.5, launched on October 29, 2002. The process was revised in May 2006 with the release of JCP 2.6, and in May 2009 with JCP 2.7. In October 2011 we introduced JCP 2.8 to open up the operations of JSR expert groups and increase transparency. The current version of the process is JCP 2.9, which was introduced in August 2012. We are now in the process of finalizing JCP 2.10 through JSR 364, Broadening JCP Membership.

This JSR is in Proposed Final Draft stage and is expected to complete in 2016 - a good topic for a future conversation :)!

How hard is it to change / improve the JCP process itself?

The JSR lifecycle process works very efficiently and transparently. As you can see from the timeline above, describing the evolution of the different versions of the JCP, it is an effort that takes some time working together with the developer community and the JCP EC Members, who serve as members of the JSR expert group. For minor changes, the maintenance process described earlier, can also be used for updates to the JCP program itself.

Are the differences in the governance / process / handling of the different platforms like Java EE, Java SE and Java ME?

In 2012, JCP 2.9 merged the two Executive Committees (Standard/Enterprise Edition and Micro Edition) into one single Executive Committee. The merged Executive Committee votes on all JCP 2.x JSRs now, regardless of which JCP 2.x version it is.

Many questions can also be answered in the FAQ: www.jcp.org/en/introduction/faq

Heather, thank you for the interview!

Real World Java EE Workshops [Airport Munich]>

Adam Bien - February 07, 2016 07:45 AM
Converting a Map Into javax.json.JsonObject with Java 8

With a custom Collector:

import java.util.Map;
import java.util.stream.Collector;
import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonObjectBuilder;

public interface JsonCollectors {

    public static <T> Collector<Map.Entry<T, T>, ?, JsonObjectBuilder> toJsonBuilder() {
        return Collector.of(Json::createObjectBuilder, (t, u) -> {
            t.add(String.valueOf(String.valueOf(u.getKey())), String.valueOf(u.getValue()));
        }, JsonCollectors::merge);

    static JsonObjectBuilder merge(JsonObjectBuilder left, JsonObjectBuilder right) {
        JsonObjectBuilder retVal = Json.createObjectBuilder();
        JsonObject leftObject = left.build();
        JsonObject rightObject = right.build();
        leftObject.keySet().stream().forEach((key) -> retVal.add(key, leftObject.get(key)));
        rightObject.keySet().stream().forEach((key) -> retVal.add(key, rightObject.get(key)));
        return retVal;

...a Map<String, String> can be easily converted into a JsonObject:

    public JsonObject environmentVariables() {
        Map<String, String> environment = System.getenv();
        return environment.entrySet().

The sample above is taken from github.com/AdamBien/ping

See you at Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.

Real World Java EE Workshops [Airport Munich]>

Adam Bien - February 05, 2016 07:51 AM
LightFish "SkinnyFish" Payara / GlassFish monitoring tool released

LightFish v1.3.2 (aka SkinnyFish) monitoring tool is available. No major features were implemented, but the performance and resource consumption were greatly improved.

To install LightFish deploy the 364 kB WAR to Payara / GlassFish. The optional "lighview" client is also available for download.

See you at Java EE Workshops at Munich Airport, Terminal 2 and particularly at Java EE 7 Microservices. Sometimes I use LightFish to illustrate bulkheads.

Real World Java EE Workshops [Airport Munich]>

Adam Bien - February 04, 2016 05:17 AM
The Only One Dependency You Need In Java EE 7

Java EE 7 projects need only one single dependency in pom.xml:


This javaee-api dependency contains all Java EE 7 APIs (from EJB, JTA, JCA over CDI to JPA), is 1.8 MB big and because the server implements the APIs, it never ships with the WAR.

Mainstream Java EE projects can be easily built with the following pom.xml:


Gradle build script has similar length:

def WAR_NAME='skinny.war'
apply plugin: 'war'
apply plugin: 'maven'
group = 'com.airhacks'
version = '0.0.1-SNAPSHOT'

repositories {
dependencies {
    providedCompile 'javax:javaee-api:7.0'

compileJava {
    targetCompatibility = '1.8'
    sourceCompatibility = '1.8'

    archiveName WAR_NAME

Project structure for skinny projects can be easily created with mvn archetype:generate -Dfilter=com.airhacks:javaee7-essentials-archetype.

See you at Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.

Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - February 03, 2016 10:18 PM
Spring Boot Scenario with NetBeans IDE

Today Spring Boot guru Josh Long (@starbuxman) sent me a helpful scenario for getting started with Spring Boot. I've finetuned and translated some aspects to make everything work smoothly in NetBeans IDE.

So, let's get started. Go to http://start.spring.io, click "Switch to the full version", and choose the 'H2', 'web', 'JPA', and 'REST Repositories' checkboxes. Alternatively, you can use the auto completing drop down on the right. You'll get a JAR-based Maven project. Instead, make sure where it says "Packaging" to select "War", as shown below.

Click "Generate Project" at the bottom of the page, which by default will give you a ZIP file named "demo.zip" on disk.

No need to unzip that ZIP file or to go through any kind of complex import process to get the project it contains into NetBeans IDE. Instead, go here:

As can be seen above, go to File | Import Project | From ZIP and then browse to the "demo.zip" file. Click "Import" and NetBeans will unzip your file, open the Maven project, and display it in NetBeans IDE. If some/all of the dependencies have not been downloaded by Maven, you'll see various project problems and errors, which you can solve by right-clicking the project and choosing Build. That will download the Maven dependencies and at the end the project should look nice and neat, as follows:

All the coding we will do from this point onwards will be done in the "DemoApplication.java" file that you see in the "com.example" package above. The import statements we'll need are as follows:

import java.util.Collection;
import java.util.stream.Stream;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.annotation.Id;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.data.rest.core.annotation.RestResource;
import org.springframework.stereotype.Component;

Add each class below beneath the previously existing class in the file. In other words, all the code we'll be working on will be within the same Java source file.

Start by adding a simple JPA entity:

class Reservation {
    private Long id;
    private String reservationName;
    public Long getId() {
        return id;
    public String getReservationName() {
        return reservationName;
    public Reservation(String reservationName) {
        this.reservationName = reservationName;
    public Reservation() {
    public String toString() {
        return "Reservation{" + "id=" + id + ", reservationName=" + reservationName + '}';

Next, we need some way to handle persistence logic, therefore add the following below the previous code in the file, to create a Spring Data JPA repository:

interface ReservationRepository extends JpaRepository {
    @RestResource(path = "by-name")
    Collection findByReservationName(@Param("rn") String rn);

Finally, again below the previous code in the same file, you'll need to insert some simple sample data, so create a component that gets called on application startup:

class DummyCLR implements CommandLineRunner {
    private ReservationRepository repository;
    public void run(String... args) throws Exception {
        Stream.of("Josh", "Geertjan", "Pieter").forEach(x -> 
           repository.save(new Reservation(x)));

Now let's run the application, using this tip to do so, which will run the embedded Tomcat provided by Spring Boot and deploy the application to it, correctly running the code from the "public static void main" entry point of the application. We'll be circumventing the NetBeans approach to deploying applications completely and making use of the corresponding features provided by Spring Boot instead.

To do this, right-click the project, click Properties, and rewrite the "Execute Goals" field of the "Run project" action from "package" to "org.springframework.boot:spring-boot-maven-plugin:1.3.2.RELEASE:run", as shown below:

Now, whenever you press F6, you'll be deploying the application to the embedded Tomcat, which you'll also be starting up. In the Output window (Ctrl-4), you can stop the process, i.e., shutdown the embedded Tomcat and undeploy the application.

Run the application via F6 or by choosing "Run" on the project or in the toolbar, which will end up showing you the reservations in the Output window:

Also, when you open your browser to "http://localhost:8080/repositories" you'll see the REST API stood up for you based on your data set, which will initially show an error. "OK," says Josh, at this point. "This is all well and good but let's get serious! This uses an embedded in-memory DB! And there are no operational features. This isn't ready for production! How do you see things like the health of the app? metrics?"

Right-click the "Dependencies" node in the project, choose "Add Dependency", and add "spring-boot-starter-actuator":

After you click "Add" above, the dependency will be added to the POM. Actually, no version should be required since its dependency is managed by Maven in the parent POM. Now, if you restart, i.e., end the process and restart it, you should now be able to hit URLs like the following: localhost:8080/, /reservations, /reservations/1, /reservations/2, etc.:

You should also be able to visit /metrics and /health. "Not bad," says Josh. "Info on the state of the app."

The above instructions are all the basics needed for getting started with Spring Boot. More in follow up blog entries soon.

Adam Bien - February 03, 2016 05:13 AM
Java EE 8 News, Documentation, Production Issues, Multiple REST Endpoints, Maven Or Gradle: 23rd Airhacks.tv Questions and Answers

The longest show with the most live viewers (134) with Java EE 8 news and questions about WildFly, JBoss, microservices (of course :-)), architecture documentation, HTTP setup, SSO (...) is online:

Any questions left? Start asking and get answers at March, 7th, 6 pm CET: ustream.tv/channel/adambien. Archive is also available: airhacks.tv.

See you at Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Afraid to fly? Learn from home: airhacks.io.

Real World Java EE Workshops [Airport Munich]>

Adam Bien - February 02, 2016 08:08 AM
Extreme Productivity With Java EE: In 35 Days Helping 20.000 Families

Mohamed, please introduce yourself.

My name is Mohamed Taman and I am an Enterprise Architect & Software Development Manager at e-finance, Java Champions, Adopt-a-JSR, JCP member, was JCP Executive Committee member, JSR 358, 354, 364, & 363 Expert Group member, MoroccoJUG board, EGJUG leader, Oracle Egypt Architects Club board member, speaks Java, loves mobile, international speaker. Won the 11 annual JCP awards 2013 for Outstanding adopt-a-JSR participant, and Duke's Choice Award 2014, 2015.

How popular is Java / Java EE in Egypt?

Java EE is very popular in Egypt as development technology stack. 70% of projects developed in Egypt they are using Java EE as web development, also we strongly introduces Java in universities, Java community, beside after graduate institutes famously ITI which gives diplomas specifically in Java track for post graduates to cope with market needs, And we as EGJUG do this too for our strong community.

Which application servers, tools and IDEs are you using?

Me and my team recently moved to use NetBeans IDE, and JDeveloper too, using eclipse for some projects, from application servers point of view we uses IBM WebSphere in production, beside Oracle Weblogic, GlassFish, and recently trying to use Payara and Wildfly.

What are the most impressive Java EE projects you were involved so far?

Currently there are many projects I am working on around 34 Java EE projects and support others at the same time.

What are you building with Java EE right now?

I am working on a project which won 2015 duke’s choice award, as extended success of previous United Nations UNHCR/WFP Subsidy Card for refugees’ which also won duke’s choice award 2014, We have been asked to build a system that helps poor people having children listed basic education levels under Ministry of Education in each country, to get their benefits (Cache for Food (from UNWFP)) through secured cards, controlled by WFP organization and developed and operated by efinance in 2 months.

The key challenge here was the Huge System, time-to-market, lack of detailed requirements (6 modules to be developed), POS programming, and JavaFX Tablet based Application for registration (offline), Card EMV and applet / lifecycle management, and should be costless, Short time to deliver the application, risk of new technology usage.

Architected, developed, and tested in 35 days. Result; It is now live application applied to Egypt as pilot that helps 20,000 families in 2 poor cities (Louxor, and Sohag). By the end of this year will be 500,000 families covering all main Egyptian cities, and rolled out to other countries.

Is Java EE productive? What is your opinion?

Yes very productive as I have mentioned before at JavaOne 2014 strategic keynote with Cameron Burdy, especially the convention is it work by default without any configuration, “Configuration by exception”, also introduction of web profiles makes final product (war file) more light and les resource consuming, beside introduction to new JSRs that helps development standardization without using third party libraries.

How important is the Java EE standard to you? Is your code dependent on application server specific features?

As JCP member involved in many JSRs especially the new ones, The standardization means freedom of development and portability which makes it easy to migrate from app server to another smoothly, with application servers that follow the same Java EE standards.

Is you company hiring Java EE developers?

Yes indeed as Java team is a core of the Business solution software development and innovations, my department consist of the following sub-departments:

  1. Java Team (6 members will grow to 12 by the end of this year)
  2. Quality Control team (3 QC Java engineers).
  3. Architecture team
  4. System Analysis team
  5. Research & development team

Any links you would like to share with us?

  1. Duke choice award 2014
  2. Duke choice award 2015
  3. tamanmohamed.blogspot.com.eg

Mohamed, thank you for the interview! I'm already looking forward to the Duke choice awards 2016 :-)

Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - February 01, 2016 11:58 PM
Diffing Couchbase Buckets

Now Couchbase buckets can be queried and diffed. Click to enlarge the screenshot to get a full view of it:

Adam Bien - February 01, 2016 05:42 AM
Configuring The EntityManager At Injection Time

To configure an EntityManager on-the-fly inject the EntityManagerFactory and expose the EntityManager with custom configuration:

public class EntityManagerConfigurator {

    EntityManagerFactory emf;

    Map<String, String> jpaConfiguration;

    public EntityManager configureEm() {
        EntityManager em = emf.createEntityManager(SynchronizationType.SYNCHRONIZED, jpaConfiguration);
        System.out.println("configuredProperties = " + em.getProperties());
        return em;

Now the EntityManager becomes injectable with @Inject:

public class WorkshopScheduler {

    EntityManager em;


The properties can be exposed via injection or read from java.util.Properties:

public class Configurator {

    public Map<String, String> expose() {
        Map<String, String> jpaConfiguration = new HashMap<>();
        jpaConfiguration.put("eclipselink.logging.level", "FINE");
        return jpaConfiguration;

See also github.com/AdamBien/jc2 with github.com/AdamBien/headlands for JCache based configuration.

See you at Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.

Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - January 31, 2016 05:35 PM
Couchbase Bucket Hierarchy in NetBeans IDE

See below the current status of the Couchbase integration that is a work in progress. Now arbitrary buckets can be expanded and data can be viewed:

All these are indexed columns. Next step is to show non-indexed columns and enable them to be indexed. Also a GUI for simple queries will be added, before adding an editor of some kind for full blown querying of the data.

Adam Bien - January 31, 2016 02:56 PM
Integration Testing: Setting System Properties Before DeltaSpike

DeltaSpike's Test-Control Module loads the unit test after the injected classes. Therefore any configured system properties set in @Before or even @BeforeClass are not going to be considered.

To test the underlying class:

public class SystemPropertyExposer {

    public String expose() {
        return System.getProperty("dev");


with e.g:

public class SystemPropertyExposerIT {

    String developer;

    public void developerInjection() {
        assertThat(developer, is("duke"));


You will have to set the property, before the initialization of SystemPropertyExposer.

This can be achieved with the following workaround:

import org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner;
import org.junit.runners.model.InitializationError;

public class PropertiesLoaderTestRunner extends CdiTestRunner {

    static {
        System.setProperty("dev", "duke");

    public PropertiesLoaderTestRunner(Class testClass) throws InitializationError {


The sample above was pushed into: github.com/AdamBien/javaeetesting.

See you at Java EE Workshops at Munich Airport, Terminal 2 and particularly at Continuous Java EE 7 Testing and Quality.

Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - January 30, 2016 05:46 PM
IBM WAS Liberty Profile and NetBeans IDE (Part 2)

Following on from part 1, the basic infrastructure of the support for IBM WAS Liberty Profile has been set up, e.g., look in the Servers node and notice the WebSphere Liberty node below:

Other parts are ready too, e.g., the wizard for configuring the server and the dialog for customizing it afterwards.

All the code is here:


NetBeans – Michael's blog - January 30, 2016 01:53 PM
NetBeans Day Cologne

The first NetBeans Day Cologne is scheduled for Sept 9th 2016. Today I’m proud to announce the preliminary agenda. 10:00 Opening session (Geertjan Wielengan) 11:00 Keynote (TBD, e.g. about microservices) 12:00 Lunch 13:00 Parallel workshops: „Design Patterns of the NetBeans Platform“ (Geertjan Wielenga) „Java Everywhere with DukeScript“ (Anton Epple) 15:00 Coffee & Tea 15:30 Parallel … “NetBeans Day Cologne” weiterlesen

Adam Bien - January 30, 2016 10:23 AM
Java EE 8 News, WildFly vs. JBoss, Property Injection, HTML 5 in WARs, Images in DB or 23rd Airhacks.tv

Also this month, Monday, 1st February, 6 pm CET: questions from all around the world and Java EE 8 news are going to be streamed live. No registration required:

  1. News from Java EE 8, and particularly from : (RESTful) Management JSR-372, JCache Integration JSR-107 and MVC JSR-371
  2. Is it possible to change persistence unit parameters at runtime?
  3. Post production microservice management
  4. WildFly vs JBoss in production
  5. Properties injection and configuration in Java EE
  6. Where to put "reasonable" interfaces in BCE?
  7. Should a WAR also contain HTML 5 assets?
  8. Short example of security in JAX-RS
  9. Saving images in a DB (or not)?
  10. How to setup up Apache for Payara / Wildfly
  11. How to implement SSO via HTTP exclusively?

Ask questions during the show via twitter mentioning me: http://twitter.com/AdamBien (@AdamBien) or using the hashtag: #airhacks. You can join the Q&A session live each first Monday of month, 6 P.M at airhacks.io or http://www.ustream.tv/channel/adambien

See also other screencasts at: youtube.com/c/bienadam.

See you at Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.

Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - January 30, 2016 12:19 AM
Moving Along Fast with Couchbase and NetBeans IDE

With Arun and Eben from Couchbase, I've started a series of webcasts focused on creating integration of Couchbase into NetBeans IDE. Today we recorded the 2nd part, to be released soon by Arun.

The main feature of part 2 is that we now have the Couchbase server set up on my laptop. We moved the NetBeans plugin from Ant to Maven and all the source code is checked into the GitHub repo:


I've moved on a little bit further in preparation for the 3rd part of the series... as you can see below, i.e., the start of the node hierarchy has been extended a bit: 

So... if you want to learn about the Nodes API in the NetBeans Platform and how to leverage it in your own plugins for NetBeans IDE, as well as in your own modular Java desktop applications, follow the series of cool webcasts with many thanks in particular to Arun.

Adam Bien - January 29, 2016 03:04 AM
Java 8 Streams: From List To Map

A list of POJOs:

public class Workshop {

    private String name;
    private int attendance;

    public Workshop(String name, int attendance) {
        this.name = name;
        this.attendance = attendance;

    public String getName() {
        return name;

    public int getAttendance() {
        return attendance;

...can be directly converted into a Map using the built-in toMap Collector:

import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import org.junit.Test;

public class CollectorsTest {

    public void listToMap() {
        List<Workshop> workshops
                = Arrays.asList(
                        new Workshop("bootstrap", 21),
                        new Workshop("effective", 42)
        Map<String, Integer> workshopsMap = workshops.
        assertThat(workshopsMap.size(), is(2));
        assertThat(workshopsMap.get("bootstrap"), is(21));
        assertThat(workshopsMap.get("effective"), is(42));



See you at Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.

Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - January 28, 2016 10:47 PM
Space, Aeronautics, Defense, and Nuclear Research on the NetBeans Platform

SYCLONE by Clemessy is a modular solution for SCADA and real-time command/control systems. It provides a graphical display, graphical sequence editor, and a real-time sequence executor. The modular design allows it to be used in projects of all types, from touch panels in hardened cabinets for processes with no real-time needs, to control and measuring systems for commercIal and military launchers and boosters.

The SYCLONE Project Editor, shown above, is built on top of the NetBeans Platform. It provides a GUI Designer that is able to animate symbols based on process state, a script editor, and a general configuration editor.

The organization using and developing this application is located in France. SYCLONE is used in Space, Aeronautics, Defense, and Nuclear Research projects.

APIDesign - Blogs - January 28, 2016 07:56 AM
Snowcamp in Grenoble gave Bck2Brwsr 10x Speed Up!

Bck2Brwsr version 0.17 is faster. Ten years ago nobody would imagine dynamic languages could get as good performance as they have now. The feeling that JavaScript just can't be fast is presumably present in many of our souls. The truth is, it can be relatively fast - not as fast as Java as my experiment with Sieve of Eratosthenes shows, but pretty damn fast. Certainly not an excuse to be ten times slower than HotSpot (which was the previous state of Bck2Brwsr).

The daily work on Truffle compiler team and the time I got when traveling from Snowcamp at Grenoble gave me a chance to speed Bck2Brwsr up. The sieve being a nice - e.g. small and focused - benchmark. Originally the algorithm couldn't be finished in a reasonable time when running on old version of Bck2Brwsr, but knowing what optimizing compilers seek for, it was relatively easy to speed it up ten times.

With great pleasure I announce that Bck2Brwsr, the most complete Java VM in browser (that can run Javac as shown by Dew project) has been sped up many times being at most three times slower than HotSpot. Given the primary goal of Bck2Brwsr is modularity and not speed, I consider it a good sped up even knowing there is a room to make it even faster.

Enjoy the Bck2Brwsr 0.17's speed!

--JaroslavTulach 07:56, 28 January 2016 (UTC)

Adam Bien - January 28, 2016 05:09 AM
Java EE in Microsoft's Cloud or Interview With Java Evangelist ...At Microsoft

Yoshio, please introduce yourself

Dear Adam-san Thank you so much for providing me this great opportunity. I have been working as a Java Evangelist at Microsoft Japan since July 2015. And I’m one of the board members of the Japanese Java Users Group. http://www.java-users.jp/

Before I joined Microsoft, I worked as a GlassFish evangelist at Sun Microsystems Japan. And after acquisition of Sun by Oracle, I worked as a Java/Java EE evangelist at Oracle Japan for 5 years. My work at Oracle Japan involved planning, managing and speaking at many Java related technical conferences and events in Japan, such as JavaOne Tokyo, Java Day Tokyo, and Japanese Java Users Group events.

Here’s a sample of one of the many presentations I created during this period: http://www.slideshare.net/OracleMiddleJP/presentations?order=popular

And here’s my popular Japanese blog: http://yoshio3.com/

And I have also spoken att JavaOne San Francisco 2013: http://www.slideshare.net/OracleMiddleJP/javaone-2013-san-francisco-asynconcurrencyonee7

I joined Microsoft Japan in July 2015, and continue to be a Java Evangelist in Japan.

You worked in the past as Java EE Evangelist in Japan. How popular is Java EE in Japan?

Java EE has become very popular in Japan. After Java EE 7 was officially released in June 2013, many Japanese Java EE related books have been published and every year, Oracle Japan has held the Java Day Tokyo Java technology conference. All Java EE related sessions are usually full, and many Japanese developers refer to my presentation, shown here: http://www.slideshare.net/OracleMiddleJP/presentations?order=popular

Other Japanese developers have also been writing Java EE related content on their blogs. For example, Japanese developers have created the “Java EE Advent Calendar” every year. Here are the results of that effort for the past 4 years:

Java EE Advent Calendar (2012-2015)

I started promoting Java EE since 2009 when Java EE 6 was released officially. At that time, most developers were not interested in Java EE, as up to then they had been using Struts/Spring/Hibernate or Japanese original framework. Since then the situation has changed drastically. These days, Japanese developers usually select from 3 options of Java EE/Spring(MVC or boot)/Play for developing the Java Web Applications.

Which application servers are the most popular in Japan and why?

This is a very difficult question. In the past, I was GlassFish evangelist. So a lot of developers around me use GlassFish/Payara in their development environment. I’ve heard that a lot of people are using Tomcat. In enterprise environments, application servers are very important. In these environments, WebSphere, WebLogic or JBoss EAP are more common. Recently advanced developers are not installing the Application Server on cloud services, but instead of installing the Application Server, they create standalone jar files which include a Web container (Embedded container) to create as a microservice. So it means that depending on the requirement, developers or companies will select the Application Server or container that best suits their needs.

You are working now as Java Evangelist at Microsoft. What is exactly your job?

I have two roles. First, I inform non MS customers about the changes to Microsoft’s culture to become more open, to attract new fans of new Microsoft. After Satya Nadella became the new CEO of Microsoft in 2014, Microsoft has drastically changed. For example, Satya has shared surprise messages, like “Microsoft Loves Linux” and spoke at the keynote of a major Apple event, including announcement of Office on iOS.

I have been working with the Unix OS and Java since university, so I don’t have as much knowledge of Microsoft products. However there is no problem in Microsoft now with this. Regardless of the OS and programing language, we can now provide any service for any language and OS on Microsoft Azure. For example, on Azure you can deploy a Linux or FreeBSD virtual machine running Java, PHP, Perl, Ruby or Node.js.

Finally, I loved Sun Microsystems as a company because Sun was leading and creating the next generation of IT technology. Like Sun, Microsoft is now changing to create the latest IT technology. Because of this I’ve become a fan of Microsoft and I love it now. As a Java evangelist at Microsoft, I enjoying informing new communities about the changes at Microsoft and promoting Java on Microsoft Platforms.

Second, As a Java evangelist at Microsoft, I get to provide technical information on using Java on Microsoft Platforms for both developers and administrators. My past experience is a great fit for this. For example, you may already know that 25% of virtual machines running on Azure are running Linux, and of course Java Web Applications can run on that. Recently developers worldwide are very interested in new technologies like DevOps, Microservices, and Docker. And of course these can be run on Azure too. I have created a Java DevOps (Git,Jenkins,Docker and Tutum on Azure) video demonstration here: https://youtu.be/K-AFA5D_0OM

You can also create your own service on Azure using Azure SDK for Java. As an example, here is a JSF sample program I created which uploads files to Azure Storage: https://github.com/yoshioterada/JavaEE7-App-On-Azure To create an authentication service, you can use Active Directory (85% of large enterprises use Active Directory). Using AD, you can create multi-authentication Applications by using 2-factor authentication by phone. This is very useful for Java developers and mission critical enterprise applications.

At JavaOne you presented how to push GlassFish / Payara to the Microsoft cloud. How hard is it?

In order to run the GlassFish/Payara, I recommend you one of these three easy options. I showed the demo of No.3 at JavaOne 2015.

  1. IaaS (Infrastructure as a Service)
  2. Cloud Service (Classic)
  3. Docker on Azure
  1. You can create a Linux (Ubuntu, CentOS etc.) or Windows Server in a Hyper-V virtualization environment. Based on a wizard base configuration in the Azure Admin portal screen, you can very easily create this. After you create the VM, you can install the GlassFish/Payara on the new VM by yourself.
  2. Cloud Service(Classic PaaS) provide a PaaS-type service. You can deploy a package which includes a custom JDK, App Server and target application, running on Windows Server. The Windows Server OS is managed by Microsoft. To package the application for deployment you can use a plugin in either an Eclipse or Intellij plugin. You can select the AppServer as Tomcat, GlassFish, Liberty, JBoss, or Jetty, or configure a custom server.
  3. Docker on Azure can run on a CoreOS or individual installation. I recently showed a demo which used the GlassFish on a Docker container. The Docker container runs on CoreOS created from the Azure Portal marketplace. You can create a GlassFish environment in only 20 minutes using the Azure administration portal.
Here’s a demonstration: Demonstration Video https://www.youtube.com/watch?v=xjs0EiETZfc All required files. https://github.com/yoshioterada/GlassFish-Docker

How productive is Java EE?

For Java EE productivity, I recommend the NetBeans IDE. I created the following demo in Japanese using NetBeans and GlassFish: https://www.youtube.com/watch?v=qkOPAwr0YqY

As you can see, I could create an Ajax Web Application in only 11 minutes without any configuration. To create the same application, just install the NetBeans(bundled with GlassFish). This is very useful for developers for preparing a development environment. Java EE includes all of the things needed to develop the Web Application. If you don’t have enough knowledge of HTML 5, you can use Java Server Faces as the Web Framework. And if you would like to use HTML 5 more, you can use the JAX-RS RESTful Web Services. You can also take advantage of extensibility in Java EE. For example, if you would like to use another framework, you can include it in your application. For these reasons I recommend developers use the Java EE as a standard technology.

How important is the Java EE standard for you? Is your code dependent on proprietary application server features (like e.g. specific GlassFish or WLS features)?

The Java EE standard is very important for enterprise developers. There is a lot of non-standard technology in the world that should only be used very carefully. Backward compatibility, project roadmaps, management cost and activation need to be carefully considered. Java standard takes care of backward compatibility, as does Java EE. The project roadmap is shared with everyone by spec lead. Also, all Java specifications are decided under the JCP program, which is very open and transparent. Anybody can contribute to an individual specification. For example you can join “Adopt A JSR” program at https://java.net/projects/jjug/pages/Adopt-a-JSR-JP.

All of the code is able to run on a Java EE compatible application server except for one function - security. Until Java EE 7, developers needed to write and configure a proprietary authentication/authorization implementation. Java EE 8’s official release solves this with the included JSR-375 (Java EE Security API).

Take a look at the Java EE 8 APIs. Which of the APIs are most interesting / important to you?

For Java EE 8 I also created this Java EE 8 presentation in Japanese: http://www.slideshare.net/OracleMiddleJP/java-ee-8-41541611 I’m really looking forward to the Java EE 8 release. A lot of useful features will come to the world with this release. For example I’m interested in JSR-353(JSON-P),JSR-367(JSON-B),JSR-365(CDI),JSR-371(MVC) and JSR-375(Security).

If we use the JSON-B, we can treat JSON dates more easily. Also, JSON pointer and patch available in the next version of JSON-P are very useful. Since Java EE 6, CDI is one of the most important technologies in Java EE. Not only type safe loose coupling, but also other functions such as event processing. And CDI will have even more functionality in the future. In order to prevent becoming another big framework like EJB, the lightweight version of CDI will be available in the next version.

Finally security, provides a standard authentication/authorization API. If we are able to use it, we can get rid of all of proprietary security code from my applications.

Do you have any articles, screencasts or other resources you would like to share with us?

English [Entry Point] : Lots of options for Java Cloud developers with Azure! https://azure.microsoft.com/en-gb/blog/lots-of-options-for-java-cloud-developers-with-azure/

Brian Benz : Microsoft Java Evangelist(Global),Twittter : @bbenz, SlideShare : http://www.slideshare.net/brianbenz/presentations, LinkedIn: https://www.linkedin.com/in/brianbenz

Japanese (By myself) Blog : http://yoshio3.com/microsoft-azure/ SlideShare : http://www.slideshare.net/tyoshio2002/ Twittter : @yoshioterada GitHub : https://github.com/yoshioterada

Yoshio - thank you a lot for the interview. And keep your Java passion growing at Microsoft!

Real World Java EE Workshops [Airport Munich]>

Adam Bien - January 27, 2016 09:08 AM
Configurable CircuitBreaker For Java EE

breakr is a simplistic interceptor (6KB) which ignores all calls to the decorated component when a configurable threshold is reached.

The decision when to open or close the circuit and the information about the state of the breakr is maintained in the class com.airhacks.breakr.Circuit.

To introduce custom behavior, just inherit from the Circuit and introduce your own business logic:

public class CustomCircuit extends Circuit {

    private AtomicBoolean open = new AtomicBoolean(false);

    public boolean isOpen(long maxFailures) {
        return open.get();

    public long getFailureCount() {
        return failureCounter.get();

     * controls the closing and opening of the circuit
    public void setOpen(boolean open) {

For more details checkout github.com/AdamBien/breakr.

See you at Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.

Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - January 27, 2016 08:00 AM
IBM WAS Liberty Profile and NetBeans IDE (Part 1)

I had a meeting with several developers the other day, some from IBM, about the need to create support for the IBM WAS Liberty Profile in NetBeans IDE. From their side, the feeling was that developers have been asking for this for some time and it would be great if there were to be a plugin for NetBeans IDE users who want to work with IBM WAS Liberty Profile.

So, we've set up a GitHub repo and are working from two ends. From the NetBeans end, we're providing a generic plugin infrastructure for hooking into IBM WAS Liberty Profile commands. From the other end, i.e., IBM and others involved with the relevant knowledge, utility methods are being provided for interacting with commands such as start, stop, debug, etc, to interoperate from NetBeans with the IBM WAS Liberty Profile.

Informally, various resources are being provided for this work from various ends, for asking questions, for testing, etc.

Here's the related NetBeans issue:


And here's the GitHub repo where all the work will be done:


NetBeans – Michael's blog - January 26, 2016 10:53 PM
Talks at Parallel 2016

I’m going to talk at the parallel 2016 [1]. It’s a software congress about parallel programming at Heidelberg on April 6th and 7th. Beside other programming languages there are some session dealing about parallel programming with Java. I’m going to talk about Java Lambdas & Parallel Streams beyond intermediate and terminal operations [2]. This talk … “Talks at Parallel 2016” weiterlesen

Adam Bien - January 26, 2016 05:15 AM
Executable Intro Into The RESTful Java EE 8 Management API 2.0

All Java EE application servers have to provide management and monitoring data via a standardized JMX / EJB interface since 2002 via the JSR 77: J2EE Management. Such information is particularly important in "microservice" architectures to access the health and monitoring data of a service.

JSR 373: Java EE Management API 2.0 aims to expose the JSR-77 via a set of easier accessible and self-descriptive "REST" endpoints.

The early draft already runs in the cloud http://jsr373example-kabir.rhcloud.com (big thanks to @kabirkhan (RedHat) and Martin Mares (Oracle)) and is ready for click-through. The source is available, buildable with mvn clean install and should run on all Java EE servers.

Feedback is highly appreciated. Write a comment, or a mail directly to the spec.

Also checkout the other Java EE 8 specifications.

See you at Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.

Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - January 25, 2016 08:00 AM
Before Using the Oracle JET Cookbook...

When you're creating a modular application with Oracle JET and you're copying/pasting from the helpful on-line Oracle JET Cookbook, you'll run into a few issues initially.

The JavaScript snippets in the cookbook assume that you're not creating a modular application, i.e., they're not in "define" blocks, but in "require" blocks. My feeling is we should rewrite those snippets so that they're in "define" blocks, since that's how most Oracle JET users will be using them.

My colleague Paul Thaden has written a great blog entry on this point and I highly recommend it, especially when you're getting started with Oracle JET and its on-line cookbook: 


Thanks, Paul! 

NetBeans – Michael's blog - January 24, 2016 09:11 PM
NetBeans Dream Team

I’d been invited to the NetBeans Dream Team. I am proud to be part of this team since the beginning of this year. Beside me, six other persons have become new team members. Read more about the NetBeans Dream Team [1] and visit the member list [2].   [1] wiki.netbeans.org/NetBeansDreamTeam [2] wiki.netbeans.org/NBDTCurrentMembers

Adam Bien - January 24, 2016 06:45 AM
Railways, 3D Rendering, Microservices--An Interview With A Java EE 7 Book Author

Marcus, please introduce yourself.

About two years ago I came to Taiwan to work as a Software Development Manager in the banking industry, before I was working as IT freelancer for 12 years in Germany. I am using Java till its first release in 1996 and wrote together with my old friend Martin the first German book on Java EE 7: Workshop Java EE 7. Together we also founded the platform www.turngeek.press where we are publishing easy to read books on Java.

Tell us about the most interesting Java EE application you were involved in your consulting work.

That’s a good one. Firstly I would distinguish between interesting from the functional point of view and the technical point of view. Technically the most interesting have been the applications I had to deal with while I was working for the German railway company. This is mostly due to the complexity of their system landscape - I probably never experienced so many interacting systems. From the functional view it is most likely my thesis which was about a distributed 3D renderer for landscapes. I guess the topics you are working on your own are usually the most interesting - aren’t they?

Now you made me curious: "Distributed 3D renderer for landscapes". What was the role of Java EE in your thesis?

Actually using Java EE wasn't that important for the thesis. I just like to play around with new technologies and JBoss was a new technology back then. As far as I remember the system was just using stateless session beans to transfer the pre-rendered 3D data from the server side to the rendering client. I could as well have used RMI instead, but you know, that wouldn't have been so cool.

How much time do you spend in Java EE projects? Is Java EE popular?

I honestly don’t know - maybe around 5-6 full years altogether. I first started to work with Java EE at the beginning of 2000 - back then in version 1.2. Over time Java EE had its ups and downs. Right now I have the feeling that the standard is missing a bit the microservices trend, but let’s see what’s coming.

Java EE 8 is in the making. What can be improved in the microservice space? What is completely lacking?

Unfortunately I haven't used microservices myself before in a project, but I can tell you the opinion I have. Microservices are not only about the development of the service. Of course you can easily build a REST service with Java EE and then package it in let's say Wildfly Swarm, but microservices are also about metrics and health checks. I see there exists something like Hawkular for that, but generally I am missing a standard for this.

Good news! The standard is coming: JSR 373: Java EE Management API 2.0. It exposes the server management API via REST and it is scheduled to be released with Java EE 8. Contributions are highly welcome!

Which application servers, tools and IDEs are you usually using?

A couple of years ago I did the switch from Eclipse to IntellliJ and I didn’t regret it. For builds I am still using Maven. It works and I don’t think build systems are such a fascinating topic. Which application server I am using depends very much on the company I am working with. If we’re talking about Java EE servers, I best know JBoss as I was working with it from the beginning.

How important is the Java EE standard to you? Is your code usually dependent on application server specific features (SPI)?

If possible I try to avoid any vendor specific features. Generally I would say it’s not worth using them. Usually a workaround can be found and keeping to the standard greatly simplifies migration - not only to other vendors but from my experience also to future versions of the standard.

Tell us more about your Java EE 7 book and your current endeavors.

Martin and I are in the process of translating our popular Java EE 7 book into English. It’s a book for beginners which covers each topic of Java EE in its own chapter. Besides just doing the translation we’re also greatly improving the book. Firstly, as you know Java EE is rather big, so we extracted each topic (JSF, CDI, JPA, EJB, etc.) in its own self-containing book. Therefore we now have a series of books: you’re able to study each of it in one day, hence the new names: JSF in Day, CDI in a Day, JPA in a Day (work in progress) and so on. Secondly, we also embed links throughout the book which start a Cloud IDE with pre-configured workspaces. Our readers have been mostly stuck with configuration issues, so we think this is a good way to let the reader jump start into each new topic.

Is Java EE productive? What is your opinion?

Except JavaServer Faces, which is from my point of view conceptually outdated, I would say Java EE is generally a productive platform. Especially the changes brought by Java EE 6 made a developer’s life easier.

Any links you would like to share with us?

Besides our website turngeek.press of course, I also recommend using Codenvy - Cloud IDE’s are not yet as good as their desktop counterparts, but they’re already a great tool to teach and collaborate.

Marcus, thank you for the interview!

Real World Java EE Workshops [Airport Munich]>

markiewb's blog - January 23, 2016 12:38 PM
Quicktip: Maven-based NBM development and the user-dir

When you develop a NetBeans module using the Maven-approach, every time you “Clean & build” your module the userdir, which is placed in the target-directory by default, will be deleted. “Clean & Build” is necessary if you’re altering the layer.xml directly or indirectly by using annotations like @ActionReferences.  So after that you have to reconfigure your target platform again, f.e. by opening the same projects and files to restore the previous state. That is annoying, but easy to fix.

Add a profile to your settings.xml



After that you can choose the profile from the profile-dropdown or in the context-menu of the project node.


This way the configured userdir is used for running/debugging your NetBeans module. It won’t get deleted automatically.

Advanced tips: Of course you can also configure an absolute path or even make the profile default by applying activeByDefault



Geertjan's Blog - January 22, 2016 12:35 PM
React.js and NetBeans IDE (Part 2)

Continuing from part 1 (almost a year later), I'm creating a simple plugin for NetBeans IDE to support React. Here's where it is found, anyone can join in:


Here's how it looks right now:

What the plugin is focused on is JSX editor support and compilation of JSX files to JavaScript.

I've been looking for a JSX tokenizer and grammar definition, e.g., via ANTLR. Not found one yet. Right now, reusing the JavaScript editor. Also, hardcoded (at the moment) is my path to JSX, working on an extension to the Options window to enable the user to set that. In the Project Properties dialog, there's a React section, where the "--watch" command of JSX is kicked off whenever a JSX file is saved.

Adam Bien - January 22, 2016 05:14 AM
REST, DDD, Layers, JSF, Microservices Sizing A UmeJUG Conversation

A conversation with the worlds 2nd northest JUG about Domain Driven Design, Hexagonal Architectures, Hateoas, Transactions, JSF and, of course, microservices.

See you at Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.

Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - January 21, 2016 08:44 PM
ProjectCustomizer/NodeFactory Combination

Here's a handy NetBeans API sample, useful for NetBeans plugin developers, as well as anyone working with node hierarchies on the NetBeans Platform:


When you check out the repository above and run the module into NetBeans IDE... and you then create a Java SE application, for example this:

...and you then go to the Project Properties dialog of the project, you will see usage of the ProjectCustomizer.CompositeCategoryProvider class, a simple panel with a checkbox:

When you click "Show my node" and then OK, you will see you have a new node created in your node hierarchy, thanks to an implementation of the NodeFactory class:

When you go back to the Project Properties dialog and uncheck the checkbox, and you then click OK, you will find that the "Special" node is removed.

In the ProjectCustomizer, a project preference is set to a key/value combination, to which the NodeFactory is listening for changes. When a change is detected, the Node hierarchy recreates itself with/without the special Node.

The above scenario is a bit tricky and can be useful in many situations, such as when you're extending NetBeans IDE with a plugin for some technology that needs to be configured per project, after which the project logical view needs to be updated with data relating to the configured technology.

Thanks to Peter Nabbefeld for requesting code for this scenario and to Neil C. Smith for making an important suggestion relating to the ChangeListener of the NodeList.