System requirements for using Cometd / Bayeux on Android

I am trying to implement a Cometd / Bayeux server on Android using iJetty. The Jetty implementation itself works just fine, putting static pages along with servlets. I'm trying to up the ante a bit and create a Bayeux app over the phone, but I'm having problems. I can get to the dojo cometd scripting page, but I cannot subscribe to the channel. When I go through the firebug / chome developer tools I see a series of messages / gets the last few milliseconds (~ 14). However, when I run the cometd app on a normal computer, / messages are received for the last few seconds (~ 14 seconds) before timed out and reopened the connection. This second scenario makes sense to me with my understanding of how HTTP continuation works. So I thinkthat something is preventing these connections from opening and returning prematurely and therefore closing the connection. I would post my source code, but I'm not sure what to post about everything ... (it's open source though if you want to look at it athttp://webtext-android.googlecode.com ).

So my question is, does anyone think there might be some basic limitation imposed by the Android system that prevents these servlets from working? Are there any assumptions made by the Jetty Bayeux implementation regarding the underlying system? Or is it more likely that somehow I have a bad implementation of ContinuationCometdServelt? I should note that all messages / messages from the client return 200 OK messages, so I am not inclined to think that the Android system is simply terminating the connection.

I know this is a bit off the wall and I'm definitely trying to do something a little out of the ordinary, but any suggestions or advice would be greatly appreciated.

Thanks,

Chris

+2


a source to share


1 answer


If anyone discovers this and has similar problems (this applies to all cometd implementations regardless of the host), then I found that the problem is related to using the google js library. For some reason, the dojo scripts I downloaded from Google (1.4) did not have a reliable implementation of comet. I switched my dojo script to the one used by jetty-1.6.23 app and it works fine.



+1


a source







All Articles