Dominik
Dominik

Reputation: 756

How to implement connect/disconnect (GAE Channel API, Java)?

This is the relevant part of my app.yaml:

handlers:
[...]
- url: /_ah/channel/connected
  servlet: com.[MYAPP].server.channel.ChannelConnected
  name: ChannelConnected
- url: /_ah/channel/disconnected
  servlet: com.[MYAPP].server.channel.ChannelDisconnected
  name: ChannelDisconnected
- url: /*
  filter: com.google.inject.servlet.GuiceFilter
  login: required

[...]

inbound_services:
  - channel_presence

But neither ChannelDisconnected nor ChannelConnected seem to be recognized by App Engine. Output from the Dev Server (SDK 1.6.1):

Jan 18, 2012 1:08:37 PM com.google.appengine.tools.development.LocalResourceFileServlet doGet
Warnung: No file found for: /_ah/channel/connected/

And the web log:

0.1.0.10 - - [18/Jan/2012:05:01:37 -0800] "POST /_ah/channel/connected/ HTTP/1.1" 404 346 - - "[MYID].appspot.com" ms=42 cpu_ms=88 api_cpu_ms=65 cpm_usd=0.002547 instance=00c61b117ce7311fe771ffe792d63bf0a07784

Upvotes: 0

Views: 1013

Answers (2)

Moishe Lettvin
Moishe Lettvin

Reputation: 8471

Add a backslash to the end of your connected and disconnected handlers:

- url: /_ah/channel/connected/
  servlet: com.[MYAPP].server.channel.ChannelConnected
  name: ChannelConnected
- url: /_ah/channel/disconnected/
  servlet: com.[MYAPP].server.channel.ChannelDisconnected
  name: ChannelDisconnected

Upvotes: 1

Michael Dillon
Michael Dillon

Reputation: 1037

In your yaml snippet your inbound services are commented out. If this is the case on your actual deployment that might be the cause of your issues.

Upvotes: 0

Related Questions