Česky   |  Deutsch   |  English   |  Español   |  Français   |  Indonesia   |  日本語   |  한글   |  Polski   |  Português (BR)   |  Türkçe   |  中文   |  正體中文   |  Your Language  
PlanetNetbeans
Planet NetBeans is an aggregation of NetBeans related musings from all over the Blogosphere.
NetBeans – Praxis LIVE - May 16, 2018 12:09 PM
Moving 4-ward

The first full release of PraxisLIVE v4 happened earlier this week, and while you might immediately notice some UI improvements (bezier curves in the graph editor caused some excitement!), the primary focus of this release is on the restructuring and … Continue reading

Adam Bien - May 16, 2018 08:44 AM
Simplistic Router With WebStandards

In this screencast I'm using the standard onhashchange event listener to replace a section with content loaded from an external file. It is a simplistic router:

This screencast is bonus material from: webstandards.training. You might also like: webcomponents.training.

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 - May 15, 2018 06:57 AM
From Jakarta EE Profiles over Exception Handling To Swing Migrations -- 50th airhacks.tv

"Jakarta EE Profiles and News, Exception Handling, TransactionSynchronizationRegistry, UUID progation and XA, equals, hashcode and JPA, remote CDI, websockets testing, Code Coverage, Swing Migration and Thin WARs with Hibernate" or 50th airhacks.tv is available:

Any questions left? Ask now: https://gist.github.com/AdamBien/dc00f6b83c2430c91533486e72fb4d54 and get the answers at the next airhacks.tv.

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 - May 11, 2018 10:36 AM
Simplest Possible MicroProfile Maven Kickstarter

Execution of the microprofile-essentials-archetype (see also Simplest Possible Java EE 8 Kickstarter):

mvn archetype:generate -DarchetypeGroupId=com.airhacks -DarchetypeArtifactId=microprofile-essentials-archetype -DarchetypeVersion=0.0.1 -DgroupId=com.airhacks -DartifactId=[YOUR_PROJECT_NAME] -Dversion=0.0.1 -Darchetype.interactive=false --batch-mode

creates a ready to use 3.5kB Thin WAR project with configured JAX-RS runtime, a resource with a GET endpoint ("/ping"), 25 lines of pom.xml with a single microprofile dependency:

 <dependency>
    <groupId>org.eclipse.microprofile</groupId>
    <artifactId>microprofile</artifactId>
    <version>1.3</version>
    <type>pom</type>
    <scope>provided</scope>
</dependency>
and a shell script which executes the the maven and Docker build and starts the image. The build-and-run cycle takes about ...5 seconds.

Payara 5 Full server is not only Java EE 8 compliant, it also comes with MicroProfile 1.2 APIs -- so you don't have to use any esoteric runtimes.

Payara 5 Dockerfile is also available from: docklands. The Maven Archetype is available in: https://github.com/AdamBien/microprofile-essentials-archetype.

See you at Java EE Microservices. Is Munich's airport too far? Learn from home: javaeemicro.services.
Real World Java EE Workshops [Airport Munich]>

Adam Bien - May 07, 2018 10:49 AM
Jakarta EE Profiles and News, Exception Handling, UUID progation, equals, hashcode and JPA, remote CDI, websockets testing, or 50th airhacks.tv

Topics and questions (https://gist.github.com/AdamBien/e96e52400c5582f86d5f4962a68470ac)

for the 50th airhacks.tv.
  1. Swing Migrations Workshop
  2. Jakarta EE News
  3. Exception handling strategies
  4. Transparent and remote UUI propagation
  5. Thin WARs and 3rd party JPA
  6. Equals and hashCode in JPA entities
  7. Remote CDI events
  8. WebSockets testing
  9. Jakarta EE's future
  10. Combining Primefaces with JAX-RS
  11. When Numbers Are More Important Than Quality

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.tv or http://www.ustream.tv/channel/adambien

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]>

APIDesign - Blogs - May 04, 2018 10:54 AM
Git on Steroids: Local Collaboration Area

