Sunday Sep 04, 2011

JCertif 2011 - OSGi-enabled Java EE Apps in GlassFish and Closing!

Read trip reports from Day 1 and 2.

Even though the conference originally had OSGi-enabled Java EE hands-on lab planned but we decided to change that to a technical session instead because of the limited Internet connectivity and audience awareness of Java. Here are the slides presented:

If you are interested in the intended hands-on lab then look at screencast #38 (using Eclipse) or screencast #32 (using NetBeans) that provide complete detailed instructions on how to create OSGi-enabled Java EE Apps and deploy them in GlassFish.

Do you know that GlassFish 3.1.1 now offer commercial support for OSGi/Java EE applications ?

I also attended a great talk by Michael Heinrichs on the Java FX 2.0 features (the only other talk at the conference in English :). Read more about the JavaFX roadmap or get started with this beginner article.

The evening was mostly the closing note and give away of goodies which is always an exciting time.

Here are some pictures from the trip so far:

And finally the evolving album at:

Max tells me that there is a TV interview and some fun activity scheduled for tomorrow and then finally heading back home!

Wednesday Aug 17, 2011

Oracle at JCertif 2011

The continent of Africa has a special place in my heart primarily because of some of the excellent runners it has produced over the years. Living in the United States one can only aspire to be like them :-)

However I'm excited to share that I'll be making my first visit to this continent and speaking at JCertif 2011 - the biggest Java community event in Central Africa.

 


Here are the different speaking sessions:

Sep 2 Java EE 6 Hands-on Workshop
Sep 3, 10:30am The state of Java with Oracle (a year later)
Sep 3, 3:30pm Deploying your Java EE 6 Applications on GlassFish 3.1
Sep 4, 1:30pm OSGi/Java EE: Architecture and Programming
Sep 4, 3:30pm Java FX 2.0

Here are some more links:

And I'm definitely interested in running together so let me know if you would like to join :-)

I'll be there, will you ?

Sunday Jul 10, 2011

TDC 2011 Trip Report


Keep reading for the conclusive blog entry on my Brazil trip. After FISL12, Java Noroeste, Brasilia, and Goiania the trip concluded with The Developers Conference 2011 (TDC) in Sao Paulo.


The TDC, as the name says, is a developer conference organized by Global Code, Brazil's largest trainer of Java developers and several other IT courses. They offer courses in Core Java, Web, Design Patterns, Java EE 6, Robotics, and several other topics and have offices all around Brazil. There were about 2000+ attendees over 5 days and spread across multiple tracks covering Java, Java EE, Web, Python, PHP, .NET, Ruby, Cloud, and several other topics.

I gave two talks and a NetBeans-driven hackathon. The slides for the presos are available below:





The first talk had about 200 attendees and the second one had approx 80 attendees. And the NetBeans-driven Java EE 6/GlassFish hackathon code can be downloaded here.

Yara Senger (one of the main organizers of the conference) was telling me that several attendees gave her extremely positive feedback about my talks, this is always good to know. She also told me that attendees from other tracks left their session to attend these talks. Here are couple of feedbacks from twitterverse #tdc2011:

#TDC2011 Palestra do @arungupta muito bom

@esdrasbb Indiano da Oracle = @arungupta? O cara é bom! #GlassfishGuy

I'm certainly looking forward to participate in TDC at other locations/times.

Check out some pictures from the TDC 2011 ....








And, as always, the complete album:



I'm certainly glad to be back home after being on the road for 15 days but it was a very enjoyable and a valuable experience!

Wednesday Jun 08, 2011

OSGi Application Development using GlassFish Server - New Whitepaper

You've seen tons of material related to GlassFish + OSGi on this blog. Most of the material was originally published on Sahoo's blog. Now Sahoo has published a new white paper "OSGi Application Development using GlassFish Server" providing a single place the details about GlassFish and OSGi. Specifically it covers the following topics:

  • OSGi Applications running in GlassFish Server
  • Hybrid (Java EE-enabled OSGi ) application bundles
  • Modular web applications
  • Building enterprise quality OSGi service using EJB technology
  • Shared/Standalone Persistence Unit
  • Injection of OSGi Services in Java EE applications using CDI
  • Consuming Java EE Services from OSGi applications

Download the 29-pages long PDF whitepaper now!

