Monday Sep 16, 2013

JavaOne 2013: Java EE 7, GlassFish Community Event, Book Signing, Geek Bike Ride, Hallway Track, ...


18th JavaOne is almost here .... literally a few days away now!


5 days
8 tracks
500+ sessions
490+ speakers
70+ exhibitors
Lots of late night parties
All in the beautiful city of San Francisco

Now that is what makes a conference lot of fun and bound to give you a nerdgasm!

If you are still not convinced, here are 25 reasons to attend JavaOne.

There is tons of coverage on the recently released Java EE 7 and GlassFish 4. The FocusOn document provide a comprehensive set of sessions, BoFs, hands-on labs, panels, etc related to Java EE Platform from Oracle, RedHat, IBM, and many others.

This is going to be my 15th JavaOne and this blog has been serving reports/pictures from the conference for past 6 years (2007, 2008, 2009, 2010, 2011, 2012).

Here is my schedule so far and I would love to meet you before/after my speaking engagements:

Saturday, 9/21
11am
Geek Bike Ride
7:30pm
NetBeans Party

Sunday, 9/22
8am
JUG Leaders and Java Champions Brunch
9:15am
GlassFish Community Event
12pm
Strategy and Technical Keynote
8pm
GlassFish Party

Monday, 9/23
12:30pm
OTN Lounge Expert Drop-in
3pm
CON4456: Coding Java EE 7: Making Easy Even Easier (co-speaking with Lincoln Baxter III)
4:15pm
Java EE 7 Essentials Book Signing at JavaOne Book Store
6pm
JCP Party (including book signing)
8pm JUG Leaders and Java Champions Social Event
Tuesday, 9/24
12:15pm Publishers Seminar
2pm
Java EE 7 Essentials Book Signing at O'Reilly Booth
3pm
CON4510: Fifty Features of Java EE 7 in 50 Minutes (co-speaking with Antonio Goncalves)
4:30pm BOF 8012: Teaching Java with Minecraft, Greenfoot, and Scratch (co-speaking with Daniel Green)
7:30pm HOL 2147: Java EE 7 Hands-on Lab (co-speaking with Antonio Goncalves, David Delabassee, and Marian Muller)
Wednesday, 9/25
10am CON3431: Introduce Java Programming to Kids (co-speaking with James Weaver)
1pm CON3496: Come and Play! with Java EE 7 (co-speaking with Antonio Goncalves)
2:30pm Java EE 8 Discussions
Thursday, 9/26
3:30pm
CON2406: Java EE 8 and Beyond (mostly observer)

And of course, there is always the hallway track!

Where will I see you ?

Tuesday Sep 03, 2013

Java EE 7 Launch Celebrations in Africa Trip Report


Morocco, Senegal, South Africa, and Uganda were the African four countries on my Make the Future Java EE 7 Global Celebrations tour. The event was organized by JUG AFRICA and Max Bonbhel covered a few other countries as part of this tour.



I was welcomed with a very warm African hospitality in each country. The JUG leaders took extreme care of me through out the stay, starting right from the airport pick up, organizing the events, working on logistics, and a multitude of other things. Remember, the JUG leader is a volunteer role but its the passion for technology and sharing with the community that drives them. And that was truly evident in each of them!

A big shout out to Badr Elhouari (Morocco), Mamadou Ngor Diouf (Senegal), Mark Clark and Richard Kolb (South Africa), and Nsubuga Hassan (Uganda) for being the wonderful hosts!

I had lots of opportunities to engage with African developers from all around the continent. Yes, Africa is a continent with 54 different countries! Typically, locals talk about North, East, West, and South Africa regions. I was fortunate to share some of my Java EE 7 knowledge in all four regions, and in return learned a lot more from them.

The format at each event was mostly similar - provide a code-driven introduction to Java EE 7 and keep it completely interactive. I truly believe that the code should be written such that it speaks for itself. The developer productivity enhancements made in the Java EE platform over the years have certainly made it very much a reality. A typical flow covered the following samples, in a completely interactive manner:
There was barely noticeable to no language barrier in all the countries that I visited. This truly allowed a frank and direct conversation with the developers, as opposed to using a translator.