Turns out that one gets very useful MultiGitRepository#Appendix_A:_Local_Collaboration_Area: the master branch in each slave repository of the MultiGitRepository setup is in fact the best place for team members to collaborate without publishing the changes to the final integration destination.

--JaroslavTulach 10:54, 4 May 2018 (UTC)

Adam Bien - May 03, 2018 05:26 AM
Live-Coding No-Ceremony Microservices with Thin WARs

In this screencast I implemented Thin WAR microservices, let them communicate and implemented microservice patterns from scratch. I started with Java EE full profile and ended with microprofile. No tricks, no frameworks, no magic:

See you at Java EE Microservices. Is Munich's airport too far? Learn from home: javaeemicro.services.


Real World Java EE Workshops [Airport Munich]>

Adam Bien - April 27, 2018 03:09 PM
Java EE 8 / JSON-P 1.1: Convenient JsonArray to POJO conversion

With the JSON-P 1.1 / Java EE 8 method: getValueAs a JsonArray instance can be directly converted into a POJO-List. The POJO's constructor:


import javax.json.JsonObject;

public class Developer {

    private String name;
    private String language;

    public Developer(JsonObject input) {
        this.name = input.getString("name", null);
        this.language = input.getString("language", null);
    }

    @Override
    public String toString() {
        return "Developer{" + "name=" + name + ", language=" + language + '}';
    }
}

...can be used as the converter function / parameter of getValueAs:


import java.util.List;
import javax.json.Json;
import javax.json.JsonArray;
import javax.json.JsonObject;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import org.junit.Test;

public class MappingArrayValuesTest {

    @Test
    public void map() {
        JsonArray developerArray = getDevelopers();
        List<Developer> developers = developerArray.getValuesAs(Developer::new);
        assertThat(developers.size(), is(2));
        System.out.println("developers = " + developers);
    }

    JsonArray getDevelopers() {
        return Json.createArrayBuilder().
                add(create("brendan", "JavaScript")).
                add(create("james", "Java")).
                build();
    }

    JsonObject create(String name, String language) {
        return Json.createObjectBuilder().
                add("name", name).
                add("language", language).
                build();
    }
}

The successful test outputs: developers = [Developer{name=brendan, language=JavaScript}, Developer{name=james, language=Java}]

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 - April 26, 2018 06:04 AM
From Xelphi, over Nashorn To JVM Compiler Innovation with GraalVM

8th episode of airhacks.fm, or a conversation with @JaroslavTulach about the beginnings of NetBeans, xelphi, JavaDoc, Glasgow, JavaBeans for the network, LimeTree, mounting jars, deals with Jonathan Schwartz, Bck2Brws (Back To Browser), Duke Script, Multi OS Engine, JavaFX, Java to JavaScript transpiler, Typescript, Frameworks, GraalVM, Project Maxwell , Maxine VM, C2 compiler, IGV, nashorn and performance, Graal and Twitter, JEP metropolis, Graal speedup, the most complex statement, speculative interpreters, talk to your compiler, Truffle, SubstrateVM, avatar.js, node.js on JVM, Graal Installation, language interop is available.

Subscribe to airhacks.fm podcast via: iTunes or RSS

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 - April 25, 2018 07:30 AM
Binding WildFly To IP-Address

To bind WildFly to a particular address, launch it with the -b flag: ${WILDFLY_HOME}/bin/standalone.sh -b=0.0.0.0 (see e.g. Docklands Wildfly image).

Alternatively you can also change the defaults in the standalone-full.xml from 127.0.0.1 to 0.0.0.0 (0.0.0.0 means: all interfaces, what is useful for development):


<interfaces>
    
    <interface name="management">
        
        <inet-address value="${jboss.bind.address.management:0.0.0.0}"/>
    
    </interface>
    
    <interface name="public">
        
        <inet-address value="${jboss.bind.address:0.0.0.0}"/>
    
    </interface>
    
    <interface name="unsecure">
        
        <inet-address value="${jboss.bind.address.unsecure:0.0.0.0}"/>
    
    </interface>

