Java EE 6 Sample Application on WebLogic 12c: Conference Planner (TOTD #176)

Guest Author

WebLogic 12c provide a Java EE 6 Full Platform compliant
application server. During the href="https://event.on24.com/eventRegistration/EventLobbyServlet?target=registration.jsp&eventid=375727&sessionid=1&key=108E7A597FD93F05D40355E5A6A5F60C&partnerref=WLS12c_Launch_OTN&sourcepage=register">launch
event last year, a Java EE 6 application was shown that
demonstrated all the features of Java EE 6. This application allows
conference organizers to publish details about their conference such
as tracks, sessions, and speakers. It also allows attendees to
register for the conference and prepare their schedule. The
application is built as a typical 3-tier Java EE 6 application using
JavaServer Faces (with PrimeFaces widgets) for the front-end,
Enterprise JavaBeans for the middle tier business logic, and Java
Persistence API for connectivity with the database.

This Tip style="font-weight: bold;">Of The Day
(TOTD) shows how to deploy the application on WebLogic 12c.

  1. Check out the application from href="https://svn.java.net/svn/glassfish%7Esvn/branches/arun/ConferencePlanner/trunk/">svn.java.net/svn/glassfish~svn/branches/arun/ConferencePlanner/trunk/
    or download the href="http://glassfish.java.net/javaone2011/ConferencePlanner-devoxx-2011.zip">source
  2. Download and install href="http://db.apache.org/derby/releases/release-">Apache
    Derby. If you are using JDK7 then it comes bundled with
    Derby and installed in directory
    Any other database can be used as well but the instructions will
    differ accordingly.

    1. Create "derby.properties" file in the main directory of and
      specify the following content:



      This creates a user "sa" with the password "sa".

    2. Start the database by invoking the "bin/startNetworkServer"

    3. Copy "derbyclient.jar" to "mydomain/lib" directory and
      restart the server by using "mydomain/startWeblogic.sh"
    4. Create and populate the database by invoking the interactive
      SQL scripting tool "bin/ij". Specify the location of the SQL
      from the application as shown.
      ij version 10.8
      ij> driver 'org.apache.derby.jdbc.ClientDriver';
      ij> connect 'jdbc:derby://localhost:1527/cp;ServerName=localhost;databaseName=cp;user=sa;password=sa;create=true';
      ij> run '/Users/arungup/code/workspaces/arun/ConferencePlanner/trunk/src/main/sql/javaone-sf-2011.sql';
      ij> . . .
      1 row inserted/updated/deleted
      ij> exit;

  3. href="http://www.oracle.com/technetwork/middleware/fusion-middleware/downloads/index.html">Download,
    unzip, and configure WebLogic 12c as described in href="https://blogs.oracle.com/arungupta/entry/get_started_with_oracle_weblogic">TOTD
    #174. Here is my simple script that performs all the steps
    mkdir 12c
    cd 12c
    export CLASSPATH=/Users/arungup/tools/db-derby-
    unzip ~/Downloads/wls1211_dev.zip
    export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
    . $MW_HOME/wlserver/server/bin/setWLSEnv.sh
    cd ..
    mkdir mydomain
    cd mydomain
    $JAVA_HOME/bin/java $JAVA_OPTIONS -Xmx1024m -XX:MaxPermSize=256m weblogic.Server

    Notice, here we are explicitly including "derbyclient.jar" in
    the  CLASSPATH. This will ensure that Derby database's JDBC
    driver is available to WebLogic Administration Console which was
    not able to pick up JAR files from "mydomain/lib" directory

  4. Access WebLogic Admin Console at href="http://localhost:7001/console">localhost:7001/console,
    the login/password used in href="https://blogs.oracle.com/arungupta/entry/get_started_with_oracle_weblogic">TOTD
    #174 is admin/admin007.
  5. Create a JDBC data source

    1. Click on "Data Sources" as shown.


    2. Click on "New" and select "Generic Data Source" as shown.

    3. Specify the values as shown.


      The JDBC resource name is "jdbc/cp" and the database is

    4. Change the "Database Driver" to "Derby's Driver (Type 4)
      Versions: Any" and click on "Next". Make sure to not choose
      Type 4 XA driver which is the default.
    5. Take the defaults and select "Next".
    6. Specify the connection properties as shown.


      And click on "Next".

    7. Click on "Test Configuration" to make sure that every thing
      is configured correctly. Make sure to see the message
      "Connection test succeeded.". Verify the defaults and click on
    8. Select the target "myserver" as shown


      and click on "Finish".

  6. Deploy the application

    1. In the localhost:7001/console, click on "Home" (at the top
      center) and then "Deployments".


    2. Click on "Install".
    3. Specify the location of the WAR file as shown


      Make sure to pick the WAR file by selecting the radio button
      and click on "Next".

    4. Take the defaults and click on "Next".
    5. Take the defaults again and click on "Next". Notice that
      "myserver" is chosen as the target of deployment.

    6. Click on "Finish". After the application is deployed the
      console shows the following snapshot:


  7. Access the application at localhost:7001/ConferencePlanner to
    see the output as:


Feel free to browse through the source code!

WebLogic and play with it! href="https://blogs.oracle.com/arungupta/entry/java_ee_6_using_weblogic">Screencast
#39 explains how to build a more comprehensive Java EE 6
application using NetBeans and

Join the discussion

Comments ( 4 )
  • Vidyadhar Sunday, May 20, 2012


    Nice tutorial. Tell me one thing how I can get the WAR file.

  • Arun Gupta Monday, May 21, 2012

    "mvn package" in the source bundle will build the WAR file.


  • guest Saturday, July 13, 2013

    Do you have same tutorial on Java EE 7

  • Arun Gupta Wednesday, July 17, 2013

    Yes, Java EE 7 tutorial is available at:


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.