Thursday Aug 04, 2011

TOTD #167: Automatic Resource Management or try-with-resources - Using Java 7 in Java EE 6/GlassFish


Java 7 is now available, NetBeans 7.0.1 provide complete tooling around it, and GlassFish 3.1.1 allow you to leverage JDK7 features in your Java EE 6 applications. This Tip Of The Day (TOTD) will explain a new feature introduced in JDK7 and how it can be used to simplify your Java EE 6 application code.

Automatic Resource Management (ARM) or try-with-resources is one of the functionality coming from Project Coin as part of Java 7. It simplifies working with external resources such as JDBC connection/statement and xxxInput/OutputStream which need to be explicitly closed in case of an error or successful completion of a code block.

The code originally published in TOTD #164 is given below:

@javax.annotation.PostConstruct
void startup() {
   Connection c = null;
   Statement s = null;
   try {
     InitialContext ctx = new InitialContext();
     DataSource ds = (DataSource)ctx.lookup("jdbc/__default");
     c = ds.getConnection();
     s = c.createStatement();

// invoke SQL here

   } catch (SQLException ex) {
     System.err.println("ouch!");
   } catch (NamingException ex) {
     System.err.println("ouch!");
   } finally {
     try {
       if (s != null)
         s.close();
       if (c != null)
         c.close();
     } catch (SQLException ex) {
       System.err.println("ouch!");;
     }
   }
}
This is a lot of boilerplate code, couple of specific points to note here:
  • Because Connection and Statement need to be closed in "finally" block, they need to be declared outside of the "try" block.
  • "s.close()" and "c.close()" can further throw an SQLException and so there is a nested exception in the "finally" block.
 This code can also be rewritten as:
@Resource(name="jdbc/sample")
DataSource ds;

@javax.annotation.PostConstruct
void startup() {
   Connection c = null;
   Statement s = null;
   try {
     c = ds.getConnection();
     s = c.createStatement();

     // invoke SQL here

   } catch (SQLException ex) {
     System.err.println("ouch!");
   } finally {
     try {
       if (s != null)
         s.close();
       if (c != null)
         c.close();
     } catch (SQLException ex) {
       System.err.println("ouch!");;
     }
   }
}
It still has tons of boilerplate code. This can be easily simplified using JDK 7 Automatic Resource Management by changing the code to:

@Resource(name="jdbc/sample")
DataSource ds;

@javax.annotation.PostConstruct
void startup() {
try (Connection c = ds.getConnection();
     Statement s = c.createStatement())

       // invoke SQL here
     } catch (SQLException ex) {
       System.err.println("ouch!");;
     }
   }
}

The resources defined in the "try" block are automatically closed as they get out of scope and there is no boilerplate code here. The code is much more semantically readable and contains 285 characters instead of 629 in the first version.

NOTE: The code fragments in this blog are updated because throwing a checked exception from a @PostConstruct method is not permitted by the Managed Beans specification. See the comments below for more detailed discussion.

How does this all work under the hood ?

A new java.lang.Autocloseable API has been added to the platform which has a single "close()" method that automatically closes the resource. The java.io.Closeable extends this new API ensuring that xxxInputStream and xxxOutputStream are candidates for ARM. Any resource implementing this interface can be used for ARM so if there are any custom resources in your project then they can leverage this functionality as well.

NetBeans 7.0.1 provide hints to take advantage of JDK7 features. Have you downloaded it yet ? Check out screencast #35 highlighting Project Coin features in NetBeans.

How are you using JDK7 features in your Java EE 6 applications ?

Friday Jul 29, 2011

OSCONJ 2011 Trip Report



Rockstar speakers, solid content, spacious venue, several opportunities for networking, great wifi, a fancy bag for attendees, good food, warm breakfast for speakers, and several other items together is how I'd remember the inaugural OSCONJ. Its never easy to launch a new conference and be this successful. Yes, there were some gotchas (nothing major) but I'm totally impressed with how O'Reilly's multi-year experience showed up inaugurating this yet another Java conference.