</interfaces>    
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]>

APIDesign - Blogs - April 23, 2018 03:20 PM
Git on Steroids: Master Multiple Repositories

Let me introduces MultiGitRepository - aka Git on steroids to you. I have seen a lot of confusion when it comes to working with multiple repositories and keeping them in orchestration, but I believe it is not that complex. Everything we learned about distributed version controls applies. However this time it has to be applied on a completely new level!

Master your MultiGitRepository in few easy lessons!

--JaroslavTulach 15:20, 23 April 2018 (UTC)

Adam Bien - April 19, 2018 08:33 AM
JSON-B, Groovy and Jenkins, CQRS, 40k with JSF, EJB TX or 48th airhacks.tv is available

36mins: with JSON-B and hierarchical mapping, Groovy and Jenkins pipelines, CQRS, 40k with (deprecated) JSF, EJB TX, JSON-B, Java EE migrations and I'm performing live a code review / refactoring.

Also checkout past episodes: airhacks.tv

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]>

APIDesign - Blogs - April 19, 2018 06:49 AM
Shocking: Default Listener Methods ain't Dangerous!

Using Default Listener Methods is perfectly fine! Those who remember my recent arguments against using DefaultMethods in APIs maybe the surprised by this statement, but it has to be made. Looks like using Default Listener Methods doesn't violate any practices of good API Design.

Thanks Dušane, for pointing that out!

--JaroslavTulach 06:49, 19 April 2018 (UTC)

Adam Bien - April 11, 2018 07:26 AM
Local-Variable Type Inference Java 10 Example

Java 9 legacy code:


@Test
public void java9Legacy() {
    Map<String, String> devs = new HashMap();
    devs.put("duke", "java8");
    for (Map.Entry<String, String> dev : devs.entrySet()) {
        System.out.println(dev.getKey() + " " + dev.getValue());
    }
}

...can be streamlined with Java 10 and Local-Variable Type Inference (JEP-286):


import java.util.HashMap;
import java.util.Map;
import org.junit.Test;

public class VariableTypeInferenceTest {

    @Test
    public void inferTypeWithJava10() {
        var modernDevs = new HashMap<String, String>();
        modernDevs.put("duke", "java10");
        for (var dev : modernDevs.entrySet()) {
            System.out.println(dev.getKey() + " " + dev.getValue());
        }
    }
}

The code above runs on openJDK 10 GA JDK 10, was edited with Apache Netbeans 9 and built with Maven 3.5.0


        <project>
        <modelVersion>4.0.0</modelVersion>
        <groupId>com.airhacks</groupId>
        <artifactId>variable-type-inference</artifactId>
        <version>1.0-SNAPSHOT</version>
        <packaging>jar</packaging>
        <dependencies>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
        <properties>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
            <maven.compiler.source>10</maven.compiler.source>
            <maven.compiler.target>10</maven.compiler.target>
        </properties>
    </project>    

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 - April 10, 2018 09:22 AM
Simplest Possible Microprofile Liveness Check

A health check can be exposed using the org.eclipse.microprofile.health.Health qualifier exposing a HealthCheckResponse:


import javax.enterprise.context.ApplicationScoped;
import org.eclipse.microprofile.health.Health;
import org.eclipse.microprofile.health.HealthCheck;
import org.eclipse.microprofile.health.HealthCheckResponse;    
@Health
@ApplicationScoped
public class LivenessCheck implements HealthCheck {

    @Override
    public HealthCheckResponse call() {
        return HealthCheckResponse.
                named("ping").
                up().
                withData("duke", "lives").
                build();
    }

}

The health check is available from the "root" URL (not the WAR URI):

curl http://localhost:8080/health outputs:

{"outcome":"UP","checks":[{"name":"ping","state":"UP","data":{"duke":"lives"}}]}

The API is included in the microprofile BOM:


 <project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.airhacks</groupId>
