Mingfai Ma has created a grails cometd plugin that combines grails 1.1, jetty-6.1 and cometd 6.1.12 to provide spring based grails application environment.

Because of the great integration between groovy and java, the java server side Bayeux API may be used to subscribe to channels and have messages delivered to groovy handlers.

For more details see http://www.grails.org/Cometd+Plugin

Cometd Grails plugin

4 thoughts on “Cometd Grails plugin

  • February 24, 2009 at 8:14 pm

    hi greg,
    i’m interested in using jetty’s continuations, but it’s a little confusing for me because i only have a few months of ajax experience. can you clarify something for me please?
    i’m not using cometd as i don’t need an open to my server.
    here’s my scenario (without cometd):
    1- user sends a request
    2- request is ‘suspended’
    3- dao layer process
    4- dao process completes
    5- ‘resume’ and send data
    how do i do this with continuations? should i be using continuations or does jetty take care of suspending the thread while resources are used by the dao layer, and then resume when sending data back to the requester?
    also, do i have to use cometd to use continuations?

  • February 26, 2009 at 11:33 am

    I’m not sure what you mean by “open your server”. There is no requirement for projects that use cometd to be open source.
    Jetty never suspends a request for you. You have to decide to suspend your self. Typically I would not recommend suppending for a DAO layer as there are no async JDBC implementations that you can use to take advantage of this . Instead I would suspend on a JDBC connection pool if there were no connections available – this is what the QoSFilter is for.
    You don’t have to use cometd to use continuations.

  • February 26, 2009 at 7:13 pm

    hi greg,
    “open my server” was a typo. sometimes a type faster than i think :). i meant to say to open a (long-polling) connection to my server. i understand that a QoSFilter can be used on servlets, but i don’t understand how to link up a QoSFilter and the dao layer. is there an example on how to configure this? if not, could you please give me a small one?
    also, i’m planning on using cometd now, but i want to learn how continuations work… so are there examples of using continuations in a small test/example without using cometd?
    thanks for the info,

  • February 27, 2009 at 8:22 am

    hi greg,
    first off, thanks for the software, your time, this blog and your replies. my previous question might be a little ambiguous. since i’m using cometd, i’m trying to tie the dao layer to the ajax layer. i’ve been experimenting with the examples for 2 whole days and have a better understanding now. i read all the docs on the jetty website, but couldn’t find any examples on how to apply the QoSFilter on the ContinuationCometServlet (since i’ll be calling the dao layer from the servlet). is this the right way to do it (or is there a better way)? any suggestions on this?

Comments are closed.