The trip started with the first event in Casablanca, Morocco (North Africa). Badr took time out of his family vacation to receive me at the airport and ensuring a smooth operation of the event. There were about 50 developers during a week day evening and otherwise a general holiday season.

The interactive session had several existing Java EE developers. Riding a train from Rabat to Casablanca with a few of the JUG members gave a good 1-1 time to interact with them. One of the developers showed me a sample application he has built to prepare for Java certification. One of the common feelings in Morocco at least is that their sub-Saharan bretherens are preferred for any Africa-wide events. However I started my trip with North Africa, so no complaints there ;-)

Something to learn about Morocco ...
  • Sahara Desert is about 900 km from Rabat/Casablanca. Plan for a few days if you are interested in a desert safari
  • Cars are used to travel from/to airport, not camels ;-)
  • Don't miss out on visiting one of the Kasbah, they are very unique and colorful structures
Here are some pictures from that event:



JMaghreb is the biggest Java developer conference in North Africa. I attended their inaugural conference last year and had a really good time giving a Java EE 6 hands-on lab to a packed room. The conference is focused towards a "pragmatic developer", not necessarily using all the bleeding-edge technologies. Badr has already started planning for JMaghreb 2.0 (Nov 7 and 8) and planning to expand the outreach to Southern Europe and other neighborhood countries. Reach out to him if you are interested in speaking at that event, and of course register for this free conference.



The next stop of the trip was at Dakar, Senegal. There were about 30 developers for the Saturday morning event. On the request of JUG leader, I started the event with a slide deck providing a complete overview of the platform. And then showed a bunch of samples afterwards. The Java EE 7 Technical Kit provides a slide deck (with speaker notes) that you can use to talk about Java EE 7 at your local JUG. The attendees were not shy in asking questions and the session continued with code-driven talk afterwards.

 I was fortunate to bump into couple of passionate GlassFish developers who are using it for a local telecom company. Hear all about their passion around Java EE 6, GlassFish, and NetBeans:



Here are some pictures from that event:






Some things to learn about Senegal ...
  • Senegal visa can be obtained at the airport, but be prepared to "grease" the machinery
  • Arrange a pick up at the airport otherwise you'll be overwhelmed with the cabbies
  • Visit Rebirth of Africa monument in Dakar, it is very very inspiring


The next stop of the trip was at Johannesburg, South Africa. Nobody amongst ~100 developers wanted to see any slides and so we jumped straight into the code. I showed lots of code and had lots of interaction.

I also had the opportunity to visit The Wanderers, a cricket stadium known for the second highest one day total of 438 by South Africa. I spent significant part of my day at the office and that's where the event was hosted in the evening as well.

Some things to learn about South Africa ...
  • Johannesburg, with about 4.4 million population, is definitely a premier technology hub in all of Africa
  • Being far South, they sort of feel in a silo and not completely connected from rest of the world. This is in spite of the fact that there is decent Internet connectivity.
  • Startup culture is definitely prominent here - products are serving local needs because of infrastructure costs, otherwise services-based
Here are some pictures from that event:








The last stop of the trip was at Kampala, Uganda. Nsubuga Hassan picked me from the Entebbe airport and we shared a 1.5 hrs taxi ride to the hotel in Kampala. The number of women participants truly surpassed the number of men at the event, and this was truly impressive. Its probably the most number of women I've ever seen at a JUG meetup.

There was even a discussion around starting a new Kampala JUG, so that is definitely promising.

The event was hosted by Hivecolab which provides community-owned work environment for young tech entrepreneurs in Kampala. Had a good chat with program director Barbara who is also also leading Women in Technology Uganda. Listen to an interesting conversation with Barbara on promoting technology amongst women in Uganda.

Some things to learn about Uganda ...
  • English is the official language of the country, and has about 40+ other local dialects
  • People are extremely soft-spoken and very welcoming every where
  • Lot of tech innovation happening in Uganda - Mobile Monday Kampala, @The Hub, Fin Africa, and others
  • Local government encourages women to study at the university

I enjoyed riding the different local means of transport - boda boda and the van. The visit to the local arts and craft market in any part of world not only promotes local artisans but also gives you the opportunity to buy authentic goods.

Here are some pictures from that event:







All the Java EE 7 samples are available at github.com/arun-gupta/javaee7-samples. Feel free to clone the repository or send a pull request if you want to contribute new Java EE 7 samples. A recording of some of the samples can be seen in the videos recorded at an earlier conference:





Even though the local JUG leaders were my hosts in each country but the real force behind all of this was Lamine Ba and Max Bonbhel. I had numerous emails exchanges on dates, cities, hotels, and everything else and they were all dealt very promptly and in a professional manner. Max and Lamine - you are the agents of change in Africa and are truly helping African developers be visible at the global front, thanks for your efforts!

I truly enjoyed my short stay in different countries and would love to come back again!

Here is the complete album from the trip:



If you want to learn more about African developers, or contribute then there is an excellent panel "BOF3469: Java Trends in Africa" at JavaOne San Francisco (Sep 22-26).

Register and see ya there!

Wednesday Aug 28, 2013

Java EE 7 Essentials from O'Reilly: Now Available in Paperback and Ebook


Hot off the press ...

Announcing the availability of my new book Java EE 7 Essentials.

Release Date: TBD, 2013
Language: English
Pages: 362
Print ISBN: 978-1-4493-7017-6 | ISBN 10:1-4493-7017-9
Ebook ISBN: 978-1-4493-7016-9 | ISBN 10:1-4493-7016-0


Chapter 1: Java Platform, Enterprise Edition
Chapter 2: Servlets
Chapter 3: JavaServer Faces
Chapter 4: RESTful Web Services
Chapter 5: SOAP-based Web Services
Chapter 6: JSON Processing
Chapter 7: WebSocket
Chapter 8: Enterprise JavaBeans
Chapter 9: Contexts and Dependency Injection
Chapter 10: Concurrency Utilities
Chapter 11: Bean Validation
Chapter 12: Java Transaction
Chapter 13: Java Persistence
Chapter 14: Java Message Service
Chapter 15: Batch Processing
Chapter 16: Build an End-to-End Application

This book is available from the following websites:

And other usual places.

Learn more about the book from Java Spotlight podcast #143.

This book provides a code-intensive overview of the key specifications in the Java EE 7 platform (one specification per chapter). The main concepts from the different specifications are explained using simple code samples. All the associated code is available on github.

A significant part of this book is derived from my Java EE 6 Pocket Guide. New chapters have been added to cover all the new technologies in the platform - WebSocket 1.0, Batch 1.0, JSON-P 1.0, and Concurrency 1.0. New sections have been added or existing sections updated to reflect the changes in the platform. If you have read the Java EE 6 Pocket Guide, then you can read this book at a much faster pace; otherwise, you can read this book from beginning to end. Alternatively, you can read specific chapters based upon your interest.

The book also contains self-paced instructions on how to build an end-to-end Java EE application using NetBeans IDE.
Here is how I can use your help ...

  • Help spread the word about the book
  • If you have bought a paperback or kindle edition, post your review here
  • If you have not purchased the book so far, then you can buy it using any of the usual locations

O'Reilly has arranged a book signing at their booth on Tuesday, Sep 24, 2pm. Other book signing opportunities are also being worked upon and I'll update once they are confirmed. And the book will also be available at JavaOne book store.

I hope you enjoy reading the book and learn a few new things from it. Your feedback in any form is always appreciated!

Thursday Jul 18, 2013

Java EE 7 Samples Galore


The Java EE 7 SDK provides a comprehensive set of samples for different technologies - both new and updated. They are very nicely documented, runs using Maven + using Cargo, and demonstrate a good usage of the different APIs.

The question I get typically asked is "how do you learn all these APIs and technologies ?".

The SDK samples, reading specifications, and whitboarding with specification leads is indeed a big source of my learning. But I need to write my own code, simple "hello world" style samples that demonstrates point usage of different APIs. I truly believe in "let the code talk" and have given several slide-free code-driven session on Java EE 7 around the world. The source for these talks is about 100+ samples I've written over the past few months.

All of these samples are now available at: github.com/arun-gupta/javaee7-samples

They are all Maven-based projects and have no documentation at all. However they are logically arranged by technologies and I've tried to give intuitive names to the directories. I don't intend to write any documentation so please don't ask for it ;-) But at least now you've access to all the samples.

Here is the complete list of samples at this time:

javaee7-samples
  + batch-samples
    + batchlet-simple
    + chunk-checkpoint
    + chunk-exception
    + chunk-mapper
    + chunk-optional-processor
    + chunk-partition
    + chunk-simple
    + decision
    + flow
    + batch-listeners
    + multiple-steps
    + split
    + chunk-simple-nobeans
  + concurrency-samples
    + dynamicproxy
    + executor
    + schedule
    + threads
  + ejb-samples
    + embeddable
    + timer
    + lifecycle
    + el-samples
    + standalone
  + javamail-samples
    + definition
  + jaxrs-samples
    + async-client
    + async-server
    + beanvalidation
    + jaxrs-client
    + dynamicfilter
    + endpoint
    + filter
    + filter-interceptor
    + interceptor
    + invocation
    + invocation-async
    + link
    + readerwriter
    + readerwriter-json
    + server-sent-event
    + jsonp
    + moxy
  + jms-samples
    + send-receive-simple
    + send-receive
    + temp-destination
    + jmscontext-cdi
  + jpa-samples
    + criteria
    + entitygraph
    + jpa-listeners
    + multiple-pu
    + schema-gen
    + storedprocedure
    + jndi-context
    + locking-optimistic
    + schema-gen-scripts
  + jta-samples
    + transactional
    + transaction-scope
    + user-transaction
    + tx-exception
  + jsf-samples
    + contracts
    + contracts-library
    + flows-simple
    + flows-mixed
    + flows-programmatic
    + flows-declarative
    + passthrough
    + radio-buttons
    + viewscoped
    + file-upload
    + components
    + bean-validation
  + json-samples
    + object-builder
    + object-reader
    + streaming-generate
    + streaming-parser
  + servlet-samples
    + nonblocking
    + protocol-handler
    + servlet-security
    + metadata-complete
    + validation
    + methods
  + websocket-samples
    + binary
    + chat
    + encoder
    + encoder-client
    + encoder-programmatic
    + endpoint
    + endpoint-async
    + endpoint-javatypes
    + endpoint-programmatic
    + endpoint-programmatic-async
    + endpoint-programmatic-injection
    + endpoint-security
    + httpsession
    + injection
    + javase-client
    + messagesize
    + parameters
    + properties
    + websocket-vs-rest
    + subprotocol
    + websocket-client
    + websocket-client-config
    + websocket-client-programmatic
    + websocket-client-programmatic-config
    + websocket-client-programmatic-encoders
    + whiteboard


Will continue to add more as I dig into other pieces. I gave a 3-hour presentation explaining some of these samples at UberConf and captured the screen during the session. Those two-part videos are available.

The first part covers:
  • WebSocket 1.0
  • Batch 1.0
  • JSON Processing 1.0
  • Java Persistence API 2.1



The second part covers:
  • JavaServer Faces 2.2
  • Java API for RESTful Web Services 2.0
  • Java Message Service 2.0
  • Java Transaction API 1.2
  • Bean Vaildation 1.1
  • Concurrency Utilities for Java EE 1.0



Enjoy!

Wednesday Jun 26, 2013

Java EE 7 support in NetBeans 7.3.1


NetBeans IDE provide tools, templates, and samples for building Java EE 7 applications. NetBeans 7.3.1 specifically added support for the features mentioned below:

  • Support for creating Java EE 7 projects using Maven and Ant
  • Develop, Deploy, and Debug using GlassFish 4
  • Bundled Java EE 7 javadocs
  • CDI is enabled by default for new Java EE 7 projects (CDI 1.1)
  • Create database scripts from Entity Classes (JPA 2.1)
  • Java Persistence Query Language (JPQL) testing tool (JPA 2.1)
  • RESTful Java client creation using JAX-RS 2.0 Client APIs (JAX-RS 2.0)
  • New templates for JAX-RS 2 Filter and Interceptor (JAX-RS 2.0)
  • New templates for WebSocket endpoints (WebSocket 1.0)
  • JMS messages are sent using JMS 2 simplified API (JMS 2.0)
  • Pass-through attributes are supported during Facelet page editing (JSF 2.2)
  • Resource Library Contracts(JSF 2.2)
  • @FlowScoped beans from editor and wizards (JSF 2.2)
  • Support for EL 3.0 syntax in editor (EL 3.0)
  • JSON APIs can be used with code completion (JSON 1.0)