<artifactId>microprofile</artifactId>
<version>0.0.1</version>
<packaging>war</packaging>
<dependencies>
   <dependency>
       <groupId>org.eclipse.microprofile</groupId>
       <artifactId>microprofile</artifactId>
       <version>1.2</version>
       <type>pom</type>
       <scope>provided</scope>
   </dependency>
</dependencies>
<build>
   <finalName>microprofile</finalName>
</build>
<properties>
   <maven.compiler.source>1.8</maven.compiler.source>
   <maven.compiler.target>1.8</maven.compiler.target>
   <failOnMissingWebXml>false</failOnMissingWebXml>
</properties>
</project>    

The above example comes with 4.2 kB WAR and runs on stock Payara Server 5. Payara 5 comes with Java EE 8 and microprofile 1.2 support.

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 - April 09, 2018 05:01 AM
Swing without WebStart, No Sessions, Performance Testing and JWT, JPA Query Result Caching, SAML, JavaScript Data Binding, Asynchronous Java EE or 49th airhacks.tv

Topics and questions (https://gist.github.com/AdamBien/d2bdc699f8f39948ff04126f3d09227d) for the 49th http://airhacks.tv.

  1. Swing without WebStart
  2. Preventing Web Sessions
  3. Performance Testing with JWT
  4. JPA query result caching
  5. SAML Java Frameworks
  6. JavaScript databinding with WebSockets
  7. Asynchronous Java EE
  8. Using embedded container testing with container resources blog comment
  9. When Numbers Are More Important Than Quality

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.tv or http://www.ustream.tv/channel/adambien

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]>

APIDesign - Blogs - April 06, 2018 10:27 AM
Where's your Frontend? On a desktop!?

What does term Frontend mean to you? Tell us!

--JaroslavTulach 10:27, 6 April 2018 (UTC)

APIDesign - Blogs - April 04, 2018 02:16 PM
Don't rely on Jenkins and co. They hurt your API design skills!

Recently I observed an incompatible API change and I received following explanation: Everything is OK, my ContinuousIntegration server is still green! In a shock I decided to write a philippic against ContinuousIntegration.

If you have to fix your tests in a significant way after making a change to your API, then you should think twice. Maybe such change isn't really compatible enough to become smoothly part of your framework. There is probably a lot of code similar to your tests out there and there is nobody to fix them as part of your refactoring. Better to learn and invest in keeping a bit of BackwardCompatibility.

In some sense: When designing APIs, relying only on ContinuousIntegration is bad!

--JaroslavTulach 14:16, 4 April 2018 (UTC)

DukeScript - April 04, 2018 11:51 AM
Welcome Info Footer in Archetypes Version 0.23

A very inspiring discussion about usability of DukeScript has happened on the development Apache NetBeans mailing list. As a result of the comments collected there, here comes an attempt to improve the first contact experience when somebody tries the archetypes or the IDE wizard out of curiosity without knowing anything about the APIs.

When the freshly created application starts, it now contains a footer with links to documentation, blogs, etc.

Removing the footer is a matter of deleting one script tag in the index.html file:

<!-- Remove this line to remove the button bar in the footer -->
<script async=true src="http://dukescript.com/presenters/welcome.js"></script>

The change can be tried out immediately as necessary updates to the archetypes are already hosted on the Apache Maven Central. Just try:

$ mvn archetype:generate \
	-DarchetypeGroupId=com.dukescript.archetype \
	-DarchetypeArtifactId=knockout4j-archetype \
	-DarchetypeVersion=0.23 \
        -DgroupId=your.company -DartifactId=test -Dversion=1.0-SNAPSHOT
$ cd test
$ mvn install
$ mvn -f client/pom.xml exec:exec

And you shall see the links! Is it now easier to get started with DukeScript?

Anchialas' Java Blog - April 02, 2018 08:09 PM
CoolEditorActions moved to GitHub

The CoolEditorActions NetBeans Plugin has a new home! I just moved the project from kenai.com to github.com, because the former has been offline for a while now.

You can find the whole codebase as well as installation instructions here:

https://github.com/anchialas/CoolEditorActions

