Yet Another Petstore !

Do you remember the good old Java Petstore ? It was a sample application created by Sun for its Java BluePrints program. The Java Petstore was designed to illustrate how J2EE (and then Java EE) could be used to develop an eCommerce web application. Yes, the point of the Petstore is to sell pets online. The Petstore had a huge […]

Read More →

WYTIWYR : What You Test Is What You Run

I'm fed up with unit testing !

It's 2012 and my first resolution of the year is to finally tell the truth about testing : unit testing is pretty much useless when your code runs inside a container. How do you unit test an EJB which relies on the container services (i.e transaction, injection, security...) ? Well, you mock the database access, you mock your security layer, you mock your dependencies, you mock your validation layer... to test what ? A bit of business logic. Yes. Unit test is interesting when you have complex business logic to test so you can have quick feedback. Otherwise, it's a waste of time which doesn't test your container services. So I'm not saying unit testing is completely useless, I'm saying that integration testing is also to be considered when you run your code inside a Java EE container.

Read More →

O Java EE 6 Application Servers, Where Art Thou?

Nearly two years ago (time flies), when Java EE 6 came out, I wrote a post about application servers where I did some micro benchmarking (basically, startup time). I had plenty of comments and recently I had many people asking for some updates. Witht Java EE 6 booming, with some cloud vendors moving to Java EE 6, it was time to update this microbenchmark and focus on Java EE 6 application servers. BTW, if you want to know what Java EE 6 is, you can check the slides of a presentationI gave a few times.

The benchmark

Same disclaimer as last time : This is not a real benchmark ! so I'll copy paste the paragraph I wrote last time :

In this test I’m just concerned about the usability of an application server for a developer. The idea is to download it, install it, start it and take some measurements : size of download, ease of installation, size of disk, startup time, size of RAM.

Read More →

Walking through the Java EE 6 implementation maze

I've been asked so many times "what are the implementations of such or such specification in Java EE 6 ?" or "what is the reference implementation of such a spec ?". Because I always forget some (and to be honest, sometimes I don't even know if a spec has several implementations of not), I'm writing this post to help me (and you) to remember.

So here is a non-exhaustive list of the several Java EE 6 implementations (please leave a comment to add anything to this list) ...

Read More →

Adding CDI to an existing Java EE 6 application

In my previous post I've shown you how to bootstrap CDI in several environments (GlassFish, Tomcat, Jetty, Java SE). So now let's go a bit further and use it in real code. As its name states, CDI (Contexts and Dependency Injection) is also about Dependency Injection, so let's focus on just this feature for now. I will not define what DI (Dependency Injection) is. If you don't know I'll leave you to check the definition, the origins of this pattern and even a book that covers it all.

Read More →

Bootstrapping CDI in several environments

I feel like writing some posts about CDI (Contexts and Dependency Injection). So this is the first one of a series of x posts (0<x<10). I will not go through the entire history of CDI (formerly called Web Beans, splitted in two JSRs... and so on), but will try to give you information on how to use it in different environments, explain you injection, context management, scoping, decorators and so on. So you can think of this series of posts as a humble step by step CDI tutorial. You can also read the very good documentation on the JBoss website (where I got some help and inspiration).

Read More →

Java EE 6 ? Excuse my French !

It's been a long time since I haven't blogged about what I am doing on evenings and week-ends. For people who think that I watch TV and have BBQs on Saturdays, I have to tell you that I don't have any TV (it's been over 20 years now) and I don't have a garden to cook my burgers. No, I've spent my spare time updating my Java EE 6 book.

In this second edition I have updated the content and added new sections. When the first version of the book got out it was in June 2009 and Java EE 6 hadn't been released yet (December 2009). So there were some topics that I didn't cover because they were not completely finished (like the Criteria API in JPA 2.0). I've also updated the frameworks (GlassFish 3.0.1) and the code so it's more accurate. The book is planned to be published in September 2010. As always there is a full list of people I need to thank for this second edition. Writing or updating a book is hard work and comfort is always needed.

Read More →

A busy week at Devoxx

If you don’t already know it, next week is Devoxx : the biggest European Java conference. It’s my 4th time there and this year I’ll be doing 2 conferences, 1 BOF and 1 book signing session. Tuesday, from 9:30 to 12:30 : University talk The Java EE 6 Platform.  I’ll be doing a 3 hours talk with Alexis Moussine-Pouchkine with plenty of demos. We will gradually develop a web application using most of the EE specifications (Managed Bean 1.0, JPA 2.0, Servlet 3.0, EJB 3.1, JSF 2.0, Bean Validation 1.0 and JAX-RS 1.1) Tuesday, from 7pm to 8pm : BOF Why Should I Care About Java EE 6 ?. If you’ve attended the university talk or if you just want to talk about Java EE 6, come to this BOF. With Alexis we will be sharing this BOF with Paul Sandoz, Roberto Chinnici, Ludovic Champenois and Emmanuel Bernard. Wednesday, from 3:10 to 4:10 : Conference talk What’s new in Java EE 6 ?. This one hour talk is for people who already know Java EE 5 and want to discover what’s new in EE 6. I’m proud to say that I’ll be talking in room number 8 (the biggest) just after James Gosling. Cool ! Wednesday, from 4:10 to 4:40 : Book signing session. If you want to know more about Java EE 6 and get a copy of your book signed, let’s meet in the ground floor at the […]

