Getting starting (older versions)

  1. Requirements

    The project in which you want to plug GAE Studio must respect the following condition:

    1. It must use the Java runtime on Google App Engine

    Versions 0.5 and earlier

    1. Download GAE-Studio
    2. Install gae-studio to your local .m2 by moving within a terminal where you stored GAE-Studio jar file then:

      mvn install:install-file -Dfile=gae-studio-webapp-<VERSION>.jar -DgroupId=com.arcbees.gaestudio -DartifactId=gae-studio-webapp -Dversion=<VERSION> -Dpackaging=jar

    Versions 0.6+

    Starting from version 0.6, GAE Studio is now on maven cental. All you need to do is add the GAE Studio dependency. If you are not using Maven, the jar can still be downloaded from maven central directly.

    <dependency>
        <groupId>com.arcbees.gaestudio</groupId>
        <artifactId>gae-studio-webapp</artifactId>
        <version>0.8.3</version>
    </dependency>

     

    Plugging GAE Studio in your project

    If you're using Google Guice and RESTeasy:

    1. Add gae-studio-webapp jar file to your lib folder (if not using Maven)

    2. Modify the appengine-web.xml file and turn on sessions and Channel API

      <sessions-enabled>true</sessions-enabled>
       
      <inbound-services>
      	<service>channel_presence</service>
      </inbound-services>
    3. Add into your Guice servlet config:

      import com.arcbees.gaestudio.server.GaeStudioModule;
       
      public class GuiceServletConfig extends GuiceServletContextListener {
          @Override
          protected Injector getInjector() {
              // Important: GaeStudioModule needs to be the last one.
              return Guice.createInjector(new ServerModule(), new GaeStudioModule());
          }
      }
    1. Add to your web.xml:

      <filter-mapping>
          <filter-name>guiceFilter</filter-name>
          <url-pattern>/*</url-pattern>
      	<dispatcher>REQUEST</dispatcher>
          <dispatcher>FORWARD</dispatcher>
      </filter-mapping>

    If you're using Google Guice, but not RESTeasy:

    1. Same as above
    2. Same as above
    3. Same as above

    4. Add to your web.xml:

      <context-param>
          <param-name>resteasy.servlet.mapping.prefix</param-name>
          <param-value>/rest</param-value>
      </context-param>
       
      <filter-mapping>
          <filter-name>guiceFilter</filter-name>
          <url-pattern>/*</url-pattern>
      	<dispatcher>REQUEST</dispatcher>
          <dispatcher>FORWARD</dispatcher>
      </filter-mapping>

    If you're not using Google Guice:

    1. Same as above
    2. Same as above
    3. Add to your web xml:

      <listener>
          <listener-class>com.arcbees.gaestudio.server.guice.GaeStudioServletConfig</listener-class>
      </listener>
      
      <context-param>
          <param-name>resteasy.servlet.mapping.prefix</param-name>
          <param-value>/rest</param-value>
      </context-param>
      
      <filter>
          <filter-name>guiceFilter</filter-name>
          <filter-class>com.google.inject.servlet.GuiceFilter</filter-class>
      </filter>
      
      <filter-mapping>
          <filter-name>guiceFilter</filter-name>
          <url-pattern>/*</url-pattern>
      	<dispatcher>REQUEST</dispatcher>
          <dispatcher>FORWARD</dispatcher>
      </filter-mapping>

    Running GAE Studio

    1. Compile and/or run the project in which you plugged GAE Studio
    2. Head over to {your application's domain}/gae-studio-admin/
    3. Create an account by clicking on "Don't have an account?"
    4. Enter your license key (for now, it is the beta key you received with your invitation)
    5. Grab a beer