Java Day in Johannesburg

Last month, I had the the South Africa’s Java Day. The event was organised by the Jozi JUG, the Johannesburg JUG, and was supported by the local Oracle branch. The event was held on a Saturday and had around 150 attendees, so a very good turnout!
JoziThe agenda (see here ) had a nice mix of topics with speakers from the Jozi JUG and Simon and myself from Oracle. Given the recent Java SE 8 launch, the spotlight was clearly on Java SE. I took care of the Java EE section.

Simon says...

Simon says…

A highlight for me was Mark Clarke’s ‘Java game programming with libgdx‘ session. It’s always nice to see unusual topics being addressed. The break discussions were also friendly and interesting. During those discussions, I was surprised to meet so many people who knows the (now old) SeeBeyond products. There should have been a lot of integration projects in South Africa.

Mark doing some pair programming

Mark doing pair programming

It was my first trip to South Africa, it’s relatively pleasant to fly to Johannesburg despite the 9000Km between Belgium and Johannesburg. There are several reasons for that; the plane itself, an Airbus A380. In fact, it seems that the major European carriers (Lufthansa, Air France and British Airways) are all deserving Johannesburg using A380’s.

Nice piece of engineering

Nice piece of engineering

Something else that help is the fact the Central Europe and South Africa are on the same time zone, so there’s not jet lag. But I guess the main reason is that flighst leaves Europe around midnight so that gives a full day to work. And in an airport, there’s a clear difference between day and night. During the day, the ground staff is stressed, exalted, etc. During the night, everybody is relaxed! The only drawback of that is that you shouldn’t expect to find any decent food during night.

Overall, the Jozi JUG put together a really nice event. Kudos to Richard Kolb, Michael Williams, Mark Clarke, Marius Kruger and the rest of the Team!

The Jozi JUG Team

The Jozi JUG Team

My stay in South Africa was very short, i.e. less than 72h. I have to thanks Mark Clarke who took the time to visit with me the Lion Park a few hours before my departure. Thanks Mark! Let’s try to meet again in Belgium during Devoxx.

Another kitten picure

Another kitten picure

Some additional pictures of the event can be found here and the different slides decks can be found here.

Alpes JUG and Grenoble JUG

Last week, I had the privilege to attend 2 JUG evening sessions in France. The first evening was with the Lyon JUG and the second one was in Grenoble for the Alpes JUG. The theme of the evening was “Java on the server”. I decided to give 2 angles to this theme : Java EE and JavaScript.
audience

My first session was an update on Java EE 7. Even if Java EE 7 has been launched last year, there are still a lot of people that are not yet fully aware of the new features and improvements of Java EE 7. So this session was useful.

My second session was an update on Project Avatar. In (very) short, Project Avatar brings the Node.js programming model to Java and extend it with some additional capabilities provided by the underlying runtime platform, i.e. the Java Virtual Machine and the Java EE Container. Project Avatar raise questions but also interests. To clarify some of those points, I plan to write a few posts to explain some of those capabilities (eg. the Model-Store, how the mulitple Event loops works and scale, the Client framework …).


If I make abstraction of the air controller strike, it was a pleasant and worth while (short!) trip. Thanks to Alexis and the team in Lyon and to Emmanuel and the team in Grenoble, I really enjoyed my time both in Lyon and Grenoble!

PS: Did I ever mention that the 3rd (and the 4th) halve(s) in JUG evening are always a very pleasant moment?
plateau

PPS: Watch out, there’s no parking rules in Lyon!
truck

Updating Weld in GlassFish 4

GlassFish uses Weld, the CDI Reference Implementation, as its CDI implementation. More specifically, GF 4.0 Open Source Edition is using Weld 2.0.0.SP1. Unfortunately, there’s an issue related to the Weld GF integration that can arise when using JSF. To work-around this, you just need to replace, in your GlassFish 4 setup, the Weld 2.0.0.SP1 release with the latest Weld 2.0.5 release.

0. Backup the original Weld implementation
mv glassfish/modules/weld-osgi-bundle.jar /backup

1. Grab the Weld 2.0.5 OSGi bundle and copy it to the GF modules directory
cp weld-osgi-bundle-2.0.5.Final.jar glassfish/modules/

2. Restart GlassFish
glassfish/bin/asadmin restart-domain domain1