Read More →

Java EE 6 is touring French JUGs

One beauty of living in a country with nearly 20 Java User Groups is that you can travel around while talking about your favourite topics. For me, at the moment, it’s Java EE 6 (thanks to my book). So last week I was invited to the Riviera JUG to give a talk about the new features of EE 6. As […]

Read More →

Dédicace du livre Java EE 6

Aujourd’hui, les exemplaires du livre Java EE 6 sont enfin arrivés en Europe. J’ai reçu ma petite collection privée de 20 exemplaires ainsi que tous les bons libraires informatiques parisiens. Alors, si vous faites partis des quelques rares qui n’ont pas encore ce best-seller, je vous propose de nous retrouver samedi 20 juin à la librairie Le Monde En Tique […]

Read More →

Java EE 6 book at JavaOne

Hurrah !!! My book physically exists. It was printed last week and is available at JavaOne. So guys, look for the book shop in the Moscone center, and ask for the already best-seller Java EE 6 book. You can’t miss it. It has been published by Apress (it’s black and yellow) and, as you can see on the photo, it’s […]

Read More →

Bienvenu chez le Ch’ti JUG

Dans la famille Présentation Java EE 6, je voudrai les Ch’tis. Qques jours après mes présentations GlassFish et Java EE 6 à la conférence GeeCon à Cracovie, ce soir je me suis rendu à Lille pour présenter les nouveautés de la future plateforme entreprise. Dernier en date de la longue lignée des JUGs français, le Ch’ti JUG était inauguré ce […]

Read More →

Présentation Java EE 6 au Ch’ti JUG

2008, c’était l’année de Bienvenue chez les Ch’tis. 2009 c’est l’année du Ch’ti JUG. Mais non, je ne ponctuerai pas ce post de “biloute”, ‘j’te dis quoi” et autres “heiiinnnnn!”. En fait, je veux juste vous informer de l’événement del ch’nord (ha, je me suis laissé aller là) à ne pas louper : une présentation sur Java EE 6 pour […]

Read More →

A book about Java EE 6

If I haven’t blogged for a long time, that’s because I was busy writing a book about Java EE 6. As some of you already know, I’m expert member on various JSRs, including Java EE 6. Last year I have been approached by Apress who proposed me to write a book about Java EE 6 in the From Novice to Professional collection. At first I wasn’t sure because I’ve already written a book and know the workload that it represents. But I’ve been a reader of Apress books for a long time, an appreciate them. I was finally convinced to participate to such quality books. So here it is : Beginning Java™ EE 6 Platform with GlassFish™ 3: From Novice to Professional. Well, actually the book is gone to printing and will be published end of May. So stay tune, and be ready to buy a copy of it (or an ebook version). The book focuses on the novelties of Java EE 6 and covers most of the specifications. 450 pages structured as follow : Chapter 1 briefly presents Java EE 6 essentials and the tools used throughout the book (JDK, Maven, JUnit, Derby and GlassFish v3). The persistent tier is described from Chapter 2 to Chapter 5 and focuses on JPA 2.0. After a general overview with some hands-on examples (Chapter 2), Chapter 3 delves into the object-relational mapping (mapping attributes, relationships and inheritance). Chapter 4 shows you how […]

Read More →

Java EE 6 at the GeeCon conference

I’m proud to announce that I’ll be talking at the GeeCON conference about Java EE 6. Proud because this conference is the first edition and has been created by the Polish JUG. A few months ago, Grzegorz Duda asked me if I was interested in speaking there. I’m always ready when it comes to talk for JUGs. GeeCON is a […]

Read More →

Looking for Java EE 6 expert members to organize a BOF at Jazoon

Jazoon, the international conference on Java technology, will be held in Zurich from the 22nd to the 25th of June. For four days you will have the chance to go to many technical presentations, with good speakers and also plenty of BOFs. I‘ve sumitted a talk on Java EE 6 and I‘ve also submitted a BOF on the same topic. The BOF is called Why should I care about Java EE 6 ? The idea is to meet informally with expert members or spec leads around Java EE 6 (EJB, JPA, JAX-RS, JAX-WS…). Developer, architects, project leaders who wantsto know more about Java EE 6 could come and share their questions and comments with Java EE 6 experts. To hold this BOF, I‘m looking for other expert members or spec leads who will be at Jazoon. If you are interested, drop me an email so we can try to make this BOF happen.

Read More →

Java EE 6 Book

In today’s business world, applications need to access data, apply business logic, add presentation layers, and communicate with external systems. That’s what companies are trying to achieve while minimizing costs, using standard and robust technologies that can handle heavy loads. If that’s your case, you have the right book in your hands.

Java Enterprise Edition appeared at the end of the 1990s and brought to the Java language a robust software platform for enterprise development. Challenged at each new version, badly understood or misused, overengineered, and competing with open source frameworks, J2EE was seen as a heavyweight technology. Java EE benefited from these criticisms to improve and is today focused on simplicity.

Read More →