OSCON which started as a Perl conference in 1997 has expanded its scope to include all open-source technologies in the early years and now talk about anything and pretty much everything open source. Perl,  Python, PHP, Java, MySQL, JavaScript, NoSQL, HTML5, Community Management, Open Data/Hardware, and polyglot JVM is a slight taste of the topics presented this time. About 3500 attendees were present for the main and sub-conferences, biggest so far.

OSCONJ was organized as a sub-conference of OSCON in its 13th running year. In 2005, the conference had a separate Ruby track where DHH talked about Extracting Rails from Basecamp and then RailsConf was promoted to be a full conference next year. Lets see how the OSCONJ shapes up in the years to come. I don't know the formal registration/attendee numbers for OSCONJ but personal observation through the keynote attendance and attendees in different Java tracks at different times suggests about 150-200.

I presented a session on "GlassFish Server 3.1: Deploying your Java EE 6 Applications" and the slides are available:

I also delivered a hands-on lab building a complete end-to-end Java EE 6 application using GlassFish and NetBeans. The instructions for the lab are also available at bit.ly/javaee6-oscon11. There were about 40 participants in the lab and most of them were actively engaged and could complete the lab successfully.

Watch some of the Oracle sessions in the following playlist:


I'll keep updating the playlist as more session recordings are made available.

Some other recordings worth watching are Java: The Good, Bad, and Ugly Parts by Joshua Bloch, Twitter: From Ruby on Rails to the JVM by Raffi Krikorian, Working Hard to Keep it Simple by Martin Odersky, The Future of Community by Jono Bacon, and several more at OSCON 2011 @ youtube.

Some of the highlights from "Twitter: From Ruby on Rails to the JVM" are:
  • Huge number of oncurrent connections: 200k/seconds
  • Lots of IO, Very few persistent objects
  • Patched Ruby, build a whole new Ruby GC, but looking for opportunities to join a bigger developer community and go in the direction where world is going on.
  • Biggest reason to move to Java is because of "real concurrency model".
  • Ops team give no grief because eventually we give them a JAR file, similar way to GC, monitor, analyse etc.
  • JVM gives something that Ruby does not: scatter-gather algorithm
  • Big part of the app is still in Ruby and working on migrating that to Java.
  • Will add lot more instrumentation in OpenJDK GC
  • Storage/Retrieval is all Java.
The London Java Community leaders also hosted a panel on "The Java Standards Annoyances". Patrick Curran, Jeff Genender, Dan Allen, David Blevins, Bruno Souza, Bob Lee and others participated in a healthy discussion. The key recommendations from the panel were:
  • Participate in JSR 348
  • For the EG leads, make your pages easy to use, issue tracker, downloads etc
  • Make a lot of noise, speak up and don't be afraid. Explain your usecase.

Here are some pictures from the event:









And the complete album:


Unfortunately, my camera's battery exhausted in on the third day so I could not take more pictures. But I can see myself going to this conference again next year, provided they accept my papers, because of the great efforts and meticulous details by Stephen Chin, Laurel Ruma, and O'Reilly :-)

Monday Jul 18, 2011

Oracle at OSCON Java 2011




Oracle is a gold sponsor of OSCON Java, the new kid on the conference block. A fertile ecosystem, polyglot programming, and a key language as part of the open source movement are some of the reasons quoted in Why OSCON Java ?. I'm personally waiting to attend a Java conference in Antartica :-)

Anyway, here is the list of sessions that will be presented by the Oracle speakers:

Monday, 7/25 9:10am Keynote by Steve Harris
Monday, 7/25
10:00am
JDK7 in a Nutshell by Joe Darcy
Monday, 7/25
10:40am
GlassFish 3.1: Deploying your Java EE 6 Applications by Arun Gupta
Monday, 7/25
11:30am
The State of JDK and OpenJDK by Joe Darcy
Tuesday, 7/26
9:10am
Keynote by Patrick Curran
Tuesday, 7/26
1:30pm
Coin in Action: Using New Java SE 7 Language Features in Code by Stuart Marks
Tuesday, 7/26
2:20pm
The JCP and the Future of Java by Patrick Curran and Bruno Souza
Tuesday, 7/26
3:30pm
OpenJDK - When and How To Contribute To the Java SE Reference Implementation by Dalibor Topic
Wednesday, 7/27
4:10pm
Learning Nuts & Bolts of Java EE 6 in a Code Intensive Tutorial by Arun Gupta

And there are several other sessions that I'd like to attend.

Check out:
Of course, you can catch any of us in the hallway, booths, parties, exhibitor hall or any where else.

Anybody interested in running together ? Any suggestions for good running trails in the neighborhood ?


Monday Jul 04, 2011

JDK 7 and Java EE 6/GlassFish at Java Noroeste




Simon Ritter and I presented on JDK 7/8/9 and Java EE 6/7 at Java Noroeste, the Java User Group in Sao Jose do Rio Preto, Brazil.

As characteristic of Brazilian hospitality, we were given a very warm welcome at the airport by about 8 JUG members. About 60+ attendees missed a local soccer (or football as called in Brazil) game on a Sunday evening which was very humbling. Some of the attendees even traveled over 100km to attend the talk. This absolute craze for Java can only happen in Brazil :-)

Simon talked about how Oracle is committed to make Java successful for everybody, the new features coming in JDK 7 and plans for JDK 8 and 9. I talked about Java EE 6 and GlassFish and showed how a web application can be easily created using NetBeans. The usual "kilobyte and miliseconds" deployment of Java EE 6 applications on GlassFish was very well appreciated by the Spring users who have to wait a LONG time for deployment of three-digit MB WARs.

Thiago Gonzaga, an ex-Sun Campus Ambassador, did an excellent job translating from English -> Portuguese for both of us. He is also arranging a Java Day for the local community so talk to him or post a message on their page if you'd like to participate or sponsor.

After the event concluded about 9:30, we had dinner at a local restaurant which was very relaxing.

Some pictures from the event ...





And the evolving album ...


Next stop Brasilia ...

And one of the most amazing thing is that a local Java developer, Paulo Jeronimo, has organized a community run at 6:30am tomorrow morning. He even planned the entire course starting at Golden Tulip Hotel:



So I think its going to be a good start of the day. And for all the runners (hopefully), I got Odwalla bars ... so be sure to be there and run together :-)

Saturday Jul 02, 2011

FISL12 Trip Report - Special Appearance by "Javali" and "Code Monkey"


FISL is the biggest open source conference in Latin America and had about 7000 participants in the FISL 12 that concluded earlier this week. This was my third consecutive year (2010 and 2009) and as every year the conference was packed with lectures, workshops, demonstrations, booths, presentations, and lot more.

Anil Gaur, VP of Java EE Platform and GlassFish, gave a presentation on "Oracle GlassFish Server: A flexibly, light-weight, and production-ready Java EE 6". There were about 100 attendees in the theatre-style seating. The talk gave a great overview of the explosive growth happening in the GlassFish community on all fronts. It also gave an overview of how GlassFish is the first platform to provide clustering and high-availability for Java EE 6 applications with full commercial support from Oracle. The 2-instance session failover demo that I started to show in the talk did not work completely and my digging is still going on but here is a basic analysis so far.
  • The GlassFish High Availability depends on GMS which further relies on UDP Multicast (more details here). I've shown this demo on my previous machine (a Macbook) multiple times and in different configurations of with or without an IP address. But multicast is enabled by default on Macs. However Natty Narwhal does not seem to be configured that way, at least by default. And so even though I could create a cluster, the application with HA enabled could not be deployed. 
  • The GlassFish 3.1 Certification Matrix provides a complete list of supported platform and Ubutnu 10.10, not 11.04 (demo machine), is listed as a supported developer platform. There might be bugs in this newest release of Ubuntu or how Grizzly picks a network interface for binding when there is no bind interface address setup and the default interface (eth0) is not connected.