And here are some relevant entries published on this blog:

  1. TOTD #160: OSGi bundles not auto-starting in GlassFish 3.1 ?
  2. Eclipse Con 2011 Hands-on Lab delivered: OSGi, JavaEE, GlassFish, Eclipse a powerful foursome
  3. Screencast #38: "Developing OSGi-enabled Java EE Applications using GlassFish" Tutorial at EclipseCon 2011
  4. TOTD #154: Dynamic OSGi services in GlassFish 3.1 - Using CDI and @OSGiService
  5. #131: Dynamic OSGi services in GlassFish - Using ServiceTracker
  6. #130: Invoking a OSGi service from a JAX-WS Endpoint - OSGi and Enterprise Java
  7. #127: Embedding GlassFish in an existing OSGi runtime - Eclipse Equinox
  8. #126: Creating an OSGi bundles using Eclipse and deploying in GlassFish
  9. #125: Creating an OSGi bundles using NetBeans and deploying in GlassFish
  10. #124: OSGi Declarative Services in GlassFish - Accessed from a Java EE client
  11. #118: Managing OSGi bundles in GlassFish v3 - asadmin, filesystem, telnet console, web browser, REST, osgish

Sunday Apr 17, 2011

TOTD #160: OSGi bundles not auto-starting in GlassFish 3.1 ?

You are copying OSGi bundles in the "domains/domain1/autodeploy/bundles" directory of GlassFish 3.1 and yet the OSGi bundles are not starting. This is because the "fileinstall" bundle which is responsible for autostarting bundles had to be disabled in the final build. This can be easily fixed by executing the following commands:

asadmin delete-jvm-options --target server-config \\
-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell, \\
org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell, \\
org.apache.felix.gogo.command

asadmin create-jvm-options --target server-config \\
-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell, \\
org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell, \\
org.apache.felix.gogo.command,org.apache.felix.shell.remote, \\
org.apache.felix.fileinstall

Note, these commands are whitespace sensitive so ensure the entire command is executed in one line. More details and other options are discussed at users@glassfish.

