Č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)
DukeScript (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)
Bernhard's Weblog (feed)
Michel Graciano's Weblog (feed)
Ramon.Ramos (feed)
Ozone and Programming » 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)
NetBeans – John O'Conner (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)
Devel Blog (feed)
diamond-powder (feed)
Antonio's blog (feed)
Where's my Blog?!

Powered by:    Planet

Last updated:
October 01, 2016 06:06 AM
All times are UTC

Sponsored by
sponsored by Oracle

visit NetBeans website
Adam Bien - September 29, 2016 08:18 AM
Building A No-Dependencies, Plain JavaScript App With Java EE Backend

React, Angular 2, (...) are fine, but is it possible to implement a HTML 5 application without any external JavaScript framework or library?

In this screencast I rendered a JSON array from a Java EE service dynamically without any framework or library, just using plain JavaScript (ES 6 / ES2015) and the plain browser DOM API.

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 - September 28, 2016 08:08 AM
Building A React Application With Java EE Backend

In this screencast I created Java EE 7 application with installed CORS filter and exposed a String array as JSON.

Finally, I created a react application in ES2015 and used plain, old XMLHttpRequest to access the backend service. The output was rendered as HTML list.

Is React library not enough? Checkout the screencast: Building An Angular 2 Application With Java EE 7 Backend

Interested in ReactJS, Angular 2 or Java EE? Checkout: workshops.adam-bien.com.

Real World Java EE Workshops [Airport Munich]>

NetBeans – Michael's blog - September 28, 2016 05:24 AM
NetBeans goes Apache – vote in progress

After its proposal and intensive discussing, NetBeans has reached the next step on becoming an Apache project: The vote for entering the incubator has started. You may follow this and vote (without binding if not a member). You’ll find the email list at [1]. [1] incubator.apache.org/guides/lists.html

Adam Bien - September 27, 2016 10:29 AM
Building An Angular 2 Application With Java EE 7 Backend

In this screencast I created Java EE 7 application with installed CORS filter and exposed an array of Dukes as JSON.

Finally, I created Angular 2 app and used HttpModule to access the backend service. The output was rendered as HTML list.

Interesting: I used Dependency Injection in Angular 2, but there was no need for DI on the server :-).

Are you searching for a minimalistic library? Checkout the: "Building A React App With Java EE Backend" screencast.

Interested in Angular 2, ReactJS or Java EE? Checkout: workshops.adam-bien.com.

Real World Java EE Workshops [Airport Munich]>

NetBeans – Michael's blog - September 26, 2016 08:36 PM
Next talks

I’m going to speak at the PCSI annual conference in Dublin on 5th October 2016. Web based Hospital Communication via Data Portal [1] A quick view onto structured hospital communication. I’m not going to talk about technical details at this conference. But I can tell you, the portal is developed using the NetBeans IDE. And at … Continue reading "Next talks"

Adam Bien - September 26, 2016 07:42 AM
Load Balancing Java EE Microservices

In this screencast I implemented a minimalistic, load balanced Java EE 7 application comprising two identical nodes and a ha-proxy:

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

NetBeans – Michael's blog - September 25, 2016 10:11 AM
NetBeans and the experimental book

NetBeans is my favorite Java IDE. Some time ago, I started to write my first book. Since the pages are written using a special flavored markdown dialect, I tried some markdown editors. I discovered a markdown plugin for NetBeans [1]. Thus I continued to write my books with NetBeans. The big advantage of NetBeans is … Continue reading "NetBeans and the experimental book"

Adam Bien - September 25, 2016 05:37 AM
The Ingredients and Roadmap of Rebooted Java EE 8 and 9

After one year vacations Java EE 8 was rebooted and is going to be optimised to run on hypervisors and / or container environments. Java EE 8 will focus on the following areas below -- it is a proposal and very likely to change in the JCP process:

Programming Model
  1. Extend for reactive programming
  2. Unified event model
  3. Event messaging API
  4. JAX-RS, HTTP/2, Lambda, JSON-B, (...)
  1. Package applications, runtimes into services
  2. Standalone immutable executable binary
  3. Multi-artifact archives
Key Value/Doc Store
  1. Persistence and query interface for key value and document DB
Eventual Consistency
  1. Automatically event out changes to observed data structures
  1. New spec - interfaces, packaging format, manifest
  2. Ephemeral instantiation
  1. Externalize configuration
  2. Unified API for accessing configuration
  1. Increased density
  2. Tenant-aware routing and deployment
  1. API to store externalized state
  1. Extension to support client-side circuit breakers
  2. Resilient commands
  3. Standardize on client-side format for reporting health
  1. Secret management
  2. OAuth
  3. OpenID

The choices are pragmatic and will make Java EE an even more productive platform. I'm only missing a slightly extended and modernized "Concurrency Utilities for Java EE" (jcp.org/ja/jsr/detail?id=236). Particularly the ThreadPool configuration and Backpressure could be easily standardized just by agreeing on features from https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html. Particularly useful would be the integration of the statistics (e.g. Bulkheads) with the Health Check API.

Also a standardized management API (not proposed) would simplify the creation of application images through a unified API.

Java EE 8 and 9 will come at light speed to an application server vendor near you. Java EE 8 is expected to be delivered in 2017 and Java EE 9 in 2018.

Oracle is listening now, take the chance and participate at the survey (takes a few mins): glassfish.org/survey

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 - September 24, 2016 10:42 AM
Beware of DefaultMethods

DefaultMethods is a new feature of JDK8 that we many cried for. Yet, they carry certain drawbacks with themselves. For example one can write a valid Java program that compiles and works on JDK7, but is broken on JDK8!

--JaroslavTulach 10:42, 24 September 2016 (UTC)

Geertjan's Blog - September 23, 2016 06:15 PM
Minimal Oracle JET Composite Component

Let's say you have a suite of Cloud applications and you want them to display customers in a standardized way:

If that's your business scenario, then Oracle JET composite components are a perfect fit. Here's what an absolutely minimal Oracle JET composite component looks like: 

The above is really trivial. Here's the content of "customer.html":

<h2 data-bind="text: $props.name"></h2>
<h4 data-bind="text: $props.city"></<h4