More details on how this will eventually get fixed in a later blog.

Other than that I gave two presentations on "The Java EE 7 Platform: Developing for the Cloud" and "Running your Java EE 6 Applications in the Cloud: and the slides are now available:


There were about 60+ attendees for the 9am talk on Java EE 7. Check out more details about the evolution of Java EE 7 at javaee-spec.java.net. All the component JSRs have their independent pages as well with the format: <component>-spec.java.net where <component> is "jpa", "ejb", "servlet" and "jsf".


The second preso turned out a lot more fun than originally planned with the two surprise co-speakers - "Javali" and "Code Monkey". The audience seem to enjoy the interesting conversation as part of the talk, pictures below. There is usual engaging with the community, talking to folks at the booth, explaining Oracle's open source strategy, and customer visits.

Also, check out Java Spotlight podcast #36 where Anil Gaur talks about GlassFish 3.1.

There were several other talks given by Oracle employees covering JDK 7, NetBeans, OpenJDK, MySQL and other open source offerings.

Check out some pictures from the event:

















And, as always, the evolving album:


See you next year!

Now on to Sao Jose do Rio Preto ...

Sunday Jun 26, 2011

TOTD #166: Using NoSQL database in your Java EE 6 Applications on GlassFish - MongoDB for now!

The Java EE 6 platform includes Java Persistence API to work with RDBMS. The JPA specification defines a comprehensive API that includes, but not restricted to, how a database table can be mapped to a POJO and vice versa, provides mechanisms how a PersistenceContext can be injected in a @Stateless bean and then be used for performing different operations on the database table and write typesafe queries.

There are several well known advantages of RDBMS but the NoSQL movement has gained traction over past couple of years. The NoSQL databases are not intended to be a replacement for the mainstream RDBMS. As Philosophy of NoSQL explains, NoSQL database was designed for casual use where all the features typically provided by an RDBMS are not required. The name "NoSQL" is more of a category of databases that is more known for what it is not rather than what it is.

The basic principles of NoSQL database are:

  1. No need to have a pre-defined schema and that makes them a schema-less database. Addition of new properties to existing objects is easy and does not require ALTER TABLE. The unstructured data gives flexibility to change the format of data any time without downtime or reduced service levels. Also there are no joins happening on the server because there is no structure and thus no relation between them.
  2. Scalability and performance is more important than the entire set of functionality typically provided by an RDBMS. This set of databases provide eventual consistency and/or transactions restricted to single items but more focus on CRUD.
  3. Not be restricted to SQL to access the information stored in the backing database.
  4. Designed to scale-out (horizontal) instead of scale-up (vertical). This is important knowing that databases, and everything else as well, is moving into the cloud. RBDMS can scale-out using sharding but requires complex management and not for the faint of heart.
  5. Unlike RBDMS which require a separate caching tier, most of the NoSQL databases comes with integrated caching.
  6. Designed for less management and simpler data models lead to lower administration as well.
There are primarily three types of NoSQL databases:
  1. Key-Value stores (e.g. Cassandra and Riak)
  2. Document databases (MongoDB or CouchDB)
  3. Graph databases (Neo4J)
You may think NoSQL is panacea but as I mentioned above they are not meant to replace the mainstream databases and here is why:
  • RDBMS have been around for many years, very stable, and functionally rich. This is something CIOs and CTOs can bet their money on without much worry. There is a reason 98% of Fortune 100 companies run Oracle :-) NoSQL is cutting edge, brings excitement to developers, but enterprises are cautious about them.
  • Commercial databases like Oracle are well supported by the backing enterprises in terms of providing support resources on a global scale. There is a full ecosystem built around these commercial databases providing training, performance tuning, architecture guidance, and everything else. NoSQL is fairly new and typically backed by a single company not able to meet the scale of these big enterprises.
  • NoSQL databases are good for CRUDing operations but business intelligence is extremely important for enterprises to stay competitive. RDBMS provide extensive tooling to generate this data but that was not the original intention of NoSQL databases and is lacking in that area. Generating any meaningful information other than CRUDing require extensive programming.
  • Not suited for complex transactions such as banking systems or other highly transactional applications requiring 2-phase commit.
  • SQL cannot be used with NoSQL databases and writing simple queries can be involving.