3. You check which version is now installed by issuing
glassfish/bin/asadmin osgi lb | grep 'Weld OSGi'osgiweld

The usual disclaimers : “Use at your own risk”, “Don’t do this at home”, “Wrestlers are trained professional athletes. You should never try to emulate what they do in and out of the ring”,

Java EE 7 in *raine (Lorraine and Ukraine)

A few days ago, I was invited in Nancy (France) by the Lorraine JUG to talk about Java EE 7.

The Lorraine JUG team had arranged 2 events, an afternoon session in the local university (Telecom Nancy) and a regular JUG evening session.

During the afternoon, we hosted a Java EE 7 hands-on labs with 40 students. The room was literally packed. I was positively surprised by the students and their ability to easily handle the labs even if they haven’t yet tackled Java EE in their training curriculum. This demonstrate that Java EE is now really easy to approach.

Java EE 7 Hands on Lab at Nancy Telecom

Java EE 7 Hands on Lab at Nancy Telecom

During the evening, I talked during roughly 2h30 on Java EE 7. The first part was a general Java EE 7 overview, I then spent an hour on a specific Java EE 7 API, i.e. JSR 356, the WebSocket API.
We concluded with a interactive Q&A session… Some questions were Java EE focused but some questions were broader including quite a few questions on the recent evolution related to security. The evening session was well attended with over 40 attendees.

We concluded the day by a visit of ‘the world most beautiful place’… according to the local people : the Place Stanislas. But now that I have seen it, I have to admit that it’s a really nice place! We finally had a dinner with some of the Lorraine JUG leaders.
I have really enjoyed this short Lorraine visit, including the post-event dinner!

The next stop was JavaDay in Kiev (Ukraine).

JavaDays sponsors

JavaDays sponsors

Nancy – Kiev is quite a lengthy journey (1 coach, 2 trains, 1 flight, 1 taxi) but it only get longer when things goes wrong! So for this trip, I give a personal award to the smart person who had the bright idea to throw luggages on the high speed train tracks!

JavaDay is an annual conference organised by the Ukraine Java User Group. The conference is taking place over a week-end in Kiev (first day is a regular conference with keynotes and parallel tracks, second day is more a ‘university’ day).

It is really impressive to see nearly 500 Java fans showing up a saturday morning!

Pictures by Bogdan Maylove

JavaDay on early Saturday morning


I had the privilege to give 2 talks, a keynote on Java EE to kick start the conference and a technical session on WebSocket.
JavaDay Keynote session

JavaDay Keynote session

Despite the fact that my technical session was held in another building and was competing with other parallels sessions, I was positively surprised by the turnover, more than 50 people in a room that can probably accommodate maximum 35-40 persons! Needless to say that it was hot! ;-)
kiev3
I have really enjoyed me time in Kiev. What is striking for a first time visitor when entering Kiev is this gigantic Mother Motherland statue! http://en.wikipedia.org/wiki/Mother_Motherland,_Kiev I would have loved to visit the city as it seems to be a interesting place but I had to rush after my second talk to catch my plane.

More pictures of JavaDay can be found here.

Oh and JavaDay deserve to get the award of the sweetest speaker gift!

JavaDay speaker present

JavaDay speaker present

Next conference for me will be JMaghreb (Casablanca) and Devoxx (Antwerp). See you there!

(Javy) Developer Day in Poland

Oracle Poland held on November 28 a Developer Day in Warsaw.

The event was a real success with over 100 attendees!
In the morning, Simon Ritter and myself delivered the keynote. In the afternoon, Simon did a JavaFX Hands-on Lab while I took care of the Java EE 7 Lab.

The Lab was based on the ‘WebSocket, SSE and JSON-P’ JavaOne Lab (more info here).

I am very pleased with this event as the audience was involved, I had lots of interactions and lot of (relevant!) questions. And despite the large audience and the network issues (*), the lab went very well!

(*) Lesson for next time, it’s never a good idea to have lots of Maven builds over a Wifi network! ;-)

One GlassFish instance hosting different DNS domains

Here is a quick tip to have a single GlassFish instance serving specific Web applications to different (DNS) domains. To achieve this, one can use GF Virtual Server feature. ‘Virtual Server’ is not a new feature, it has been introduced a long time ago.