A comprehensive list of features added in this release is available in NetBeans 7.3.1 New and Noteworthy.

Watch the screencast below to get a quick overview of the features and capabilities:



Download Netbeans 7.3.1 and start playing with Java EE 7!

Wednesday Jun 12, 2013

Java EE 7 SDK and GlassFish Server Open Source Edition 4.0 Now Available


Java EE 7 (JSR 342) is now final!

I've delivered numerous talks on Java EE 7 and related technologies all around the world for past several months. I'm loaded with excitement to share that the Java EE 7 platform specification and implementation is now in the records.

The platform has three major themes:



  • Deliver HTML5 Dynamic Scalable Applications
    • Reduce response time with low latency data exchange using WebSocket
    • Simplify data parsing for portable applications with standard JSON support
    • Deliver asynchronous, scalable, high performance RESTful Service
  • Increase Developer Productivity
    • Simplify application architecture with a cohesive integrated platform
    • Increase efficiency with reduced boiler-plate code and broader use of annotations
    • Enhance application portability with standard RESTful web service client support
  • Meet the most demanding enterprise requirements
    • Break down batch jobs into manageable chunks for uninterrupted OLTP performance
    • Easily define multithreaded concurrent tasks for improved scalability
    • Deliver transactional applications with choice and flexibility
This "pancake" diagram of the major components helps understand how the components work with each other to provide a complete, comprehensive, and integrated stack for building your enterprise and web applications. The newly added components are highlighted in the orange color:




In this highly transparent and participatory effort, there were 14 active JSRs:
  • 342: Java EE 7 Platform
  • 338: Java API for RESTful Web Services 2.0
  • 339: Java Persistence API 2.1
  • 340: Servlet 3.1
  • 341: Expression Language 3.0
  • 343: Java Message Service 2.0
  • 344: JavaServer Faces 2.2
  • 345: Enteprise JavaBeans 3.2
  • 346: Contexts and Dependency Injection 1.1
  • 349: Bean Validation 1.1
  • 352: Batch Applications for the Java Platform 1.0
  • 353: Java API for JSON Processing 1.0
  • 356: Java API for WebSocket 1.0
  • 236: Concurrency Utilities for Java EE 1.0

The newly added components are highlighted in bold.

And 9 Maintenance Release JSRs:

  • 250: Common Annotations 1.2
  • 322: Connector Architecture 1.7
  • 907: Java Transaction API 1.2
  • 196: Java Authentication Services for Provider Interface for Containers
  • 115: Java Authorization for Contract for Containers
  • 919: JavaMail 1.5
  • 318: Interceptors 1.2
  • 109: Web Services 1.4
  • 245: JavaServer Pages 2.3

Ready to get rolling ?

Binaries

Tools

Docs


A few articles have already been published on OTN:

And more are coming!

This blog has also published several TOTD on Java EE 7:


All the JSRs have been covered in the Java Spotlight podcast:

The latest issue of Java Magazine is also loaded with tons of Java EE 7 content:



Media coverage has started showing as well ...
And you can track lot more here.

You can hear the latest and greatest on Java EE 7 by watching replays from the launch webinar:



This webinar consists of:
  • Strategy Keynote
  • Technical Keynote
  • 16 Technical Breakouts with JSR Specification Leads
  • Customer, partner, and community testimonials
  • And much more
Do you feel enabled and empowered to start building Java EE 7 applications ?

Just download Java EE 7 SDK that contains GlassFish Server Open Source Edition 4.0, tutorial, samples, documentation and much more.

Enjoy!

Friday Mar 22, 2013

Introducing Kids to Java Programming Using Minecraft


Minecraft is a wildly popular game among elementary and middle schoolers. The game allows players to build constructions of textured cubes in a 3D world.

My son has been playing the game for about a year, lets say addicted to it. Last Fall he told me that the game is corrupted because the JAR file snapshot has messed up the configuration. And that right away rang a bell in me as a Java Evangelist at Oracle.

