Eclipse Con 2011 Tutorial #1987 Software Prereqs: Developing OSGi-enabled Java EE Applications using GlassFish

Sahoo and I are delivering a tutorial on Developing OSGi-enabled Java EE Applications using GlassFish at EclipseCon 2011 tomorrow.

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

This blog provides a complete list of software that needs to be downloaded and pre-installed in order to actually spend time on building the application during the lab.

Please install the software following the instructions below. The complete tutorial + a screencast showing all the instructions to build the application will be shared on this blog tomorrow.

  1. Download and extract the source bundle for the tutorial from http://blogs.sun.com/arungupta/resource/osgi-gf-econ-2011.zip. Expanding the folder creates a directory “osgi-gf-econ-2011” with the following structure:
    bin/
    common/
    parent-pom/
    pom.xml
    simple_client/
    simple_service/
    

    The directory structure is explained later in the tutorial.
  2. Download Java EE 6 Web Profile SDK Update 2 and Install
    1. If you have JDK 1.6.0 pre-installed on your machine then download the bundle “without JDK”.
    2. If not, then download the “with JDK” bundle.

      Make sure GlassFish is installed in a directory with no white spaces in the directory name. Otherwise the web-based Admin Console may not function properly.

      For convenience, make sure to include “glassfish3/bin” in the system PATH. This can be done using Control Panel in Windows and in a shell in Unix-flavored machines. Note, make sure that GlassFish is installed in a directory with no white spaces in the directory name.

      Also set the environment variable JAVA_HOME to point to the location of the JDK installation and include $JAVA_HOME/bin in the system PATH. Note, this will be %JAVA_HOME%\\bin on Windows-based machines.
  3. Typically Java EE SDK installation starts the GlassFish server for you. However if it has not started then it can be started explicitly by giving the command

    “asadmin start-domain”.

    The “--verbose” switch may be specified on the command line to view the log output in the console otherwise the logs can be seen in the “glassfish3/glassfish/domains/domain1/logs/server.log” file. Visit “http://localhost:8080” to ensure that the server is up and running.
  4. Enable OSGi features in GlassFish by executing “config-gf-osgi.[bat|sh]” script in the “bin” directory of the source bundle extracted above.
  5. Start the database as “asadmin start-database” in a separate window.
  6. Download Eclipse Helios for Java EE Bundle and install.
  7. Install the m2eclipse "core" plug-in from http://m2eclipse.sonatype.org/sites/m2e, and only 3 of the m2eclipse "extras" from http://m2eclipse.sonatype.org/sites/m2e-extras including Maven Integration for Eclipse Extras, Maven Integration for Eclipse WTP, and Maven OSGi development (not Maven Integration for Subclipse). Complete installation instructions are available at http://m2eclipse.sonatype.org/installing-m2eclipse.html. Restart Eclipse after the install is completed.
  8. Maven 2.2.1 – can be downloaded from http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-2.2.1-bin.zip.
  9. Make sure to set the environment variable MAVEN_HOME to point to the location of the Maven 2.2.1 installation. This will allow you to use the Maven commands from the CLI.
  10. Configure Maven 2.2.1 in Eclipse - In “Eclipse”, “Preferences...” menu, search for the “maven”, select “Installations”, click on “Add...”, and select the location of unzipped Maven 2.2.1 directory.

See ya tomorrow!

Technorati: conf eclipsecon osgi javaee glassfish eclipse tutorial

Comments:

The bundle URL would now be:

https://blogs.oracle.com/arungupta/resource/osgi-gf-econ-2011.zip

(i.e. The link is broken, but it's relative to the blog, so just use the new domain). ;)

Posted by guest on June 07, 2012 at 04:08 PM PDT #

"http://wiki.eclipse.org/Tycho/Reference_Card#Enabling_tycho"
Initially the parent pom does not include any reference to this.

Posted by guest on June 06, 2013 at 11:26 AM PDT #

Post a Comment:
Comments are closed for this entry.
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 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
  
       
Today