If you already have the plugin installed, then please update the Update Center URL to:

https://github.com/anchialas/CoolEditorActions/raw/master/updates/updates.xml

Adam Bien - April 02, 2018 12:28 PM
Blackdown Java, Java in science, Telematics, OSGi, JavaFX--airhacks.fm

A conversation with Johan Vos about Sting at Java One, Blackdown Java, dream teams, Bill Joy, Java in science, telematics, OSGi, JavaFX, wild pigs, oktoberfest, kaffe.org social Java DaliCore, reactive JavaFX, Sun Grid, clouds, Java EE in science, Gluon, JavaFX on Mobile, openJDK 9 on iOS, Android and the future of JavaFX

Subscribe to airhacks.fm podcast via: iTunes or RSS

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]>

APIDesign - Blogs - March 15, 2018 11:18 AM
The IDE for DevOps!

Admins! DevOps! In a recent StackOverFlow developer survey the NetBeans IDE has been rated at 10.9% for Mobile Developers and 8.4% for System Admins/DevOps. It is weird, but it supports the feeling I had for a long time: NetBeans is the IDE for DevOps!

Read more...

--JaroslavTulach 11:18, 15 March 2018 (UTC)

Adam Bien - March 15, 2018 09:37 AM
When Numbers Are More Important Than Quality

The higher the bureaucracy in an organization, the higher the chance that your QA department is more interested in metrics and statistics, than in the actual software quality (also checkout "Quality Assurance Driven Development - And The Resulting Damage..." ).

Instead of writing unit tests for trivial methods (and enums, exceptions and default constructors of course), or write JavaDoc for getters / setters, you could use reflection to invoke as many methods as possible and use interesting frameworks which help you with tests results:

(...) Volkswagen uses a defeat device to detect when it's being tested in a CI server and will automatically reduce errors to an acceptable level for the tests to pass. This will allow you to spend less time worrying about testing and more time enjoying the good life as a trustful software developer.
https://github.com/auchenberg/volkswagen Big thanks to: Dominik Schlosser @dmn1k

JAutodoc is able to create comments for all methods and classes. Unfortunately there is no general AI involved, therefore no additional information is added to the output. However: the JavaDoc coverage metric will improve significantly:

JAutodoc is an Eclipse Plugin for automatically adding Javadoc and file headers to your source code.(...)
JAutodoc - Eclipse Plugin http://jautodoc.sourceforge.net Big thanks to: Jan Schäfer @JanSchfr

In the screencast below I'm using a useful Chrome feature "local overrides" to modify the code coverage without any additional efforts:

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]>

APIDesign - Blogs - March 09, 2018 08:40 AM
Turing speed: The Real Speed of a Language

Let me coin a new term: Turing speed - the real speed a programming language has. The speed of a general (e.g. Turing complete) computation. Read here why we need such classification.

--JaroslavTulach 08:40, 9 March 2018 (UTC)

Adam Bien - March 07, 2018 04:40 AM
10.000 Thin WAR deployment cycles or IoT with pure Java EE at IBM

Tobias, please introduce yourself

My name is Tobias N. Sasse, from Cologne (Germany) and I am a Software Architect and Managing Consultant with IBM Services. I support our enterprise clients, mainly from the insurance industry, to succeed with their digital transformation journeys. I have a focus on developing industry platform solutions, which enable our clients to adopt new capabilities as a service and accelerate a fast go-to-market with innovative technology-driven products. This sounds quite abstract, but I will give an example of what my team does later when we talk about my projects.

In my daily job, I am leading a team of incredibly talented software developers, quality engineers, and business consultants. My focus in the group is to provide the general direction for the products we are working on and design an architecture blueprint, which ensures that we meet the functional and non-functional requirements. Whenever possible, I enjoy writing source code and evaluate new technologies.

My technical focus lies on distributed and scalable systems. You can find me on Linked.in, and my twitter handle is @tnsasse.

What are you building with Java EE?