Enough talking, lets take a look at some code.
This blog has published multiple blogs on how to access a RDBMS using JPA in a Java EE 6 application. This Tip Of The Day (TOTD) will show you can use MongoDB (a document-oriented database) with a typical 3-tier Java EE 6 application.
Lets get started! The complete source code of this project can be downloaded here.
  1. Download MongoDB for your platform from here (1.8.2 as of this writing) and start the server as:

    arun@ArunUbuntu:~/tools/mongodb-linux-x86_64-1.8.2/bin$./mongod
    ./mongod --help for help and startup options
    Sun Jun 26 20:41:11 [initandlisten] MongoDB starting : pid=11210
    port=27017 dbpath=/data/db/ 64-bit
    Sun Jun 26 20:41:11 [initandlisten] db version v1.8.2, pdfile version
    4.5
    Sun Jun 26 20:41:11 [initandlisten] git version:
    433bbaa14aaba6860da15bd4de8edf600f56501b
    Sun Jun 26 20:41:11 [initandlisten] build sys info: Linux
    bs-linux64.10gen.cc 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20
    17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41
    Sun Jun 26 20:41:11 [initandlisten] waiting for connections on port 27017
    Sun Jun 26 20:41:11 [websvr] web admin interface listening on port 28017

    The default directory for the database is /data/db and needs to be created as:

    sudo mkdir -p /data/db/
    sudo chown `id -u` /data/db

    You can specify a different directory using "--dbpath" option. Refer to Quickstart for your specific platform.
  2. Using NetBeans, create a Java EE 6 project and make sure to enable CDI and add JavaServer Faces framework.
  3. Download MongoDB Java Driver (2.6.3 of this writing) and add it to the project library by selecting "Properties", "LIbraries", "Add Library...", creating a new library by specifying the location of the JAR file, and adding the library to the created project.
  4. Edit the generated "index.xhtml" such that it looks like:

    <h1>Add a new movie</h1>
    <h:form>
    Name: <h:inputText value="#{movie.name}" size="20"/><br/>
    Year: <h:inputText value="#{movie.year}" size="6"/><br/>
    Language: <h:inputText value="#{movie.language}" size="20"/><br/>
    <h:commandButton actionListener="#{movieSessionBean.createMovie}"
    action="show"
    title="Add"
    value="submit"/>
    </h:form>
    This page has a simple HTML form with three text boxes and a submit button. The text boxes take name, year, and language of a movie and the submit button invokes the "createMovie" method of "movieSessionBean" and then render "show.xhtml".
  5. Create "show.xhtml" ("New" -> "Other..." -> "Other" -> "XHTML File") such that it looks like:
     <head>
    <title><h1>List of movies</h1></title>
    </head>
    <body>
    <h:form>
    <h:dataTable value="#{movieSessionBean.movies}" var="m" >
    <h:column><f:facet name="header">Name</f:facet>#{m.name}</h:column>
    <h:column><f:facet name="header">Year</f:facet>#{m.year}</h:column>
    <h:column><f:facet name="header">Language</f:facet>#{m.language}</h:column>
    </h:dataTable>
    </h:form>

    This page shows the name, year, and language of all movies stored in the database so far. The list of movies is returned by "movieSessionBean.movies" property.
  6. Now create the "Movie" class such that it looks like:

    import com.mongodb.BasicDBObject;
    import com.mongodb.BasicDBObject;
    import com.mongodb.DBObject;
    import javax.enterprise.inject.Model;
    import javax.validation.constraints.Size;

    /**
    * @author arun
    */
    @Model
    public class Movie {
    @Size(min=1, max=20)
    private String name;

    @Size(min=1, max=20)
    private String language;

    private int year;

    // getters and setters for "name", "year", "language"

    public BasicDBObject toDBObject() {
    BasicDBObject doc = new BasicDBObject();

    doc.put("name", name);
    doc.put("year", year);
    doc.put("language", language);

    return doc;
    }

    public static Movie fromDBObject(DBObject doc) {
    Movie m = new Movie();

    m.name = (String)doc.get("name");
    m.year = (int)doc.get("year");
    m.language = (String)doc.get("language");

    return m;
    }

    @Override
    public String toString() {
    return name + ", " + year + ", " + language;
    }
    }

    Other than the usual boilerplate code, the key methods here are "toDBObject" and "fromDBObject". These methods provide a conversion from "Movie" -> "DBObject" and vice versa. The "DBObject" is a MongoDB class that comes as part of the mongo-2.6.3.jar file and which we added to our project earlier.  The complete javadoc for 2.6.3 can be seen here. Notice, this class also uses Bean Validation constraints and will be honored by the JSF layer.
  7. Finally, create "MovieSessionBean" stateless EJB with all the business logic such that it looks like:
    package org.glassfish.samples;

    import com.mongodb.BasicDBObject;
    import com.mongodb.DB;
    import com.mongodb.DBCollection;
    import com.mongodb.DBCursor;
    import com.mongodb.DBObject;
    import com.mongodb.Mongo;
    import java.net.UnknownHostException;
    import java.util.ArrayList;
    import java.util.List;
    import javax.annotation.PostConstruct;
    import javax.ejb.Stateless;
    import javax.inject.Inject;
    import javax.inject.Named;

    /**
    * @author arun
    */
    @Stateless
    @Named
    public class MovieSessionBean {

    @Inject Movie movie;

    DBCollection movieColl;

    @PostConstruct
    private void initDB() throws UnknownHostException {
    Mongo m = new Mongo();
    DB db = m.getDB("movieDB");
    movieColl = db.getCollection("movies");
    if (movieColl == null) {
    movieColl = db.createCollection("movies", null);
    }
    }

    public void createMovie() {
    BasicDBObject doc = movie.toDBObject();
    movieColl.insert(doc);
    }

    public List<Movie> getMovies() {
    List<Movie> movies = new ArrayList();
    DBCursor cur = movieColl.find();
    System.out.println("getMovies: Found " + cur.size() + " movie(s)");
    for (DBObject dbo : cur.toArray()) {
    movies.add(Movie.fromDBObject(dbo));
    }

    return movies;
    }
    }

    The database is initialized in @PostConstruct. Instead of a working with a database table, NoSQL databases work with a schema-less document. The "Movie" class is the document in our case and stored in the collection "movies". The collection allows us to perform query functions on all movies. The "getMovies" method invokes "find" method on the collection which is equivalent to the SQL query "select * from movies" and then returns a List<Movie>.

    Also notice that there is no "persistence.xml" in the project.
  8. Right-click and run the project to see the output as:



    Enter some values in the text box and click on enter to see the result as:



    If you reached here then you've successfully used MongoDB in your Java EE 6 application, congratulations!
