Antonio Goncalves Interview (GlassFish Podcast)

I'm here with Antonio Goncalves, and Antonio is a difficult person to introduce because he has many hats, so why don't you introduce yourself?
Hi, my name is Antonio (http://www.antoniogoncalves.org/), I'm an IT nerd, studied IT, I worked with C and C++ for many years, and I discovered Java in 98. A year after I was lucky to start working with J2EE at BEA, so I worked for BEA for a couple of years with EJBs, J2EE, Servlets, JSPs... And after, in 2001, while I was working I started to teach J2EE at school, so plenty of students started doing EJBs, and in the meantime I was writing articles, speaking at conferences and so on. In 2007 I published a first book about Java EE 5, it was in French, and at the same time, I took all this experience of the book and J2EE and decided to join the JCP and became an expert member on several specifications of Java EE 6. And talking about Java EE 6, I've just published a book about it. And on my spare time I'm also the JUG Leader of the Paris JUG, and recently, I'm talking about last week, I've been nominated Java Champion and I'm really happy about that.

Indeed many hats. You've spent several month buried in your house writing that book on Java EE 6, can you tell us more about it? Is it out yet ? How much of Java EE 6 does it cover since the spec as we speak is not totally finalize yet ? 
I stayed buried at home for 5 months. I started writing the book end of last year but really concentrated on writing full time since the beginning of the year. And all that to be able to be published for JavaOne. The book was actually out the week before JavaOne.  It's 450 pages, 15 chapters, and it covers most of the Java EE 6 specs (JPA 2.0, EJB 3.1, JSF 2.0, JMS, SOAP WS, REST WS).

So it's been out since this past JavaOne. Do you have any feedback in terms on how people liking the book and if the sells are doing alright?
I think it's doing quite well. I don't have the official numbers. The week after JavaOne, the TSS wrote a post about the books that were sold at J1. In the entire week at J1, my book was the 7th best sell and the first one for APress. I think it's doing ok, I don't have the official sell numbers. I went to the Amazon website to see the ranking of the book, but I had to read many blogs to try to understand what the ranking of the book actually meant on Amazon, and I gave up. But I think it's doing quite well.

You mentioned that this is not your first book. How would you compare this experience of writing this Java EE 6 book on the bleeding edge, as the specification was being developed, compared to with the other one, which I understand was Java EE 5 in French ?
Writing in French for me is easier than writing in English. Also when I wrote the Java EE 5 book the spec was already out. So GlassFish V2 was out, the spec was out so it was much easier. Writing the Java EE 6 book, while the spec are still slightly moving, as well as the implementations, is a bit more tricky. It was harder. It was hard work. And I was also impressed by the quality of the reviewing process of Apress. Each time I would submit a chapter, Apress will come back with heaps of comments and questions.

You mentioned GlassFish, and one of the reasons we are having this conversation today on the GlassFish podcast is that the examples in the book are using GlassFish. I'm interested to understand how you got to know GlassFish and why you decided to put it forward and used it in your book ?
Well, the first reason is, of course, GlassFish is the EE 6 Reference Implementation. So, today (July 2009), there's only GlassFish. There's no other application servers doing any Java EE 6 stuff. But also because I had some real work experience with GlassFish v2, I wrote my first book and used GlassFish v2, so I've been using GlassFish for many years. Either at home on my home doing some research, or with my customers. I have some customers running GlassFish. So I'm quite comfortable now with GF and using GlassFish v3 was an easy move. 

So you are quite happy with the result ? Do you have people providing comments on the code itself already ? 
Yes. The book comes with plenty of code, and I have a forum where people can ask questions, and the main topic of these question is about stuff in the code that are not implemented yet. I'm still changing and updating the code frequently as the GlassFish builds are being released. Things are still slightly moving.

For forward disclosure I should probably say that you kindly asked me to write the forewords of your book and I also wrote a couple of pages on the GlassFish part, so I take credit and criticism for all those parts. Switching gears a little bit, let's talk about your involvement in the JCP. You are part of several expert groups, do you have a favourite feature in Java EE 6? Or one favourite feature in one of the specifications, something you really like ?
Yes, there are things I really like. Java EE 6 is a very good move. Now EJBs can have optional interface, meaning you can have an EJB made of only one class, which is nice, you can package an EJB in a war file, so you don't have to go through an ear... The Servlet 3.0 is quite amazing with the asynchronous support, also there's the RESTful web services (JAX-RS). There's plenty of good stuff in Java EE 6, but I have to be honest, my favourite feature is the EJBContainer. The EJBContainer API is a way to use EJBs anywhere : Swing application, main class, batch, in a unit test... That's quite nice, because we are saying, at last, that Java EE 6 is light weigh container. You just use the EJBContainer API, you take a jar, you add it to your classpath, and that's it, exactly like Spring and other light weigh container. That's my favourite thing.

I understand that the EJB container is being worked on as we speak. It should be there in no time. There's another big topic in Java EE 6 beyond the specific features in specifications, it's the profiles. Do you think profiles is something that's welcome for the end user, the developer, or is it the revival of Java EE 6 because there's this web profile which is a smaller set of API, or do you think it's the beginning of fragmentation in the Java EE space?
Good question. For those of you who don't know, as Alexis said, profiles are sub set or super set of the platform. Java EE 6 will come with one profile, the Web Profile, and it will be made of 7 or 8 specifications instead of 28 for the full platform. So it's much smaller. Smaller means for a developer less specifications to learn, and for an editor company, that means less things to implement, because at the moment if you want to implement a Java EE 6 compliant application server, you still have to do Entity Beans CMP, and JAX-RPC, and all the stuff. So profiles are good in this way. On the other hand, as you say, we just created one profile and others will come, I think there's another one on the way getting defined as we speak. A profile can be based on the full platform but it wan also be based on a profile. So, hopefully we will not have thousands of profiles, based on other profiles that are based on other profiles because that will fragment the platform and make it complex to understand which profile to choose.

So far looking good, let's see how it evolves. I think the Web Profile is going the right direction. Let's look back at the evolution of Java EE, or J2EE in the early days, when do you think it really became mature? Will we be able to use Java EE 6 without any additional framework? Are we actually able to do it today with Java EE 5?
I think there are different topics. When you look at the entire scalability, stateless EJBs, pools, no threads, the app server takes care of all the threading, etc. These parts have been mature for many years. But it's true that if you take in terms of usability for the developer, Java EE 5 was a big jump. It brought back POJO model, no XML (or few XML), JPA, annotations, and so on. So I think Java EE 5 was really a big jump and today EE 6 is following the same path because now Servlets and JSF 2.0 are also annotated POJOs with optional XML. And writing JSF components is much easier. And to the second part of the question, I think yes, finally, EE 6 has all the framework needed. Now you can easily develop from a simple web application to a complex enterprise application with EE 6 without no additional frameworks.

As we speak JSR 299 hasn't been voted in yet, so we don't really know what will happen there, if that will be included in the web profile or not.
It's a matter of days now. 299 will be put on the vote really soon. Even if there was some controversy at the beginning when it was called Web Beans, the specification has improved a lot, changes have been made, hopefully 299 will be voted in and I think it's was the missing link of EE, it brings the specifications together.

As part of the additional frameworks I had in mind in my previous question, often times people have their favourite MVC presentation framework, and there is JSF 2.0 in Java EE 6, which one do you recommend, which one should we use? Is it JSF 2.0 or is there still room or good reasons to use other frameworks ? I' m thinking of Wicket or something else.
Well I have a fantastic exit door, I'm a back-end guy, I don't know anything about front-ends. I never go into religious wars about MVC frameworks. But I think JSF 2.0 is quite amazing, it improved a lot, some good stuff with JSF 2.0, but we have to be honest, there's many frameworks that have been around for much longer, people are use to these frameworks, and I don't know if one day we'll have a winner or not. I'll leave the experts to challenge this question. But if we are talking crystal ball, and looking into the future, I don't see any future for all the Flex, JavaFX and SilverLight. When you look at HTML 5 and JavaScript at the moment, I think it really does the job, there's quite amazing stuff out there with GWT, HTML 5 and JavaScript. I think that's why JSF 2.0 has a bright future, it uses these technologies that Java developers know.

A lot of what Spring brought to server-side Java development is now available in Java EE, sometimes even simpler with the use of annotation which Java EE 5 had before Spring adopted them. Do you think there are still good reasons to use Spring today in a typical server side development?
It's a difficult question if you don't want to enter a religious war, EE versus Spring. We all have to acknowledge that Spring changed the enterprise development history. And we all should be grateful for that. When we were talking about MVC frameworks we said there are plenty on the web tier and people are fighting about all that. In the back end, the models are getting closer and closer. And really, when you look at Spring 3 with the annotations, you look back at EE 6, Spring uses a lot of APIs such as JPA, it has a bridge for JAX-RS, and so on. So, both model in the back end are starting to look alike. EJBs and Spring Beans look alike. Difficult choice. I'm going to say something that could be a bit controversial because we've said that years ago about J2EE. I think that now, when a company uses Spring, if a new project starts and the team jumps into Spring, it's because of legacy reasons : people have been using Spring for years because they didn't want to use Entity Beans, they didn't want to use the old EJB model. So they've been using Spring. And if you start a new project now, you use Spring because you know Spring. But have a look at EE 6. Both models are equal, they do the same things, and if you start a new project now you should also look into EE 6 before jumping into Spring just because it's an habit for you.

Maybe this is a personal opinion here but I sense that there's more out of the box integration in EE 6, which is by design a lot of convention over configuration. Spring, and that's a design goal, is very highly configurable. I'm not saying EE 6 is not, I'm saying that you will have to explicitly have to say a lot of things in Spring which maybe you don't have to say in EE 6. Is that a fair statement ?
I'm doing a lot of Spring on my day to day work at my customers, sometimes with Spring 2.0. History changes a lot. When I was doing J2EE 1.4, people doing Spring were laughing at me. Now I'm doing a lot of Java EE 5 and I laugh at people doing Spring 2.0 with all the XML stuff. That's why I was saying that the two models now with annotation, etc., are becoming closer. And I think there's the JSR 299 that is bringing all the EE 6 components together. Which was also a strengh of Spring before. Spring was well integrated compared to J2EE. Now, EE 6 is integrated with 299 and you can do the same things. As you say, you can develop a highly transactional secure and scalable application with EE 6 with only 5 classes with no XML. That's how simple it got. I'm not sure you can do that with Spring without all the XML stuff.

Do you want to say more things on JSR-299, formely known as Web Beans. I don't even know what the new name is.
JCDI : Java Context and Dependency Injection. There was a bit of controversy. It took a bit of time to find the right balance, but I think it's promising. Until then EE 5 was a bunch of specs more or less well integrated. When I say less, a typical example is the HTTP Session vs Stateful EJBs, or the security in the entire stack, which was a bit of a nightmare. JSR-299 is bringing all these models together with dependency injection, with conversations, that's the glue between all the EE 6 specs and I think it's a very valuable spec. Because there was a bit of controversy, there's also the @Inject (JSR-330) coming, but it looks like these two specifications are starting to work together and hopefully in the future we will see both working hand in hand. @Inject being more a SE spec and JCDI being more EE.

To close up on this JCP topic and the specifications, do you want to say a few words of your experience being part of the JCP and an active member of several expert groups?
With my experience on J2EE and my first book on Java EE 5 I really thought I could get involved in this history. But like many I looked at the JCP being a closed black box, I couldn't get in. But I was wrong. I applied to become member on few JSRs, I had some phone calls with the spec leads, and I got in. Little me. I am an individual, I am not part of any company and I got in easily. What's not easy after you join, is working on the JSRs because you do that on your spare time, on week-ends and evenings. The expert groups are made of very cleaver people, exchanging very complex thoughts on the platform, writing documents, thinking about new stuff, exchanging very long and complex emails. So it is hard work. But I'm glad I did. I joined the JCP 2 years ago and it's been quite amazing. On the other hand I can also acknowledge that the JCP is also opening. I had many talks and round tables with Patrick Curran, the chairman of the JCP, and he's trying really hard to open it up. And it's starting to work. Some specifications like JSF 2.0 and JAX-RS have been created in a much more open process (wiki, public mailing list...). A bit more work has to be done to open up the JCP but I think it's on the right path.

Oh and I don't know if it's because all your involvement in the JCP but you mentioned that in the introduction you are now a Java Champion so congratulations for that.
Thanks I was very pleased to get admitted in the very closed group of Java Champions.

So there's another group you are very involved in, you actually created it, this is the Paris JUG. It felt like there was no JUGs in Paris or in France in general. So can you tell us how it started ? Isn't it passé to do Java in the days of Ruby on Rails, PHP, Erlang, Scala, and all those dynamic languages ?
Well, the Paris JUG started because of frustration. I lived in London for 2 years and in London I could see all the activity, all the user groups, all these people having fun and meeting each other. So when I came back to Paris there was nothing local. I had to spend my life traveling to go to other countries and attend Java conferences. So it really started with frustration. I wanted something local, I wanted to meet my mates. So I started this JUG in February 2008. Compare with all the other JUGs around the world we are one of the last, but it's working well.  Talking about Java, I think there are definitely other languages coming, and we already had a talk about Groovy at the Paris JUG. And I'm thinking of inviting other people to talk about other languages. And maybe be one day the "J" of JUG will not mean Java but JVM with all the languages running on the JVM. But that's for the future.






How often do you have meetings and how many people typically attend these Paris JUG meetings ?
We have a monthly meeting. So one evening a month we have two talks. I'm proud to say that we now have to limit the number of people, we have to control the access to 180 people every month because of the size of our room for security reasons. But we could easily be 200 or 220. 

That's quite a lot on a very regular basis. So in a year you multiply those 200 people by 12, that's a pretty good conference. And there's actually more than the Paris JUG, there are a lot of JUGs that were created in France, you inspired quite a few people so it's not those 200 a month, there's more every month meeting in the rest of the country.
That was quite amazing because when the Paris JUG was created in February 2008, a few months after there was another JUG in the center of France. The Paris JUG was created 18 months ago, and now there are 15 JUGs around France. So in 18 months we went from zero to 15, which is more or less one JUG a month. It's quite impressive.

So back to the Paris JUG, other than your outstanding presentation on Java EE 6, which you gave a few month back, what were the highlights for you on this past year and a half ?
Well, there was your talk about GlassFish v3 of course. We were lucky to have some international speakers. We had Kirk Pepperdine who was the first, talking about performance, we had James Ward on Flex, Eric Evans on DDD, Simon Ritter about JavaFX. But also we had some local heroes such as Guillaume Laforge on Groovy, Didier Girard on GWT, Sacha Laborey on JBoss,  well, he's not local but he speaks French. And of course plenty of local French people coming. The Paris JUG is mostly about local speakers but we are glad to have some international speakers too. 

I have to say that I attended a few of those and what I think is really nice about those is the people that come, both the quantity and the quality, there are some really good and hard questions sometimes. I'm sure you know who I'm talking about. Someone who asks really hard questions. And there's this other guy who actually writes blogs about everything that was said and shown during the conference, so it feels like a lively participating group. It hink you did a great job putting everything together. I don't know why I have this question on my list, I got lost here, but let me ask it anyway. Do you have an opinion on OSGi? That obviously has to do with GlassFish using OSGi. The all modular approach of both app server and now JVMs. Do you have an opinion ?
Well, like many people I have the same opinion. I think OSGi is great, I'm just happy not to use it on my day to day work. It really looks quite complex. I wouldn't like to package my application using OSGi and META-INF files. I remember going to a Java Module talk, 3 or 4 years ago, and I thought that was great, the all Java Modules (JSR 277). And I thought Java Module would rule the world and OSGi would die in the hashes. But history changes. Java Modules is dead, there's the JSR 294 now, there's also all the Jigsaw stuff, but OSGi is still here. Maybe one day OSGi will become much easier to use for an end user like me. I can understand the value for an app server like GlassFish, but at the moment, for me to use it, on my projects, it's just too complex.

That was an opinion, good. Actually I'm interviewing a podcaster, I've heard this thing called Les Cast Codeurs (http://lescastcodeurs.com/), can you tell me what that is ?
Frustration again I think. There's not many thing happening in France, you know. Thank god, things are changing. When I said we created the first JUG in Paris one and a half year ago, it's true you know. The first JUG in the planet was created in 1997, that's 12 years ago. It took us 12 years to create a JUG. We all spent hours listening to the Java Posse, laughing and at the same time, getting some valuable information. And one day, Emmanuel Bernard (from Hibernate/JBoss/RedHat) decided to do the same thing. So he sent and email to me, to Guillaume Laforge and Vincent Massol. And we thought the idea was great. So we do a French podcast, a Java Posse like. We're just starting, we are on episode number 7, and the idea is the same : talking about the news around Java, in a happy and fun way.

Anyone interested in learning French. Maybe to close up this discussion, you have a day job beyond everything we've covered, so you are consultant. What kind of customers do you work for and what do you do ?
I work mostly for french companies, and mostly banks, insurance, telecommunications and so on. These big corporations. Again, in France, there are not many startups companies, there's not a big R&D development. So when you do EE stuff, you tend to work for big companies. So that's my day to day job. I do expertise on EE, consulting, I help development teams, and I also do a bit of training. Unfortunately I do less and less coding. My customers don't like to employ experienced people to do code. In France people think code is bad and should only be done by young guys getting out from school. So I do less and less code on my day to day work. I tend to do that on my spare evening and week-ends.

Thanks Antonio for that. I used to ask people where they've spent their best vacation but more generally speaking, what do you do when you're not doing java and all these things? Do you have a twin brother doing things for you ? What do you do when you are not working ?
I like your first question. My best holidays ever...Don't tell me JavaOne... yes JavaOne, at the Moscone Center. No, my best holidays ever was when I finished working for BEA. I worked for BEA for 2 years. That was a long time ago when stock options were still worth something. So I sold all my stock options, I took the money, a back pack and spent 8 month traveling around South America on my own. 8 months of holidays is something you do only once in your life, or never. So that's definitely my best holidays ever. Other than that, and except doing Java, and it's true that I do Java a lot, I play music. I play with a jazz quartet and I play Jazz guitar. Music is a passion. Playing and listening to music. I'm really passionate about music as much as I am passionate about Java. And of course I have my little daughter whom spend a lot of time with, play with, and that's a lot of fun.

Well Antonio, thank you so much.
Thanks Alexis, thanks for the podcast.