IBM has an initiative around aging at home with the aim of keeping seniors safe in their own homes longer. I am leading the effort of building such a platform. We offer this industry platform, to our clients as a service, and it combines Internet of Things technology, with a smart analytics engine in the cloud, and professional care services from our partners from the insurance- and healthcare sector.

Imagine a family, where granny Martha lives alone a couple of hundred miles away from her son Robert and his kids. Robert is concerned about the wellbeing of his mother, with all the risks that evolve around growing older. At the same time, he is not able to visit as often as he'd like, to check up on her. Martha enjoys her home and couldn't imagine moving to a nursing home or assisted-living facility.

Now with our product, Martha and Robert could get help from their insurance provider. Professional technicians would visit Martha's home and install a couple of minimal-intrusive sensors (from one of our partners) in her home, which monitor her daily activities. For Robert, we have a mobile app that lets him check the status of Martha's apartment and informs him whenever the system detects a dangerous situation. If something really bad happens, the platform will detect this through the analytics and will notify Robert as well as a connected care provider. The care provider will send a care specialist to Martha's home to assist. They can also send an ambulance, firefighters or the police. With a little box in her home, Martha can even talk to the call center of the care provider whenever our analytics detect an emergency.

The role of IBM in all of this is to establish and nurture the business ecosystem of partnering companies and to provide the technology and algorithms behind the platform. To do so, we offer a set of APIs, that enable our partners to integrate their services or processes with the platform, like to alert a call-center about an incident, or to dispatch a maintenance order to the sensor technician.

IBM is also bringing its cognitive analytics capabilities to the table, that help to make sense of the raw stream of sensor data and detecting hazardous situations, for each home. The IBM Cloud offers the necessary resources to handle this enormous flow of data and to operate all of the services in a real-time, secure and high-available manner.

Except for the mobile apps and a management web interface, we implemented the platform in pure JavaEE 7. We also applied a micro-service architecture to our system, which helps us to individually scale or replace parts of the system very well with minimal impact on our critical uptime.

Can you share with us some geeky numbers like, e.g. TX per seconds, heap sizes, thinnest WARs, etc -- whatever Java EE devs might find interesting.

We currently have ~10 micro-services. Our WAR sizes are a little blown up because we have to rely on a bunch of connector libraries for proprietary systems. Overall though, we are pursuing a thin-WAR approach, and none of our apps are heavier than 5 MB.

Our app servers comfortably run in a 500 MB heap configuration. We default to 1-2 GB though and prefer to scale horizontally if we need additional capacity. We are currently in our 26th (SCRUM) sprint, and overall we have deployed ~ 10,000 times on our development stage, not counting any local deployments. Deploying multiple times a day, the thin-WAR approach and fast app server boot/deployment times pay off for us. I am happy that we don't need to upload 60 MB of framework libraries to the cloud all the time.

Our design is built for scale, as the platform is supposed to handle not only Germany but most of Europe, so we are planning on a 7 figure apartment count, which is our primary measurement KPI. Each instance of our micro-services can sustain a couple of hundred transactions per second. Again this is not easy to measure, as our transactions range from trivially simple to quite complex.

Are you happy with Java EE so far? Is Java EE productive?

IBM has a rich history with Java EE, and most people will know, that we are actively contributing in the expert councils and as an application server vendor. We even have our own Java SDK (IBM Java Technology Edition) which is optimized and production-proven for a variety of architectures. Our JDK was recently open-sourced as OpenJ9, by the way.

From that perspective, Java EE is very much at home here. My team is incredibly productive with Java, and it provides the robustness we seek for in an application like ours. It's not only a rational technology choice, but also a lot of fun to work with the EE7 APIs, and all the goodies that came with Java 8. We still have to look into EE8 and Java 9 for that matter and are also looking into the Micro-Profile APIs, which we would love to integrate soon.

Which application servers, tools or IDEs are you using?

Of course, we are relying on IBM WebSphere Application Server Liberty Profile, which combines the best of both worlds: a small footprint, fast boot- and deployment times, enterprise-grade reliability and features. Additionally, our operations team can rely on 24/7 support from our global support colleagues, in case anything happens in production. WebSphere Liberty was also open-sourced recently as OpenLiberty and is free to use for everyone, and I have seen that you predicted it to be the killer app server for 2018.