Some food for thought and further play ...
In terms of this project, here are some tasks that can be tried:
  1. Encapsulate database management in a JPA persistence provider. Is it even worth it because the capabilities are going to be very different ?
  2. MongoDB uses "BSonObject" class for JSON representation, add @XmlRootElement on a POJO and how a compatible JSON representation can be generated. This will make the fromXXX and toXXX methods redundant.

Thursday Jun 23, 2011

FISL 12, Sao Jose Do Rio Preto, Brasilia, DFJUG, Goiania, and The Developers Conference, São Paulo

Java EE 6/7 and GlassFish are visiting multiple cities in Brazil:

Jun 26 - Jul 2
FISL 12, Porto Alegre
Jul 3
Sao Jose Do Rio Preto JUG
Jul 4 - 5
DFJUG Taguatinga, Brasilia and other venues
Jul 6 - 7
Goiania JUG and other venues
Jul 8 - 9
The Developers Conference, São Paulo

  • Even though my main focus will be Java EE 6/7 and GlassFish but feel free to ask any question.
  • There are several speakers from Oracle at FISL so stop by at the booth and talk to us.
  • @paulojeronimo, with the help of the local community, organized a 10k run on the morning of Jul 5th. So please feel free to run along, should be fun.
  • @raphaeladrien mentioned about some nice parks near my hotel in Goiania so you'll find me running there as well.
  • There will be interesting discussions around different Web frameworks in Goiania.
  • And then there are always 4 things to not miss in Brazil - Churrascaria, Guarana, Coffee, Caipirinha.