I learned from him that the game is written in Java, has a trial version that runs as an applet in the browser, and downloaded as a JAR file for desktop. The game is modular where the players travel through a world and chunks are loaded and unloaded to keep the memory footprint small. Something unique about the game is the ability to modify the game from what it was originally designed for. In Minecraft language, this is called as a "mod" - short for modifications. For example, a mod can add new characters to the game, change look-and-feel of the play field, or make it easy to build new structures.

The game has a server and a client component. This allows the game to be played in a single player mode where a player connects to a server using a client and plays the game. Alternatively multiple players, using different clients across platforms, can connect to a server and play with each other collaboratively. Its very common to have a server run with multiple mods. There are almost an infinite number of mods someone could do to make Minecraft a more amusing game to play. There is no official API to create these mods but there are several third-party vendors that provide that capability; Bukkit is one such API. The ability to write mods and alter the game play gives players more control over the game and gets them more excited.

My son expressed his desire to write a mod and so we started exploring further. Then onwards, he started teaching me Minecraft vocabulary and I taught him the Java programming concepts. Our discussions in the car, on the dinner table, during the breakfast preparation, and elsewhere changed to reflect that as well. He already played with Scratch and Greenfoot last Summer and that was extremely helpful during this learning curve. We set up a goal to build a mod during Christmas break. After understanding the basic concepts and building a few mods, we decided to share the knowledge with a broader set of Minecrafters. And that's where the concept of doing a Minecraft Workshop was born.

My son came up with a list of his minecraft buddies and we announced a date for the workshop. Everybody invited for the workshop confirmed their presence right away. I found out that both the invited kids and their parents were equally excited. One friend could not attend because of a prior commitment and was extremely disappointed. On the day of the workshop, some kids were eager to come even before the formal start of the workshop.

The workshop was attended by 10 kids with age ranging from 10-14 years. Most of the kids had no programming experience, let alone Java. However there was high Minecraft experience in the group with some kids playing for about 2 years and up to 2 hours every day. When given the topic of Minecraft, the small group would talk excitedly about different aspects of the game, constantly using hundreds of game-specific terms and phrases as if speaking a different language. My goal was to leverage their passion and introduce them to Java programming.


The challenge for me was to introduce programming to these kids using analogies from the daily life. Using a car, features, capabilities, types, and car dealers and correlating with class, properties, methods, instances, and packages seem to work. Fruits and different methods of peeling, eating, and planting was used to introduce the concept of Interface in Java. I asked, “What can you do with a watermelon?” the first answer was obvious, “you can eat it.” The second one was a little less so, “You can chuck in a trash can.” The response was greeted with scattered laughter. I used that to explain the concept of Exceptions in Java.

Short anecdotes and side-conversations kept the livelihood of the group going throughout the five hour programming session. There are almost an infinite number of mods someone could do to make Minecraft a more amusing game to play. But all these mods hold the same basic framework that we set up for any future work on making game-specific mods. By the end of the session, we had worked out an entire framework for making a mod. A Maven archetype to create a template Bukkit plugin allowed the attendees to avoid writing boilerplate code. A lower bar to get started and simplicity was the key for this audience. The mod built in the workshop added a new server-side command and printed a trivial message.

Although the goal of the workshop was to get an introduction on programming and make a Minecraft mod, I believe the attendees learned much more than that. I think the informal set up helped them discover that programming can be fun and useful to add to gaming experience. Programming is a vast field and we barely scratched the surface. But most importantly, the attendees had a good time and learned their first lesson of Java programming to start off an interest in it.


"Fun", "Easy", "Quick", "Awesome", "Short", and "Intuitive" described attendees' one word summary of building and running their first Hello World application using NetBeans.

All the instructions followed in the workshop, including a lot more pictures, are available at java4kids.java.net/minecraft-workshop.

For me, it was quite a humbling and learning experience. I've delivered multiple workshops all around the world but mostly to professional developers. I realized how the instructions need to be completely spelled out in order for the attendees of this age to make progress. Something as simple as "Hit Enter after entering the command", yes, that is required. Anyway I plan this to be the first of many more workshops aimed to introduce the world of Java programming to school students.

One of the lessons learned during the workshop was to simplify the installation experience. All the kids had JDK and NetBeans set up already, pretty straight forward. However I wonder why Maven insists on JAVA_HOME variable instead of figuring it out. I need to investigate how to seamlessly install JDK, NetBeans, and Maven in a platform independent way. This will allow to focus more on building the actual mod rather than the multi-step installations.



