Getting starting (older versions)
Requirements
The project in which you want to plug GAE Studio must respect the following condition:
- It must use the Java runtime on Google App Engine
Versions 0.5 and earlier
- Download GAE-Studio
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:
Add gae-studio-webapp jar file to your lib folder (if not using Maven)
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>
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()); } }
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:
- Same as above
- Same as above
Same as above
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:
- Same as above
- Same as above
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
- Compile and/or run the project in which you plugged GAE Studio
- Head over to {your application's domain}/gae-studio-admin/
- Create an account by clicking on "Don't have an account?"
- Enter your license key (for now, it is the beta key you received with your invitation)
- Grab a beer