Where will I see you ?

Wednesday Jun 22, 2011

TOTD #165: Eclipse Indigo, Java EE 6 and GlassFish

Eclipse Indigo Logo
46 millions lines of code committed by 408 developers from 49 organizations is the recipe for Indigo, the sixth release as part of the Eclipse annual release train. The key features of this release are:
  • EGit 1.0 enabling Git support
  • WindowBuilder, a GUI Builder
  • Jubula for automated functional testing for Java and HTML
  • EclipseLink 2.3 with support for multi-tenant JPA entities
  • Equinox 3.7 with OSGi 4.3 specs

Read the complete list of improvements here and download now!

An updated version of the GlassFish plugin is also pushed to the update center and can be downloaded by clicking on "Additional Server Adapters" and selecting GlassFish as shown below:



Couple of much needed improvements in the plugin are:
  1. Configurable "Preserve Sessions across Re-deploys" by double-clicking on the server properties:



    This property could only be configured during server registeration in earlier versions.

  2. Richer management of GlassFish from within the IDE such as viewing all the resources (JDBC, Connectors, and JavaMail) as shown below:



The screencast #36 shows complete Java EE 6 development using GlassFish and the video is  embedded here for convenience:



This blog has published multiple entries on Eclipse and here are some of them:

Sunday Jun 12, 2011

Greenville JUG and SELF 2011 Trip Report

South Carolina, aka The Palmetto State, was one of the original 13 colonies that formed the basis of the United States of America. I had the opportunity to present at one of their JUGs and a local Linux conference.

Greenville JUG started in 2002 and has about 120 members. Even though the audience is small but the passion, interactivity, and maturity of audience was immense. The JUG offer free Java certification training bootcamp on a regular basis. So you get trained for free and pay only for the certification. The JUG is always looking for speakers and sponsors. So if you are in neighborhood and would like to talk then send an email to John Yeary - the fearless JUG leader.

At the JUG meeting, I gave a 3 hour session explaining the key benefits of Java EE 6 using NetBeans and GlassFish. The talk started with explaining the key themes of Java E 6: light-weight, ease-of-use, and extensibility. And then rest of the talk was NetBeans-driven showing Servlets 3.0, JPA 2.0, EJB 3.1, JSF 2.0, CDI 1.0, JAX-RS 1.1, and other Java EE 6 technologies. The code built during the meeting can be downloaded here.

Here are some pictures from the meetup:

Several folks stopped by after the JUG meeting saying that they enjoyed the content. I met some folks from the JUG meetup at the conference next day and we talked about only some pieces of Java EE 6 (such as JPA or JSF) can be used and then slowly migrate to the over all stack as well.

South East Linux Fest (SELF) is an annual community event focused on Linux and Open Source Software. SELF 2011 was the third such event and there were several sessions on Ubuntu, Drupal, Puppet, Open source cloud, Contribution to OSS, Fossilizing your code, and other similar topics.

Oracle was a gold sponsor this year and I gave a talk on "Java EE 6 Hackathon using NetBeans and GlassFish". The code built during the preso can be downloaded here. Unlike the JUG, I also gave an introduction to Oracle's several open source efforts including but not restricting to OpenJDK, NetBeans, GlassFish, MySQL, and VirtualBox.

The exact attendance figures for the conference are not known yet but about 1000 attendees registered. Check out some pictures from the event:


Thank you John Yeary - a man with multiple talents and a local champion in the community. He invited me to the JUG and SELF and coordinated my visit. I found it interesting that his kitty is named "Java" and its the coffee, not the platform :-) In all our driving around together (in the lightning and downpour typical in this area) I heard some interesting stories from his ex-Navy and merchant marine background on how once he lied down on an explosive to save the life of others. John also happen to have a license to operate an unlimited horsepower machinery, power plant, and even a nuclear power plant. What a nice gentleman and a great host ... thank you John!

On a personal front, I managed to sneak a couple of runs at the Palmetto Trail. And I totally enjoyed the southern accent and hospitality :-)

And as always, the complete album ...

I'm a United 1K with this trip and the next stop is Brazeeeel!

Friday Jun 10, 2011

Cloud Expo East and New York City Java Meetup Trip Report

7000+ delegates and 200+ sponsors/exhibitors made the Cloud Expo 2011, New York City yet another successful conference by SYS-CON. I gave a talk on "Running your Java EE applications in the Cloud" and highlighted:

  • How Java EE 6 light-weight nature is ideal for cloud development/deployment
  • Show how to deploy a typical 3-tier Java EE application in Amazon, Rightscale, Joyent, and Azure
  • Why Weblogic is ideally suited for enterprises for cloud deployments
  • How Java EE 7 is evolving to provide a standards-based PaaS deployment platform

The slides are available below:

There were about 30+ attendees in the talk and some of them were GlassFish customers and several Weblogic customers. So they both, and others, found out how the two application servers from Oracle are relevant for the cloud deployment.

Check out some pictures from the expo and around the city:


It was good to catch up with Jeff and Justin and enjoy couple of evenings together!

The next day I presented at New York City Java Meetup and explained the key features of Java EE 6 and GlassFish using live coding sessions with NetBeans. There were about 50+ attendees (in and out) at the highly interactive session.

Here is some feedback captured after the event:

Arun gave a great presentation on the virtues of JEE6 and NetBeans as well what is to come in future Java releases.

This was a good meet up. Very informative and useful information. The location is excellent.


And some more ...

Excellent presentation.

Pretty good meetup! very informative as alot of the areas that he covered are relevant and "hot" today. I recruit for Java Developers and these days I am routinely asking about experience with IOC/ CDI, Dependency Injection and restless web services. So I walked away feeling that Oracle was working the same market.

Interesting topic well presented.



Another good data point is that the average rating seems to be 4.5 (out of 5) after 14 attendees have rated it. Any feedback on how I can close the gap between 4.5 and 5 would be helpful :-)

The code built during the meetup can be downloaded here.

Here is a photograph from the meetup page:

And a few more that I took:


The venue for the meetup was Barnes & Noble store in the uptown and they did an excellent job of hosting the event. There was ample sugar and drinks for everybody (as you can see in the pictures) and each attendee even got a $15 gift card. The company is is making major investments in their eCommerce platform and digital products (i.e. Nook, Cloud Computing, Mobile apps). Java/J2EE is being used heavily throughout their environment. Opportunities exist for Engineers, Architects and Team Leads in their NYC and Palo Alto offices. If you are interested an informational conversation about technical careers and what's going on at BN.com, contact Jason Greenhouse @ jgreenhouse@book.com. I chatted with their CTO and VP of Engineering and hopefully will have some followup meetings to coach them more about the benefits of Java EE 6 :-)

Thank you Dario for providing me with an opportunity to talk about the "ultimate threesome" (Java EE 6 + GlassFish + NetBeans) to your meetup community!

On a personal front, I just could not miss the opportunity to grab couple of shorts runs in the Central Park:

There is no dearth of motivation there, tons of runners and in both directions. It was quite an enjoyable experience and matches well with the sedentary nature of my job ;-) If you are in the New York City during spring/summer time, make sure to plan an early morning run through Central Park and you will not regret it!

And as always, check out the complete photo album at:

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
« May 2015
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
31
      
Today