We are deploying our apps on the IBM Cloud, which is an entirely automated process triggered by our DevOps pipeline. We host our source code in an IBM internal GitHub Enterprise repository, build it with Maven and deploy it via the IBM Cloud APIs. After the deployment, we automatically execute regression and system tests to ensure that we meet our quality standards.

My development team is using a well-known issue system for our agile sprint planning, and our IDE is based on Eclipse, which given the long history of IBM with the Eclipse IDE might not come as a surprise, too.

Our system has to handle a significant amount of IoT data, and we rely on the Watson IoT Platform to manage all the MQTT connections, security and data streaming. Of course, we have to make sense of the data we receive, and our data scientists are working with IBM DataScience Experience and Watson APIs to develop their machine-learning and cognitive analytics models.

Database-wise, I am a big fan of Db2 since my time at the IBM Almaden Research Lab back during my studies, where I had a chance to look under the hood and see some of the fantastic technologies it employs to optimize queries and workloads. So, we are using IBM Db2 on Cloud for most of our data, as it performs remarkably well and offers a high amount of security at the same time. We also employ IBM Cloudant for NoSQL document-based JSON data, wherever we need a high amount of throughput without transactional security.

You are using the Boundary Control Entity pattern to structure your applications. What were your experiences, challenges, and findings so far?

Yes, we do use the BCE pattern, although my team prefers a different package naming structure. We use ".api" for the boundary layer, ".service" for the control layer and ".model" for the entities. For me, the BCE pattern is not about the naming - it's more a guideline to stay within best practices: to keep the source code aligned with the business problem it tries to solve and to eradicate the use of those ".commons" or ".util" packages that the industry grew so fond of. I think that the pattern helps us to write more readable and streamlined code. The lean code helps us to produce better quality, too many bugs hide in unnecessary abstractions, and wrongly applied design-patterns.

How important are standards for you? Does your application depend on application server specific APIs?

IBM is a big supporter of open standards, and this is not only shown by our contribution to Java but even more in our cloud. If you take a closer look at the IBM Cloud you will see, that we base on OpenStack, Cloud Foundry, Kubernetes, and Linux Containers. For our specific application, standards are essential for our public APIs, so that we are on the same page with our partners in the industries. We embrace the REST paradigm, JSON, Swagger, OAuth 2 and OpenID Connect for example. As we are not planning on moving to a different application server, or database, we make full use of the features the platform offers. In practice, the majority of what we do is plain Java EE standard though.

As a team leader, a significant benefit of standards for me is, that I can quite efficiently communicate skills with HR. If I ask for a Java EE specialist, they know whom to look for, and I am quite sure that the person they identify will have the skills I need.

Which Java EE APIs are you using in your products?

We do use JAX-RS and JAXB for our boundary layer (HTTP/REST with JSON). Our control layer is implemented with EJBs plus some CDI, and we do (most of) our entity layer with JPA. Other than that we do use filters from the Servlet spec, for authentication, CORS, and alike. We have a couple of interceptors as well.

Did you have the chance to chat with other attendees during the airhacks? If yes, what was the most interesting project / problem / situation in the workshops?

Oh yes, I had a lot of interesting chats with attendees all over the world. One story stuck with me: we were talking about how crazy complex we developed software in the past when standards like we know today weren't around that much. One of the attendees told me, how he implemented his own database, with built-in versioning and home-grown encryption capabilities in Java. It sounded like a terrible idea in retrospect, and we had a good laugh together, but I guess these are the projects you can learn a lot from after all.

Can you share any resources with us?

I pointed out that some my favorite IBM products just went open-source. You can find OpenLiberty at openliberty.io which is my favorite EE app server, and the IBM JDK seems to be less known, but is a fantastic piece of engineering and is now released as Eclipse OpenJ9