GF will serve the Web application AppA from 192.168.1.6 (servera) and the Web application AppB from 192.168.1.20 (serverb), both (virtual) servers will use the 9000 port.

I have defined 2 IP addresses (192.168.1.6 & 192.168.1.20). In my case, both IPs are bound the same network interface. 2 host alias pointing to the 2 IP addresses are defined in the host file (/private/etc/hosts on OS X) :
192.168.1.6 servera
192.168.1.20 serverb

Deploy 2 Web applications on GlassFish. For the sake of brevity, here’s a shortcut to do this.
cd glassfish/domains/domain1/autodeploy
mkdir AppA AppB

copy the following index.jsp in the AppA and in the AppB directory.

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
  <head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       <title>JSP Page</title>
  </head>
  <body>
     <%
        out.println(request.getContextPath());
        out.println(" on ");
        out.println(request.getServerName()); 
      %>    
  </body>
</html>

If everything went well, AppA and AppB should be auto-deployed and should be accessible on http://localhost:8080/AppA and http://localhost:8080/AppB

Now, we’ll create 2 HTTP listeners (http-listener-A & http-listener-B). Each listener will be bound to a specific IP address, http-listener-A to 192.168.1.6 and http-listener-B to 192.168.1.20.

We will now bind the existing 'server' virtual server to http-listener-A and we will create the 'serverB' virtual server and bind it to http-listener-B. Make sure that each virtual server is bound to the right http-listener.

Finally, we just have to specify, for each Web Applications, on which Virtual Server it will be accessible, e.g. AppA on server, AppB on serverB.

AppA is now accessible on http://serverb:9000/AppA while http://servera:9000/AppB gives a 404 error. AppB is accessible on http://serverb:9000/AppB and http://serverb:9000/AppA gives a 404 too.

Installing GlassFish on a Raspberry Pi

This post detail how to quickly have GlassFish running on a Raspberry Pi.
As I don’t have a DVI-HDMI adapter, this install will be headless. My Raspberry Pi setup is simple, an ethernet connection with DHCP and power, no screen, no keyboard attached.

Installing the OS

Download from http://www.raspberrypi.org/downloads the Raspbian “wheezy” distribution and dump it to a SD Card. Insert the SD card in the Raspberry, power it. Depending on the SD card performance, the boot process takes between 30 and 60 seconds…

Log in your Raspberry using the default 'pi' user, password: 'raspberry'.
ssh pi@192.168.1.8
Continue reading

My Twitter timeline on a Minitel

A few months, I hacked a Twitter client to read my time line on an old Minitel.

It’s fairly easy to do, the Minitel modem is bypassed by an Arduino that connect, via ethernet, to a Java based proxy running on the network. This proxy do all the heavy-lifting, it connects to Twitter using Twitter4J, it get the timeline, it filters out a lot of stuff (eg. don’t try unicode a Minitel).

Here’s the result…

Snow = Kinect tracking!

The weather was really bad here last week-end. So it was the perect excuse to spend some time to play with Kinect!
After a few hours, I have a simple Java/Processing Kinect tracking application apps that works fine.
I am tracking complete blobs but it seems that tracking the center of a blob also gives quite good results (see the blue dot Vs. the large blue rectangle).
Right now, calibration is manual and minimal but it works. It was my first steps but while doing this, I came with several ideas I’d like to test when I’ll have some time : improved calibration, improved blob (and parasite) detections, multi-depth tracking, etc. I have also some ideas I’d like to test to do some simple skeleton detection…

Kinect Tracking from David Delabassee on Vimeo.

I am waiting a few bits to be delivered to do something that involve Kinect and Arduino…

How to use DFRobot Ethernet & LCD keypad shields ?

I have received several questions on my previous post about how I did to use the DFRobot Ethernet shied with the DFRobot LCD display shield. This post will clarify that…

According DFRobot site, the Ethernet Shield use digital pins 2, 10, 11, 12 & 13; it is compatible with the Arduino Ethernet library. While the LCD shield use digital pins 5, 6, 7, 8 & 9 and works with the LCB4Bit_Mod library, a modified version of LCD4bits.

This document says that Ethernet Shield uses the 10, 11, 12 & 13 pins and the LCD shields uses the 4, 5, 6, 7, 8, 9, 10 pins. So the details on which pins are used is inconsistent at best!
Continue reading