Learn more about building OSGi-enabled Java EE Applications using NetBeans (screencast #32) and Eclipse (screencast #38).

Technorati: totd osgi glassfish fileinstall

Wednesday Apr 13, 2011

JAX London Spring 2011 Trip Report

Sebastian Meyen, the chair of worldwide JAX Conference kick started JAX London 2011 with a very passionate opening session highlighting that JAX is all about Java, that they are comitted to Java, and not going to dilute the content. This is the 10th year of JAX conferences. Even though originally the word JAX was coined as an acronym for "Java Apache XML" indicating the open source nature and everything XML around Java but now its more popularly known as JAX.

The successful recipe for the JAX conference is "passion for the Java platform & ecosystem" and "a pramatic mix with development, architecture, agile, and other concepts around Java". In Sebastien's words "Java is a huge stake, heavily growing, innovating and worth focusing on it" and is a "rich environment for innovation". The JAX Innovation Awards giving $10,000 for the most innovative contributions to Java further proves their commitment to Java. Do you have the most innovative Java technology, most innovative Java company, and the top Java ambassador to recommend ? Submit now!

The first keynote of the day was by Dan North on the "Patterns of Effective Delivery". He highlighted several design patterns and the key ones were:

  • Spike and Stabilise - "Spike" is the non-TDD code written during the development cycle and then TDD applied to stabilise it for production.
  • Ginger Cake - About me legitimizing copy/paste, look for abstractions afterwards. Start WET and then DRY it.
  • Create Urgency - Create lots of instances where you are surprised, optimize for deliberate learning than for deliberate practice. Create an urgency for yourself for technologies that are genuinely useful. Difficult to change your thinking consciously, need a crisis.
  • Socratic Testing - Using the process of automated tests to draw out knowledge about the code.
  • Fits In My Head - Keeping the design small enough such that the entire design fits in your head, then you can reason the whole thing.

Being the chair of Java EE track, I spent most of my day attending the sessions there. The first session by Ales Justin explained how to run a Java EE application on Google App Engine. His slides are available below:

Ales explained his experience of building a sample application using JPA2, JSF2, Bean Validation, delpoing on GAE. The slides very well capture the restrictions of the platform and how he worked around them. The GAE API was even abstracted such that a pure Java EE application can be written and thus be portable across multiple application servers.

David Blevins's session on Fun with EJB 3.1 and Open EJB was indeed a lot of fun. He provided a good history of how the EJB and OpenEJB have evolved over years. There were lots of code samples highlighting the ease-of-use improvements done in EJB 3.1such as @Stateless, @Schedule, @Asynchronous, @Singleton, Embeddable EJB API and many others. I particularly loved his statement:

People who complain about EJB are stuck in 2005 and believe ignorance is my pride.  Its testable, light, and pretty great!

Seriously, if you complain about EJB being heavy, non-functional, incomplete, the following code fragment is all it takes to create an EJB:

@Stateless
public class MyEJB {
    public String myMethod(...) { }
}

and that too packaged in a WAR file, no deployment descriptors or any special packaging. Do you still think its heavy weight ? Think again!

David's slides are available below:

Doug Clarke talked about "Java Persistence API 2.0 with EclipseLink", Joseph Shum talked about "Integrating Enterprise Applications into Liferay Portal", and then Dan Allen talked about "Using CDI Extensions to make a better Java EE". Dan showed several examples of how CDI extensions can be authored easily to extend capabilites of the existing platform. Their slides will be available on jaxlondon.com.

And I also gave two presentations:

  • GlassFish 3.1 - Simplifying your Java EE 6 Development and Deployment
  • OSGi-enabled Java EE Applications using GlassFish (in the OSGi track)

The first talk explained how several features in GlassFish 3.1 such as:

  • Deploy-on-Save (in NetBeans and Eclipse)
  • Active Redeploy (preserve sessions across re-deploys at CLI or NetBeans and Eclipse)
  • 29% better startup/deploy/redeploy cycle
  • Application runner (java -jar glassfish.jar foo.war)
  • Maven integration (mvn gf:run, gf:start, gf:deploy, etc)
  • Embedded GlassFish

and many other features make GlassFish an extremely productive development environment for your Java EE 6 applications. And then features like:

  • High Availability, Clustering
  • Centralized Administration
  • Application-scoped Resources
  • Application Versioning
  • 33% better High Availability performance
  • Better scalability - upto 100 instances per domain
  • RESTful monitoring and management

make it an equally compelling deployment platform. The slides with all the details are available below:

Where are you deploying your Java EE 6 applications ?

The second talk explained the why/how of OSGi-enabled Java EE applicatins. The slides are available below:

The first few slides are OSGi introductory so jump ahead to slide #22 for all the interesting stuff. The screencast #38 showcase how to build an OSGi-enabled Java EE Applications using Eclipse and GlassFish and comes with the complete and detailed instructions. The screencast #32 shows the same using NetBeans.

The day ended with a 1.5 hrs interactive Java EE 6 hackathon and more details on that in a later blog.

Here are some pictures captured from the London visit:

And the complete album is available:

Technorati: conf jaxlondon javaee6 osgi glassfish cdi gae google ejb openejb liferay

Saturday Mar 26, 2011

Eclipse Con 2011 Hands-on Lab delivered: OSGi, JavaEE, GlassFish, Eclipse a powerful foursome

Sahoo and I delivered OSGi-enabled Java EE Applications using GlassFish and Eclipse Hands-on Lab at Eclipse Con 2011 earlier this week. The conference had an excellent line up of sessions, speakers, receptions and I wanted to engage but could attend only one day. The keynote on the third day titled "The Java Renaissance" was jointly delivered by Mark Reinhold, Chief Architect of the Java Platform group at Oracle and John Duimovich, Java CTO at IBM. Read more coverage of the keynote and Oracle's participation here.


The hands-on built a simple User Registration and Authorization application and showed different combinations of OSGi and Java EE development and deployment in GlassFish. The first step was to to deploy a simple OSGi service and client in GlassFish. Then the OSGi client was replaced by a Web Application Bundle (aka hybrid application) which used @OSGiService for dynamic discovery, bind, inject, and track the OSGi service (more details in TOTD #154). Then the service bundle was replaced by a JavaEE application using EJB and JPA. There were detailed instructions (PDF) to go through all the exercises. The screencast #38 (video) walks you through building the entire application, the video inlined here too:

About 35 attendees were able to make progress after the spotty Internet connection started working. The 5 USB sticks provided by Eclipse Con turned out pretty handy to pre-load all the software requisites. We shared a zip of our ".m2" directories and "m2eclipse-\*" plugins directory for the folks with no Internet. The high point for me was when one of the attendees finished the entire lab in a little over an hour and left. That also helped us assess the quality of document which we tried to make pretty self explanatory. We found one missing instruction from the document and have already fixed it. Overall, about 60% of the attendees completed the lab and rest of them left with partial setup and instructions. Let us know if you attended the lab and found it useful.

Many thanks to Doug and Ankush, the Student Assistants assigned by EclipseCon for our labs, to help attendees keep chugging along!

I was also "lucky" to win a BlackBerry 9670 smartphone + remote stereo bluetooth gateway + international charger + headset. The RIM folks told me that this worth $700 but Amzon sells the raw phone for $19.99. The total cost comes out way under $100 even after including all the accessories. Anyway this device runs only on Sprint so of no use to me. Are you interested in purchasing ? :-)

The reception in the evening (typically the best part) was great and gave me a chance to socialize with several folks. Here are some pictures captured from the event:

Technorati: conf eclipsecon osgi javaee glassfish eclipse

Wednesday Mar 23, 2011

Screencast #38: "Developing OSGi-enabled Java EE Applications using GlassFish" Tutorial at EclipseCon 2011

This screencast provide detailed instructions on how to develop OSGi-enabled Java EE Applications using GlassFish and Eclipse which will be delivered as a 2-hrs tutorial at the EclipseCon 2011.

You can download the required software and follow the detailed instructions (PDF) along with this screencast. Enjoy the screencast in HD in the full-screen mode:

Here are some time lines in case you want to move around in the screencast:

Introduction & Software Installation 0:00
Exercise 1 (Simple OSGi Service and Client) 2:42
Exercise 2 (Web Application Bundle) 11:57
Exercise 3 (EJB OSGi Service) 27:28
References 40:10


Many thanks to Doug & Ankush for an extensive review of the instructions!

Let us know your feedback by posting a question to the GlassFish Forum.

Technorati: conf eclipsecon osgi javaee glassfish eclipse screencast

Sunday Mar 06, 2011

Oracle at Eclipse Con 2011: OSGi-enabled Java EE Applications using GlassFish Tutorial and Other Sessions

Oracle is a gold sponsor at Eclipse Con 2011.

Sahoo and I will give a 2-hours tutorial on Developing OSGi-enabled Java EE Applications using GlassFish (session #1987). We'll walk you through building OSGi bundles and show how they can leverage benefits of Java EE programming model using Eclipse and GlassFish.

Date ? : Mar 23, Wednesday
Time ? : 2 hours starting at 3:50 pm
Where ? : Stevens Creek

Please download the following software in order to maximize your participation in the tutorial:

  • JDK 1.6 U20+
  • Eclipse Helios for Java EE Bundle
  • Install “m2eclipse” plugin and “m2eclipse extension” plugins from “http://m2eclipse.codehaus.org”. Complete installation instructions are available here.
  • Download GlassFish 3.1 Open Source Edition, unzip the bundle, include “glassfish3/bin” in the PATH.
  • Download Maven 2.2.1 and unzip. Configure Maven 2.2.1 in Eclipse - In “Eclipse”, “Preferences...” menu, search for
    “maven”, select “Installations”, click on “Add...”, and select the location of unzipped Maven 2.2.1 directory.

Here are some other pointers for the over all conference ...

There is also an Android/iPhone app for Eclipse Con and a plenty of receptions to attend :-)

See the complete list of sessions, panels, and tutorials from Oracle here.

Technorati: conf eclipsecon oracle osgi javaee glassfish

Monday Feb 14, 2011

JFokus 2011 Day 1 + Vaadin Meetup 2011 Trip Report

JFokus 2011 kick started yesterday with 400 attendees braving -20oC (coldest place I've ever been to) at Stockholm Waterfront Congress. The mantra of this fifth annual conference this year is Information, Innovation, Inspiration. I have my own interpretation of this manta but will talk to the JFokus team tomorrow and post the intended meaning instead.

The tutorial day covered Seam3, Git, Phonegap, Java EE 6, and others that truly fit the mantra. I gave a tutorial on "Understanding Nuts & Bolts of Java EE 6" explaining the key benefits of Java EE 6: light-weight, extensibility, and ease-of-use. It covered the key technologies of Java EE 6 such as CDI, JSF2, Servlets, EJB 3.1, and Bean Validation and showed several demos using NetBeans and GlassFish. There were about 100+ attendees in the room and seems like everybody came after the talk, so that was a good sign. The slides (127 slides + 10 demos) are now available:

Several slides have a URL at the bottom which provide a much more detailed explanation of the feature, feel free to scroll through the slides and check out some of the URLs.  The screencast #36 explains Java EE 6/Eclipse tooling and screencast #37 explains the same tooling using NetBeans. The code built during the tutorial can be downloaded here.

It was heartening to know that attendees "liked the mix of slides + demos" and the "perfect pace". Here is some other feedback:

@sjonsson: Attended a good session on Java EE 6 by @arungupta at #jfokus. Key benefits of JEE6 APIs covered, plus decent amount of plugging @glassfish
@reginatb38: Listening to Arun Gupta #JFokus great talk about #jee6. Thanks for mentioning #jduchess
@tommysdk: #jfokus I really like the ability to completely replace web.xml with annotations when working with Servlets 3.0 in Java EE 6
@reynirhubner: @arungupta gave a great lecture today on j2ee6 - wish I had #glassfish installed right now so I could try out the things I've learned today
@tommysdk: Cool to see CDI as part of #JavaEE6, recognized concepts from Seam. Great presentation by @arungupta today @ #Jfokus. And thx 4 the t-shirt!

I particularly liked one of the comments from the audience (paraphrasing) "With all these innovations in Java EE 6, Spring is really unncessary now" ... indeed so! One of the tweet captured that sentiment pretty well:

And this is the constant feedback that I'm seeing every where Java EE 6 is presented. What do you think ? :-)

Here are some pictures from the JFokus Day 1 morning:

After the tutorial, it was a quick 45-mins flight to Turku (in Finland) to participate in Vaadin Developer Meetup on a cruise line. I talked about the benefits of building an "OSGi-enabled Java EE applications on GlassFish" and the slides are available now:

Several GlassFish + OSGi demos are available at osgi+totd and otherwise GlassFish OSGi Dashboard provides the latest status.

Also had one of the most exotic early dinners at an excellent Viking-style restaurant, Harald, and the meal had reindeer (not Rudolph!), red deer, and other stuff served in a hand-made Viking sword. Definitely one of the most exotic meals I've had in the recent past ;-) Another interesting aspect of this visit is that the outside temperature was -4F or -20C and even the locals were feeling cold.

In the meetup, Joonas talked about how a 200k LoC for a healthcare project maintenance nightmare served as the inspiration for starting Vaadin. The original name was "User Interface Automata", then changed to "IT Mill Toolkit" and finally took the name "Vaadin" in 2009. The first commit to IT Mill Toolkit was made on Feb 13, 2001 and so the meetup also celebrated 10 y, 1d, 12h anniversary. And we even had cake and sparkling wine to celebrate!

Joonas also announced the new Vaadin Pro Account which consists of three components:

  • Bunch of add-ons (TestBench, JPAContainer, TouchKit, Calendar, Timeline)
  • Control (remote control to the Vaadin team by raising the priority of a bug-fix, feature voting, custom builds, security alerts)
  • Support (hotline to Vaadin team + knowledge base)


Their goal going forward is "faster, easier, cheaper"!

The word "vaadin" is the Finnish word for female reindeer.  And the logo is interesting: "}" is an indication of Java curly braces, ">" indicates HTML pointy tags, and if you turn it clockwise then its the head of reindeer. I really like their fancy logo and have not played with the framework yet but generally heard good comments.

The tagline for Vaadin, "thinking of U and I", is all the more meaningful on this Valentine Day, especially away from family :(

Finally, get a feel for what it means to be cruising in the middle of snowy Baltic:

Check out some pictures from the meetup ...

On the fun side, some interesting facts reported about Stockholm by a local TV channel in the hotel (onStockholm):

  1. Average household size in Sweden is 2.1, average house hold size in Sweden is the smallest.
  2. Sweden has the highest rate of female college graduates in the world.
  3. Sweden has the highest literacy rate in the world.
  4. Gastronomy is a national passtime, 300 foodbooks published annually, cookbooks per capita is the most in the world.
  5. According to a reasearch, 63% of Swedes are likely to buy a cookbook.
  6. Longest underground art exhibition, over 100km.
  7. Highest rate of female parlimentarians in the world (43%), most politically equal democracy in the world.
  8. Has most multinational companies than any other country in the world.
  9. Swedes are the most unmarried people in the world.

And here is the evolving photo album:

Overall, Day 1 of JFokus was exciting with exotic meal, freaking cold weather, traveling on a train/airplane/cruise ship in the same day, and giving two talks :-)

On to Day 2 ...

Technorati: conf jfokus javaee6 glassfish netbeans tutorial vaadin osgi

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