This workshop was not possible without mentoring support from Allen Dutra and other parents. A huge shout out to my family who helped validate and calibrate my strategy for the audience. My nephews feedback from the lab is incorporated into this blog. Thanks to Oracle for sponsoring the snacks!

Thank you @notch for using Java to build the game! You've provided a great platform for young kids to learn Java and truly enabled Make The Future Java ...

Thursday Feb 07, 2013

Jfokus 2013 Trip Report - A Magnificent Spectacle


This was my third consecutive year (2012, 2011) at Jfokus and the organizing committee, and Mattias Karlsson in particular, continue to amaze me every year! As one of my colleague mentioned, it truly has become a "magnificent spectacle".

With the conference sold out 2 weeks before the official start, 1550 attendees from 20+ countries were delighted by a barrage of international speakers. This was the biggest Jfokus ever and the bar has always gone higher from the previous years.

The conference kickstarted with a guided tour of Old Town Stockholm and was a good way to get familiar with history of the city.






The conference had hands-on lab on the first day and technical sessions, BoFs, HackerGarten, NightHacking, Swedish massage by Mejsla and other activities on day 2 and 3. Even though the conference had several tracks but the best track is always the "hallway track" which gives you the unique opportunity to engage with other attendees of the conference.

Markus and I delivered a lab on "Developing JAX-RS Web Applications Utilizing Server-sent Events and WebSockets". Geertjan also showed up at the lab and helped out with general NetBeans questions. The lab guide is available and the complete source code can be downloaded here. Note, the lab works on GlassFish 4.0 build 57 for now because of the pending bugs in SSE implementation in Jersey.

The last 45 minutes of the lab had a different section covering some other Java EE 7 technologies. The lab guide is available at bit.ly/javaee7-hol (PDF) and the starting code is available at bit.ly/javaee7-hol-code (ZIP). For now, this particular lab covers:

This lab is a work in progress and a more comprehensive feature set will be integrated and shared at future conferences (yes, several are already planned!). Let me know if you'll be interested in reviewing the contents and providing feedback.

Here are some pics from the lab session:






The conference also had its first #GeekRun. 7 of us ran in sub-zero temperature in the dark around the island and it was a great experience!



Here is the running route:



The evening concluded with an outstanding speakers' dinner at F12. The hospitality of the restaurant, warmth of the Jfokus events team, and company of some of the finest geeks in the world made the evening memorable. Some pics from the dinner ...






I delivered a session on The Java EE 7 Platform: Productivity++ and Embracing HTML5. There were about 100+ attendees for the 9am session. It gave a quick overview of the features coming in Java EE 7:
  • Java API for WebSocket
  • Java API for JSON Processing
  • Concurrency Utilities for Java EE
  • Batch Applications for Java Platform
  • JAX-RS 2.0
  • JMS 2

And several other technologies which are getting an update. The complete slides are available:

 

The session also showed a quick demo of the latest NetBeans build supporting Java EE 7.

In How to participate in the future of Java, I talkd about how several JUGs are contributing to Adopt-a-JSR efforts around Java EE 7. There are 19 JUGs from around the world that are participating in this effort. What is your JUG waiting for ? Join the momentum now!

Here are some more pictures from the conference:







The conference collected feedback for each talk using green, red, and yellow cards, a concept first found in Oredev. As explained in the opening keynote, the rule is getting green cards is good, yelllow card means so so and red card means the speaker is not coming back to the conference. Here are the cards that I received after my talk on Java EE 7:



I've heard the rumor that Nordic conferences don't like to repeat speakers for more than 2-3 years in a row. This was my third year but hey, the cards are all green. I'm keeping my fingers crossed for next year ;-)

Anyway, congratulations once again Mattias and team for a job very well done!

And the complete photo album:

Friday Feb 01, 2013

