JavaBlog.fr / Java.lu DEVELOPMENT,GAE,Google,GWT,Java GWT/GAE: A example of GWT, Deployment on a Jboss, Tomcat, GAE cloud and application versioning on GAE (PART3)

GWT/GAE: A example of GWT, Deployment on a Jboss, Tomcat, GAE cloud and application versioning on GAE (PART3)

In previous articles, I have related the prerequisites, the configuration of a GAE account, the creation of a new Eclispe project with the type “Web Application Project”, the deployment of an application on the GWT embedded server named Jetty and the evolution of the interface with GWT Designer. In this article, we will discuss about the deployment of an application on Jboss, Tomcat servers, on GAE cloud with the application versioning on GAE.

Here the points of these articles:

  1. Prerequisites,
  2. Configuration GAE account,
  3. New Eclispe project with the type “Web Application Project”,
  4. Deployment on GWT embedded server named Jetty,
  5. Evolution of the interface with GWT Designer,
  6. Deployment on a Jboss server,
  7. Deployment on a Tomcat server,
  8. Deployment on GAE cloud,
  9. Creation of a new version n°2 of our application on GAE,
  10. Internationalization of the application,

  1. Deployment on a Jboss server
    Once our application is shippable, we will deploy it on Jboss server. To deploy an application on the Jboss server see the post GWT/GAE: Deployment an application on external server JBOSS.

  2. Deployment on a Tomcat server
    Then, we could deploy our application on Tomcat server. To deploy an application on the Tomcat server see the post GWT/GAE: Deployment an application on external server TOMCAT.

  3. Deployment on GAE cloud
    Before the deploymenton GAE, we will generate again the Javascript of the GWT application and configure our GAE account by the creation of a new application.

    1. Javascript generation of a GWT application

      As a reminder, to compile a Web application Eclipse project:
      The

      …the ouputs in console would be:

      Compiling module com.ho.gwt.test3.module31.Huojavagwttest3
         Compiling 6 permutations
            Compiling permutation 0...
            Compiling permutation 1...
            Compiling permutation 2...
            Compiling permutation 3...
            Compiling permutation 4...
            Compiling permutation 5...
         Compile of permutations succeeded
      Linking into C:\MyFiles\Development\Java\dev\huojavagwttest3\war\huojavagwttest3
         Link succeeded
         Compilation succeeded -- 60,023s
      

      …so, after the GWT compilation, the folder war of the Web application Eclipse project will contain the result of the compilation:

    2. Configuration GAE Account
      After the compilation of the Web application Eclipse project, it is necessary to configure the GAE account as described in the post GWT/GAE: A example of GWT, Creation, Configuration GAE, Deployment on Jetty (PART1) in order to create a new application with the following informations:

      • the application identification (ID): the domain name of the application in the Google cloud. Caution: Always check the availability of the ID! In this example, we have created the ID “huojavagwttest3″;
      • the title of the application. In this example, we have created the ID “HUO Java Gwt First Test 3″;

      Note: These informations (application ID…etc) concerning the App Engine Config in a Eclipse Project are stored in the appengine-web.xml file of the project.

      <?xml version="1.0" encoding="utf-8"?>
      <appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
        <application>huojavagwttest3</application>
        <version>1</version>
      ...
      </appengine-web-app>
      

      So, our Eclipse project is compiled and a new huojavagwttest3 application is available on App Engine and accessible via http://huojavagwttest3.appspot.com/:

    3. Deployment on GAE cloud due to Eclipse
      Go to the Eclipse project’s properties and in the App Engine settings in Google section, fill in the Application ID with the value huojavagwttest3 and Version with 1 like:

      … then, click-right and go to the menu-item Deploy to App Engine in the Google menu:

      …if it’s your first deployment on GAE, Eclipse will open a Google’s account authentication window like:

      …after authentication, Eclipse opens the window for the deployment of the concerned application with a confirmation message like “Ready to deploy application ‘huojavagwttest3’, version 1”:

      … click on Deploy button and normally, the ouputs in console would be:

      Compiling module com.ho.gwt.test3.module31.Huojavagwttest3
         Compiling 6 permutations
            Compiling permutation 0...
            Compiling permutation 1...
            Compiling permutation 2...
            Compiling permutation 3...
            Compiling permutation 4...
            Compiling permutation 5...
         Compile of permutations succeeded
      ...
         Compilation succeeded -- 106,101s
      ********************************************************
      There is a new version of the SDK available.
      ...
      
      ------------ Deploying frontend ------------
      Preparing to deploy:
      ...
      
      Deploying:
      ...
      
      Verifying availability:
      ...
      
      Updating datastore:
      	Uploading index definitions.
      
      Deployment completed successfully
      

      …the deployment of the application on GAE is completed, our huojavagwttest3 application is available on App Engine and accessible via http://huojavagwttest3.appspot.com/:

  4. Creation of a new version n°2 of our application on GAE
    Google App Engine supports the creation of several version of an application. In the Admin Console, we can select which version should be active. The active application “your-name” will be accessible via the URL “http://your-name.appspot.com”. Each version can also be accessed for example to test a new version. The versions are accessible via “http://versionnumber.latest.your-name.appspot.com” where version is for example “2” and “latest” is a fixed string.

    So, now we will create a new version n°2 of our application on GAE with the following steps:

    • Go to the Eclipse project’s properties and in the App Engine settings in Google section, fill in the Application ID with the value huojavagwttest3 and Version with 2 like:

    • … then, click-right and go to the menu-item Deploy to App Engine in the Google menu:

    • …Eclipse opens the window for the deployment of the concerned application with a confirmation message like “Ready to deploy application ‘huojavagwttest3’, version 2”:

    • … click on Deploy button and normally, the ouputs in console would be:
      Skipping GWT compilation since no relevant changes have occurred since the last deploy.
      ********************************************************
      ...
      ********************************************************
      
      ------------ Deploying frontend ------------
      Preparing to deploy:
      ...
      
      Deploying:
      ...
      
      Verifying availability:
      ...
      
      Updating datastore:
      	Uploading index definitions.
      
      Deployment completed successfully
      

    • …the deployment of the application on GAE is completed, our huojavagwttest3 application is available on App Engine in 2 versions:
      + the first version 1 and default is accessible by http://huojavagwttest3.appspot.com/,
      + the second version 2 and NOT default is accessible by http://versionnumber.2.huojavagwttest3.appspot.com/

      More, Google App Engine supports the creation of several version of an application configurable in the Admin Console of GAE (selection of default version):

In this article, we have done the deployment of an application on a Jboss server, on a Tomcat server, on GAE cloud with application versioning on GAE. In next article, we will discuss about the Internationalization of the application.

Source: huojavagwttest3.zip

Notes: This file huojavagwttest3.zip contains the final version of the tutorial (from PART1 to PART4), but, it is necessary to add the librairies appengine-api-1.0-sdk-1.6.1.jar, appengine-api-labs-1.6.1.jar, appengine-jsr107cache-1.6.1.jar, datanucleus-appengine-1.0.10.final.jar, datanucleus-core-1.1.5.jar, datanucleus-jpa-1.1.5.jar, geronimo-jpa_3.0_spec-1.1.1.jar, geronimo-jta_1.1_spec-1.1.1.jar, google_sql.jar, gwt-servlet.jar, jdo2-api-2.3-eb.jar and jsr107cache-1.1.jar.

Best regards,

Huseyin OZVEREN

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.

Related Post