Here's "customer.json":

  "properties": {
    "name": {
      "description": "Customer name.",
      "type": "string"
    "city": {
      "description": "Customer location.",
      "type": "string"

About the properties above, see the below:


And here's "loader.js", which connects the above two together and provides "customer" as a new HTML element:

  function(oj, view, metadata) {
    oj.Composite.register('customer', {
      view: {inline: view}, 
      metadata: {inline: JSON.parse(metadata)}

In a more complex scenario, you're also able to include CSS stylesheets and business logic defined in JavaScript, as outlined in an earlier blog entry on this topic

OK, now ZIP up that folder, send it to whoever is working on other Cloud applications that need to make use of the "customer" element, which they can use as follows (in e.g., "library.js") after unzipping that ZIP into the relevant folder in their application:

define(['ojs/ojcore', 'knockout', 'ojs/ojcomposite',
   function (oj, ko) {
      function libraryContentViewModel() {
          var self = this;
          self.customers = [
              {name: 'Billy Bob Thornton', city: 'New York'},
              {name: 'Brad Pitt', city: 'Hollywood'},
              {name: 'Val Kilmer', city: 'Seattle'}
      return new libraryContentViewModel();

All that the above does is load the "loader.js", include "ojs/ojcomposite" so that Oracle JET composite components are supported, and define a "customer" array.

Here's the view (e.g., "library.html") of the above viewModel, using the "customer" HTML element provided by the composite component:

<!-- ko foreach: customers -->
<customer name="{{name}}" city="{{city}}"></customer>
<!-- /ko -->

That's pretty neat and, guess what, Oracle JET components conform to the Web Components specification, except for the Shadow DOM, which is not supported.

Adam Bien - September 23, 2016 08:31 AM
JavaOne: Live Coding "No Ceremony" Java EE Microservices Session and Screencast

In the screencast below I created Java EE 7 projects with maven, developed and build them, created and build docker images, created a user defined network and finally launched the WARs on payara and wildfly and let them communicate:

In the first part of the JavaOne 2016 session in San Francisco I did the same. For unknown reasons docker was unbelievably slow during the presentation (I guess caused by network timeouts), so I re-recorded the first part. Now you can fast-forward over "boring" parts in the JavaOne presentation:

Any questions left? The next http://airhacks.tv is around the corner. Ask now: https://gist.github.com/AdamBien/e6e20c129e673ad558be495dd4f3afc4 or wait a month. See you at Java EE Workshops at Munich Airport, Terminal 2 and particularly at Java EE 7 Microservices. Is MUC too far? Checkout: javaeemicro.services.

Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - September 20, 2016 12:27 PM
Cab Drivers in San Francisco Love NetBeans

On the way to NetBeans Day 2016, I had a nice conversation...

Here's where it is on YouTube:


Geertjan's Blog - September 19, 2016 01:36 PM
James Gosling on NetBeans and Apache

To a packed room at NetBeans Day 2016, at the start of JavaOne 2016, James Gosling participated in a discussion panel, where he reflected on the history of NetBeans and shared his thoughts on the plans to move to Apache.

Below, watch the final minutes, where he focuses specifically on the NetBeans plans in relation to Apache:

&amp;amp;lt;span id=&amp;amp;quot;XinhaEditingPostion&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;/span&amp;amp;gt;

Here's the view on the room from his perspective, in a photo taken by Michael Nacimento (sitting next to James):

Thanks to Victor Duran, who made the video of James's words above. 

There was a funny moment earlier in the session, where I had explained the move of NetBeans towards Apache, which I ended by saying: "We are carefully optimistic that everything will work out and our move to Apache will succeed." At that point James threw up his hands in exasperation, turned to me, and said: "Oh, have a little faith! We'll work through the Apache process!" :-)

Geertjan's Blog - September 18, 2016 11:53 AM
Getting Started with Oracle JET Composite Components

I worked with JB Brock yesterday on setting up and using Oracle JET's new Composite Component Architecture.

The aim of it all is to have reusable components that enable you to define your own HTML elements, like this, for example:

<!-- ko foreach: employees -->
<demo-card class="oj-flex-item" 
<!-- /ko -->

Above you see a Knockout for-each loop which iterates through 'employees' and creates a new DOM element named "demo-card" for each of them.

The above is in the view, e.g., in "home.html", while "home.js", i.e., the viewModel, defines "employees" as follows:

self.employees = [
        name: 'Deb Raphaely',
        avatar: 'images/composites/debraphaely.png',
        title: 'Purchasing Director',
        work: '5171278899',
        email: 'deb.raphaely@oracle.com',
        backgroundImage: 'images/composites/card-background_1.png'
        name: 'Adam Fripp',
        avatar: null,
        title: 'IT Manager',
        work: '6501232234',
        email: 'adam.fripp@oracle.com',
        backgroundImage: null

In this case, the definition of "demo-card" transforms the above snippets into a view that looks like this, with a "demo-card" for each of the two employees defined above:

When the user clicks on each "demo-card", it flips around, and you see the other side of the card, which presents more information about the employee. (See the above live here.)

OK, so where does "demo-card" come from? Well, in "home.js", i.e., the same place where the 'employees' above are defined, my "define" block looks like this:

define(['ojs/ojcore', 'knockout', 'ojs/ojcomposite', 

Notice, first of all, that "ojs/ojcomposite" is included, which is new in Oracle JET 2.1.0. It defines composite components. Then, notice that something is loaded from a folder named 'jet-composites', which is a folder that looks like this:

Notice "demo-card" is a folder in there, which looks like this:

So, what you have is an infrastructure for creating encapsulated components, defined by JavaScript, HTML, and CSS, with properties defined in JSON. Once you have a composite component, you have created a new HTML element, in this case "demo-card", defined by "loader.js", which ties everything together:

  function(oj, view, viewModel, metadata) {
    oj.Composite.register('demo-card', {
      view: {inline: view}, 
      viewModel: {inline: viewModel}, 
      metadata: {inline: JSON.parse(metadata)}

You can pass the composite component in a ZIP file to whoever needs to use it, who unzips the ZIP into a folder, and loads it into their viewModel as described earlier, via the "define" block of the viewModel. You can see composite components as plugins for developers, i.e., not for the end user of the app, but for the development team, enabling features to be packaged, shared, and reused.

Here is a more complex example, which is a composite component called "demo-memory-game" which itself makes use of a composite component called "demo-memory-card":

All the details, including all the code described above, are here in the Oracle JET Cookbook:


Note: When loading a composite component that includes a CSS file, remember to add 'css': 'libs/require-css/css' in your main.js file, i.e., in the "paths" section of your "requirejs.config", otherwise the composite component loader crashes when trying to execute the loading of the CSS, e.g., the 'css!./demo-card' piece. Thanks Janis Krasemann on Twitter for pointing this out. That is something I indeed did do but forgot to mention here. :-)

markiewb's blog - September 18, 2016 11:44 AM
Missing plugins for your NetBeans nightly builds?

Do you use a Nightly-/Dev-Build of NetBeans or even a release candidate of 8.2 within the NetCAT-program and you are missing some of your favorite plugins?

First there is no plugin center for Dev-Builds. Also most plugins from the 8.1 plugin center are not verified for the new 8.2 build yet – including my plugins.

Nevertheless in the meantime you can still use the plugins and give the plugin authors feedback of the compatiblity to 8.2. Some plugins won’t work, because of using non-public API, but that is the point to find out!

How to do that?

At Tools|Plugins|Settings add the plugin center URL for 8.1 [1] and then at Tools|Plugins|Available Plugins click at “Check for Newest


If you are interested in testing non-verified plugins see the article [2]

[1] http://plugins.netbeans.org/nbpluginportal/updates/8.1/catalog.xml.gz
[2] https://benkiew.wordpress.com/2013/02/03/netbeans-ide-verification-of-plugins-and-update-center-urls-for-non-verified-plugins/

Adam Bien - September 17, 2016 02:40 PM
My One And Only Microservices Live Hacking JavaOne Session

This year I was more cautious and only proposed a single session:

Live-Coding No-Ceremony Microservices [CON3436]

Java EE is productive and easy to learn and runs smoothly on containers such as Docker and rkt. It has become the perfect microservices platform. Unfortunately, no one in the enterprise is interested in managing thousands of nanoservices “just for fun.” In this session, the presenter hacks on stage a couple of Java EE 7/8 “rightsized” services, links them together, runs them on Docker, and explains the architectural decisions and best practices in real time.

This session is already available for: streaming.

Tuesday, Sep 20, 2:30 p.m. - 3:30 p.m. | Parc 55 - Embarcadero

Is San Francisco too far? See you at Java EE Workshops at Munich Airport, Terminal 2 and particularly at Java EE 7 Microservices.

Real World Java EE Workshops [Airport Munich]>

Adam Bien - September 15, 2016 06:30 AM
Java EE: Accessing Resources In Docker In Stage Environment

"How to change a e.g. JDBC URI in the configuration of a Java EE application server running in docker and staged environment?"
...is one of the recurring airhacks.com, airhacks.io and airhacks.tv questions.

The answer is: don't change it:

See you at Java EE Workshops at Munich Airport, Terminal 2 and particularly at Java EE 7 Microservices Is MUC too far? Checkout: javaeemicro.services.

Real World Java EE Workshops [Airport Munich]>

Wade Chandler's Programming Blog - September 14, 2016 03:25 AM
"Run Focused Test Method" and "Debug Focused Test Method" for NetBeans Groovy Support Now in main-golden and Nightly Builds

If you use NetBeans nightly builds you will now have this functionality. Try it out, and let me know if you experience any issues.

NetBeans – Michael's blog - September 13, 2016 05:30 PM
NetBeans goes Apache

Today NetBeans was proposed to become an Apache project. Here you’ll read the proposal: wiki.apache.org/incubator/NetBeansProposal

DukeScript - September 13, 2016 09:46 AM
SnapSVG for Java

SnapSVG is a very decent JavaScript library for rendering and animations. With great delight the DukeScript project announces immediate availability of the library for all Java users!

Check the javadoc for detailed description. Use following code to add the SnapSVG into your DukeScript application:

Paper s = Exports.Snap("#demo");
Element bigCircle = s.circle(150, 150, 100);
    "fill", "#bada55",
    "stroke", "#000",
    "strokeWidth", 5

Element smallCircle = s.circle(100, 150, 70);
Element discs = Element.$as(s.group(smallCircle, s.circle(200, 150, 70)));
    "fill", "#fff"

    "mask", discs

smallCircle.animate(values("r", 50), 1000);

See the example in our Definitely Typed Java libraries project. Enjoy SVG!

markiewb's blog - September 12, 2016 07:51 PM
NB: How do I create an action which can be invoked by a macro?

Use @EditorActionRegistration!

@NbBundle.Messages({ "CTL_MyAction=Let's go", "macro-name=Let's go" })
	name = "macro-name", 
	mimeType = "text/x-java", 
	menuPath = "Source", menuPosition = 0, menuText = "#CTL_MyAction")
public class MyAction extends org.netbeans.editor.BaseAction {

Now your action can be invoked by a macro using its macroname (the name attribute in the @EditorActionRegistration-Annotation) and even recorded by the macro recorder.

[1] http://wiki.netbeans.org/DevFaqAddMacroableAction

APIDesign - Blogs - September 12, 2016 08:55 AM
Distribute Non-distributable

AutoUpdate is a fine NetBeans technology that can help you distribute things may see non-distributable. Here is a small demo that shows how one can fix broken NetBeans 8.1 installation.

--JaroslavTulach 08:55, 12 September 2016 (UTC)

Wade Chandler's Programming Blog - September 11, 2016 11:28 PM
"Run Focused Test Method" and "Debug Focused Test Method" for NetBeans Groovy Support in main and main-silver Hg Repositories

The ability to run or debug a single Groovy test from the IDE has now been merged into the main and main-silver Hg repositories for the NetBeans IDE. I assume this will work into main-golden and thus the nightly dev builds soon. I will post another update once that happens.

NetBeans – Michael's blog - September 11, 2016 09:04 PM
NetBeans Evening Cologne 2016

On Sept. 9th we joined for the first NetBeans Evening Cologne. Due to the fine weather some people preferred to have a party or something else and thus few seats (apx. 5) had been empty. Nevertheless, it became an interesting evening. New and Noteworthy First Geertjan Wielenga talked about NetBeans at a glance and the … Continue reading "NetBeans Evening Cologne 2016"

Geertjan's Blog - September 07, 2016 09:18 AM
Finegrained JShell Integration in NetBeans IDE

In addition to the generic JShell integration in NetBeans, discussed yesterday, there's more finegrained support enabling project-specific JShell snippets to be run. That means, depending on how you organize your life, no "build" will be needed anymore when you try out your code. Just hack a snippet together, run it in JShell, when/if it works, move it to your project.

Each project, whether Maven-based or Ant-based, will have an "Execute Java Shell" menu item, which is shown below. When that menu item is clicked, a new VM is created, which has access to the project's path, including project-specific JShell snippets, as discussed below.

Below you see a folder "nbproject/private/jshell-snippets", which contains JShell snippets that I know will be handy for experimenting with in the context of my project:

Also, note that there's a folder called "startup", within "jshell-snippets", above. Anything in there will be executed automatically when the project-specific JShell starts up. In the case of Maven, you'll set a property in your POM, "org.netbeans.jshell.snippetsRoot", which points to a folder in which your snippets, including the optional "startup" folder, are found:


Once the project-specific JShell has started either via a Maven project or an Ant project, there's a small drop-down that shows an item for each of the JShell snippets, which can be run by clicking on them:

Alternatively, you can do a Run/Debug project and then Run | Open Java Shell for Main Project, which connects to the VM where the project is run/debugged. The difference is the startup procedure. "Execute Java Shell" only starts the machine and waits for interaction from JShell, while "Open Java Shell" works with an existing process which starts as a regular application.

Adam Bien - September 07, 2016 07:20 AM
Building Integrated Messaging Solutions For Banks With Java EE Microservices

Grzegorz, please introduce yourself

My name is Grzegorz Huber and I'm a software developer at www.consdata.com. There are other titles that change depending on my current role in different projects, but I prefer the down-to-earth description instead.

What are you currently building?

We're building a mailbox application for one of the banks here in Poland. The idea is to give clients a better tooling for their needs to contact the bank whether it's a support question or a complaint. Obviously this also means integrating with internal bank mechanisms and now clients are receiving their bank statements in a much more convenient way. It probably sounds boring because we've all been using emails for years. However, designing your own messaging application turns out to be quite a challenge especially when everyone just keeps on saying just do it like Google does ;-). The domain is simple, yes, but the scale of the system make things much more challenging. Plus it's not only for messaging. We're currently integrating our mailbox application with some of our other products that add more functionalities like internet forms and automated workflow. Most of the features have already been implemented and I'm still in awe that our whole backend is under 20k lines of code. And people say Java makes your systems big.

After the Java EE Microservices workshop at MUC Airport in January you decided to refactor your current application towards pure Java EE Microservices. What is the progress?

Actually, It was a brand new application and we started in late February so the timing was perfect for us. The current progress is 10 microservices. I guess that's one way to describe our "advancement". Using other metrics we're currently in performance testing and getting closer to the production stage. That's for my current project. The side effect is a very small change within our organization that's about to take it's ripple effect to a whole new level.

How many microservices comprise your application / system?

Currently ten, but it was our first time and there were some disbelievers, who were skeptical at first, plus the learning curve so we definitely see there could be more closer to 15.

Which application servers, tools or IDEs are you using?

The most interesting is probably the Java EE part of the whole architecture where we decided to use Payara, Payara Micro, Embedded Payara for testing. Obviously is many ways inspired by the training in Munich. On top of that we developed our own installation platform based on Docker, which help us manage different parts of our application.

How big is your WAR?

It's between 3 and 8 MB. We're not super light, but we're very happy with the final result. Some compromises had to be made. For example we decided to use lombok, which adds almost 2MB to each war. Logback and its dependencies add another 700KB. Plus our db backends use mybatis, which adds almost 2MB as well. We like this strategy anyway... we try to keep these values in check and we consciously select what should be provided by the Jave EE container and what should be included with our application. I would like to be able to go with the javaee-api alone, but that's not possible ;-).

Here's the full report ;-)

3,7M lip 18 15:15 statics.war
7,0M lip 18 15:15 messages.war
8,0M lip 18 15:15 integration.war
7,0M lip 18 15:15 messages-sendmass.war
5,7M lip 18 15:15 users.war
3,4M lip 18 15:15 facade.war
5,5M lip 18 15:15 templates.war
3,8M lip 18 15:15 ecm.war
3,9M lip 18 15:15 crypto.war
3,6M lip 18 15:15 accounts.war

How fast is the build?

The whole microservice backend without tests is like 20-30 seconds. I normally don't divide build time with and without tests, but we did something here that should be mentioned. We write basic JUnit test cases in 3 layers... sort of. Layer one are basic junit tests based on mockito for simple business logic tests. Layer two includes real bean tests using CDI injection and everything that's possible within one microservice and using specialization beans that serve as mocks to other microservices. Layer three is the most expensive, but I think the pros are much more important than the disadvantage of extra added time. Our layer 3 test use the embedded Payara Micro, which takes the target wars and tests the real application stuff and including communication between microservices. We have Junit tests that use up to 6 microservice modules depending on the user story. I think that's one of the bigger challenges awaiting those who adopt this architecture so it was really handy to have Payara ready for that. The whole build, the one we use to build upon every commit for pull requests, takes up to 5 minutes at the moment.

Does "stock" Java EE fit well with the microservices idea?

Yep! It seems that it was designed this way and it's asking to be used this way. I really don't know why this approach wasn't picked up faster by developers around the world :).

You are using the porcupine as Bulkhead. Which problem does it solve?

Well, even though Glassfish (and Payara) have built-in monitoring it wasn't what we wanted it to be. Instead with a proper application design and splitting code across different microservices and different executors we were able to get our own dedicated monitoring service via REST plus other small things like named threads for each module. Additionally there's this feeling that you're in complete control over how different modules have different configurations for their own executor services. The added benefit of using Porcupine right away is that when you think about stuff like thread pools at the beginning of your application it's much easier to scale your system in the future.

Are you still happy with Boundary Control Entity?

I don't think we use that in the direct way. We definitely don't use technical names for organizing the core within our microservices and our approach is still based on the business responsibilities of the classes.

Any major challenges so far?

Apart from different approach to testing, which I think we tackled head on, the biggest challenge is probably some sort of microservice registry that's we're still missing in our project. Using Docker helps here a little bit, but when you get 10+ microservices and you really want to use them independently it's good to have something this figured out. One of the main reason why I came across your training was an idea to replace OSGi with something lighter. Microservices are indeed lighter, but you still have to manage them on your own. There are many solution that help with that, but I feel we need to be careful here, cause adding a registry is a good idea, but it can't become a single point of failure for us.

Any closing thoughts on Java EE and microservices?

It's nice to be able to design modules in such way that the main application operation is designed to work 24hrs per day and other heavy operation, which may bring instability to the system are in separate modules on different servers with different boundaries.

That's nearly impossible with a monolith and usually it's too late. In our case we had 9 microservices at one point and the 10th was brought to life when we realized that our core business logic is so fast and small that it runs smoothly on 1GB of RAM and the other module is doing this big batch operations and needs additional 6-8GB of RAM. It would be ill-advised to run them both together on a 8GB RAM system.

Business-wise both modules send messages. The microservice way of thinking let's you split code not only using domains but ever further when there are other benefits like performance and stability.

Is you company hiring Java (EE) developers?

Yes, checkout: kariera.consdata.pl/

Can you share any resources with us?

Here you can learn more about our software www.consdata.com. Feel free to contact me at ghuber@consdata.pl if you have any questions.

Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - September 07, 2016 03:42 AM
Learning Java with JShell in NetBeans IDE

Let's use JShell to learn about Paths and Files and Streams... here we go... this seems to work, since the Output window prints out the content of my file, which has two lines "hello" and "world":

Sweet documentation explains everything:

Next, let's put that useful code snippet to some use... i.e., we'll move it into a new Java source file in my application:

And there it is, all the verbosity/expressiveness of Java wrapped around our little snippet:

Hmmm. This will be pretty useful for anyone teaching and/or learning Java.

Wade Chandler's Programming Blog - September 07, 2016 03:41 AM
Adding "Run Focused Test Method" and "Debug Focused Test Method" to NetBeans Groovy Support

If you are a NetBeans and Groovy fan, then you have probably noticed over the years you can not execute nor debug an individual test method if using Groovy for testing. I have contributed to other parts of the IDE at various times, but hadn't looked into the Groovy support until recently. I finally had enough executing all tests in a file.

The code isn't necessarily difficult. For what I am adding it is slightly complicated due to NetBeans Groovy support module dependencies, and some things needing to be broken out a little differently. For now I am using reflection to access what I need, and that will work fine enough in the near term. Long term I plan to work with other community contributors to clean things up.

Another thing which makes coding this interesting is a mismatch between NetBeans notion of an offset into a source file and the Groovy ASTs notion of it. NetBeans uses a cursor or single integer value offset, and Groovy uses the notion of a line and column. So, some translation and AST traversal is needed to pinpoint the selected method. Standard editor things, but of note for this fix.

Too, the previous code halfway attempted to do this, but it seems some copy and paste happened between the Java and Groovy support as that code was using Java specific features which will not exactly work as Java is a subset of Groovy. The Groovy AST classes along with a little translation fixed it right up.

The changes should make their way into the code base soon. I have things working locally. I am now cleaning things up. I figure I will tackle other items which bother me about NetBeans Groovy support now that I am getting into it.

I will update once merged in, so check back.

Adam Bien - September 06, 2016 06:28 AM
React, Angular 2, Microservices, High Performance Java EE, Q & A -- Early Autumn Events, Conferences and JUGs

  • Mission Impossible: From HTML 5 to Native Applications, Workshop for Java EE developers, Rapperswil, Tuesday, 13th September. My goal is a (code) walk through the current JavaScript / HTML 5 / CSS eco system. This course is targeted to Java EE developers -- at least I will provide as many as possible relevant samples from the Java EE ecosystem to explain HTML 5 && Co.
  • Live Q&A streaming: October, 3rd, 6 pm CET: www.ustream.tv/channel/adambien Any questions left? Ask now: https://gist.github.com/AdamBien/e6e20c129e673ad558be495dd4f3afc4
  • Live Coding "No-Ceremony" Microservices, CON3436, September, 20th, 14:30, 15:30, JavaOne Conference, San Francisco. Last year I got too many questions and there was no time left for coding. This year I plan to code, build and deploy as many cycles as only possible. Docker, Java EE, Networking, Configuration & Co. topics included. I will answer the questions from the audience concurrently -- without any breakpoints.
  • Live streaming session, Internet Mobile World, "Building Backend Services -- Fast and Straight" imworld.ro
  • Live streaming session, High Load Conf, October, 15th, "Lightning Java EE -- What Is Possible With Stock Servers", hdconf.by
  • October, 19th, JUG Poznan session: "Microservices in 2016 — What Worked Well (this time completely without slides)". This session is about lessons learned and the most frequently asked questions about Microservices and Java EE. This time I plan to spend 99,99% of the time in the IDE. The more questions -- the better.
  • airhacks.com workshop: MUC airport, October, 24th Building React Apps. From setup, over build, to "hot deployment" with the JavaScript "Framework" react. After several React project I would like to present some "working practices".
  • airhacks.com workshop: MUC airport, October, 25th Building Angular 2 Apps. In this workshop I will focus on Angular 2 and will cover the typical project lifecycle - from setup over deployment. This workshop is similar to the "Building React Apps", but only covers Angular 2.

Coming this winter: 5 days Java EE Airhacks: from Bootstrap, over best practices, architectures, testing to microservices: http://workshops.adam-bien.com

Also checkout workshops on-demand: airhacks.io.

Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - September 05, 2016 09:55 AM
Tip for JavaOne Speakers with NetBeans IDE

Quite a few speakers at JavaOne 2016 will be using NetBeans IDE for demos during their sessions. Excellent. Less excellent is the yelling that will befall you when your audience wants your font to be bigger.

So. BEFORE your session, make sure you're comfortable with the "Zoom Text" keyboard shortcuts, which are set as following by default:

Under pressure, I'm not so great with the mousewheel on my keyboard and so I have remapped the "Zoom Text" keyboard shortcuts as follows, i.e., to Ctrl+PAGE_UP and Ctrl+PAGE_DOWN. (These do override existing keyboard shortcuts, which I never use anyway, i.e., tabbing left and right, I think.)

That's much better and now I have full control over the font size in all the editors in NetBeans IDE via two handy keyboard shortcuts.