Concerning the Java ecosystem, a project I grew quite fond of is the MicroProfile initiative, which released a bunch of handy APIs, that will hopefully find their way into a future EE version. The beautiful thing about OpenLiberty is that you can just add MicroProfile, with a single line in your server configuration file.

Of course, I'd encourage everyone to take a look at the IBM Cloud, which is based on open standards, so no vendor lock-in, provides Cloud Foundry, Containers, Kubernetes, Watson APIs and a lot of useful services. We also offer a free tier for many services, so you can get started without a credit card.

For your German-speaking readers, I'd also like to point towards the IBM THINK Blog DACH covering interesting articles on how technology changes companies and society in Germany, Austria, and Switzerland.

Tobias, thank you for the interview!


Real World Java EE Workshops [Airport Munich]>

APIDesign - Blogs - March 05, 2018 11:32 AM
Avoid usage of default methods in an API! Support Cluelessness!

Don't use default methods when designing your API. (For example when writing extensible visitor pattern) they just increase fuzziness and that is not what users of your API are searching for!

--JaroslavTulach 11:32, 5 March 2018 (UTC)

Adam Bien - March 05, 2018 10:02 AM
Jakarta EE News, JSON-B, Groovy Jenkins, CQRS, 40k with (deprecated )JSF, EJB TX, JSON-B, Migrations or 48th airhacks.tv

Topics (https://gist.github.com/AdamBien/22275b3372aabe651953c0992689c6d9) for the 48th http://airhacks.tv Questions and Answers:

  1. Jakarta EE News
  2. JSON-B serialization, deserialization
  3. Automating Jenkins CI with Groovy
  4. light4j, embedded SQL, CQRS streams and Java EE
  5. 40k rows with JSF
  6. Logging and debugging nasty libraries
  7. Monitoring EJB transactions, JMS queue monitoring
  8. REST authentication
  9. Marshal and unmarshal JAX-B objects
  10. ECB pattern in larger applications
  11. Is JSF deprecated
  12. Migrating Java EE projects
  13. DataSource within Java EE: how to close a JDBC connection?

Any questions left? Ask now: https://gist.github.com/AdamBien/22275b3372aabe651953c0992689c6d9 and get the answers at the next airhacks.tv.

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.tv or http://www.ustream.tv/channel/adambien

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 25, 2018 09:03 AM
Displaying Tables with Vaadin Grid Web Component and Java EE 8 Backend

In this screencast I'm integrating a data grid Web Component / Custom Element https://vaadin.com/elements/vaadin-grid with plain ES 2015 code and connect it with a Java EE 8 microservice. Backend and frontend were created and connected from scratch. In 10 mins.

See you at Structuring Single Page Applications (SPA)s / Progressive Web Applications (PWA)s with WebComponents -- the "no frameworks, no migrations" approach, at Munich Airport, Terminal 2 or webcomponents.training (online).


Real World Java EE Workshops [Airport Munich]>

Adam Bien - February 21, 2018 04:40 AM
DB authentication, JSF and microservices, Denormalization, Web Components, JAX-RS, Transactions, Sagas or: 47th airhacks.tv

43 mins with topics like: "Database Authentication, Microservices with JSF, Denormalization, DB Audits, Web Components decoupling, with or without DeltaSpike, JAX-RS Audit, transactions and sagas, the relation between developers and operations in future, DTOs in binary world", or 47th airhacks.tv is available:

Any questions left? Ask now: https://gist.github.com/AdamBien/22275b3372aabe651953c0992689c6d9 and get the answers at the next airhacks.tv.

Also checkout the airhacks.tv archives.

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 20, 2018 05:57 AM
On-Demand Script Loading with JavaScript

In this screencast a script is dynamically loaded by user action (with click on a button) and without any external libraries:

Dynamic script loading is particularly useful for polyfills, which can be conditionally loaded depending on browser's capabilities.

See you at Single Page Applications (SPAs) -- the "no frameworks, no migrations" approach, at Munich Airport, Terminal 2 or webstandards.training (online).
Real World Java EE Workshops [Airport Munich]>