Deploying Existing Play! Applications to Jelastic

By | March 13, 2012
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

Yesterday, we had a guest post from Mr. Sander de Vos from Belgium. Today we have another short article from Leo, over in the Philippines. This is a repost of the article that Leo wrote for his blog. You can read it here, on Dzone (go upvote it!) or on his blog.

If you have an existing Play! application and you want to put it on Jelastic, the easiest way is to use the Jelastic Plugin on Play!

The Requirement:
  • You need to have an existing Jelastic Environment. If you’re Play! application used a database, your environment must have database enabled and also configured, which means you have your database create with appropriate user assigned to it
  • Your application must use at least Play! version 1.2.x.


  1. On your application.conf add this Jelastic configuration
jelastic.api.apihoster=your_hoster’s_api (you can find it here)

Jelastic.api.login and password are your credentials to log onto the Jelastic App Controller. Jelastic.api.context specifies where the application will be deployed. In the example, ROOT means it is deployed and accessible by the domain name which is If I put an app on jelastic.api.context, my application will be deployed on app context and can be accessed on Jelastic.api.environment is the name of your environment defined on your apihoster.

At the moment, jelastic.api.apihoster you can get from this table.

  1. Configure your jdbc on application.conf.

You can edit and define this within the Jelastic admin console.

  1. Increase your db.pool.timeout to 10000ms of application.conf


  1. Deploy your application to jelastic cloud by (must be on the application directory): play jelastic:deploy

This won’t take long, but it does depend on your internet connection speed. This will compile your application and create a war file and then will upload it to jelastic. If it is finish, you can now access your application. In my example, I can access my application on

It seems that the Jelastic plugin can only work the default environment specified on application.conf, so I created a new environment that I named localhost for my localhost testing environment.

If I am testing my application locally, I will execute: play run –%localhost

Hope this can help you. 🙂


You can respond to Leo on his blog, or in the comments below.
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

Subscribe to get the latest updates

  • Pingback: Newsletter – March 15, 2012 « Jelastic — Rock-Solid Java in the Cloud, Java Server Hosting, Java Cloud Computing()

  • Hi, first of all, jelastic is great and play too… and i like it very much.
    And i use this plugin to deploy play app to jelastic, and works great… but one question to jelastic people…

    Which diferent between simpre java web app (.war) and play app deploy to jelastic…

    I’m new on jelastic, and seem a great framework, but, one of the keys are “asyncronous” calls and his “server” netty… in jelastic only tomcat 7 (that support servlet 3 and asynchronous calls) but play finally don’t relay on servlet (it have a wrapper when build war but…)

    What about this?

    Thanks jelastic, great work (and play too).

  • If you read above article carefully, you will see that the answer to your question is actually in there:

    […] This will compile your application and create a war file and then will upload it to jelastic. […]

    As you can see, your Play! app is packaged as WAR file and deployed as such. As a result, you will lose all the “netty magic” that Play! standalone apps can provide.

  • I didn’t read this line, but i know… i deployed play app like war in jelastic.

    Maybe was a rhetoric question. The real question may be, when native support to play in jelastic?

    Thanks for answer.

    PD: I tried jrebel and is great 😉

  • sumeet


    While deploying my play to jelastic, i am getting following error.

    rappdatalocaltempmarket …
    ~ Creating zipped archive to c:usersuserappdatalocaltempmarket.war …
    May 23, 2012 12:42:43 AM play.Logger fatal
    SEVERE: Cannot read application.conf

    Can you suggest something….


  • P.S.

    @sumeet: I’ve got the same error when deploying with “play jelastic:deploy [appname]”, but when I execute the deploy command (“play jelastic:deploy”) directly in the appfolder it work’s