Java EE 7 Maven Archetype - Available in NetBeans (TOTD #201)


Want to create a Java EE 7 application using Maven ?

mvn -DarchetypeGroupId=org.codehaus.mojo.archetypes -DarchetypeArtifactId=webapp-javaee7 -DarchetypeVersion=0.1-SNAPSHOT -DarchetypeRepository=https://nexus.codehaus.org/content/repositories/snapshots/ -DgroupId=org.glassfish -DartifactId=javaee7-sample -Dversion=1.0-SNAPSHOT -Dpackage=org.glassfish.javaee7-sample -Darchetype.interactive=false --batch-mode --update-snapshots archetype:generate
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml (11 KB at 42.6 KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml (22 KB at 65.6 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/maven-metadata.xml
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/maven-metadata.xml (701 B at 4.3 KB/sec)
[INFO]                                                                        
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml (11 KB at 64.9 KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml (22 KB at 77.8 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/maven-metadata.xml
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/maven-metadata.xml (701 B at 3.1 KB/sec)
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Batch mode
[INFO] Archetype defined by properties
Downloading: https://nexus.codehaus.org/content/repositories/snapshots/org/codehaus/mojo/archetypes/webapp-javaee7/0.1-SNAPSHOT/maven-metadata.xml
Downloaded: https://nexus.codehaus.org/content/repositories/snapshots/org/codehaus/mojo/archetypes/webapp-javaee7/0.1-SNAPSHOT/maven-metadata.xml (786 B at 0.5 KB/sec)
Downloading: https://nexus.codehaus.org/content/repositories/snapshots/org/codehaus/mojo/archetypes/webapp-javaee7/0.1-SNAPSHOT/maven-metadata.xml
Downloaded: https://nexus.codehaus.org/content/repositories/snapshots/org/codehaus/mojo/archetypes/webapp-javaee7/0.1-SNAPSHOT/maven-metadata.xml (786 B at 2.0 KB/sec)
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: webapp-javaee7:0.1-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.glassfish
[INFO] Parameter: artifactId, Value: javaee7-sample
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: org.glassfish.javaee7-sample
[INFO] Parameter: packageInPathFormat, Value: org/glassfish/javaee7-sample
[INFO] Parameter: package, Value: org.glassfish.javaee7-sample
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: groupId, Value: org.glassfish
[INFO] Parameter: artifactId, Value: javaee7-sample
[INFO] project created from Archetype in dir: /Users/arungup/code/workspaces/tmp/javaee7-sample
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.703s
[INFO] Finished at: Sat Feb 02 07:31:54 EET 2013
[INFO] Final Memory: 11M/125M
[INFO] ------------------------------------------------------------------------

That's it!

NetBeans Development Builds allows to create a Maven-based Java EE 7 web application now. wiki.netbeans.org/JavaEE7 provide a complete list of planned features. TOTD #199 provide some more details on the features currently working. Of course, this application will get deployed to GlassFish 4.

Tuesday Jan 29, 2013

Java EE 7 and NetBeans IDE - Early Support Available (TOTD #199)


NetBeans IDE provides the best out-of-the-box experience for Java EE development, deployment, and debugging. Early builds of NetBeans have already started providing support for Java EE 7 features such as
  • Registering GlassFish 4
  • Creating Java EE 7 application
  • Wizard for JAX-RS 2 Filters/Interceptors
  • Initial support for Faces Flow
  • Loading templates from a resource library
  • Non-persistent EJB timers in Web profile
  • Wizard for WebSocket endpoints
wiki.netbeans.org/JavaEE7 provide a complete list of features slated for the release and the builds can be downloaded from bertram2.netbeans.org:8080/job/web-main-javaee7. Here are some snapshots of the work completed so far.

Creating a Java EE 7 Web application and using GlassFish 4 server


Creating a WebSocket endpoint



Wizard for creating WebSocket endpoint


The generated code looks like:

@WebSocketEndpoint("/endpoint")
public class NewWSEndpoint {

@WebSocketMessage
public String onMessage(String message) {
return null;
}

}

Creating a JAX-RS 2 Filter


Wizard for creating a JAX-RS 2 Filter


By default it is a server-side filter but can be made client-side filter too.

Wizard for creating a JAX-RS 2 Interceptor



Creating a RESTful Java Client using JAX-RS 2 Client APIs



Wizard for creating a JAX-RS 2 Client


This is a very early work-in-progress so any feedback is welcome.

Download GlassFish 4.0 promoted build, register it with NetBeans IDE and take it for a test drive!

About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today