Code Monkey home page Code Monkey logo

grails-events-push's People

Contributors

davydotcom avatar dsklyut avatar emmanuj avatar eylen avatar jfarcand avatar pledbrook avatar roykachouh avatar smaldini avatar yellowsnow avatar zachlendon avatar zyro23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grails-events-push's Issues

Latest version on grails website?

Hello,

I was trying to make a basic chat system for my app and was going to use this plug�in to create it. After attempting draft a system I found that the version of the plugin at http://grails.org/plugin/events-push (1.0.M7) included references to the now removed ConfigurationHolder and also used the resources plugin, which at least on the version that it was using (1.2.RC3) did not work with my version Grails (2.4.0 acording to application.properties).

I then looked at the Github And saw that the issue was fixed (I think) but was not push to the Grails website. Would it be possible for you to pushed an update to the Grails website?

Also here are the log when run from Intellij and a copy of my BuildConfig.groovy. Please tell me if you need any more info and I appoligise if I have have messed this up on my end.

Many thanks Joshua.

Failed to resolve dependency when using

It seems like org.atmosphere:atmosphere-runtime:1.1.0-SNAPSHOT is no longer available at https://oss.sonatype.org/content/repositories/releases/org/atmosphere/atmosphere-runtime/

There is a 1.1.0.RC1 but when using the dependency stated in the doc compile ":events-push:1.0.M7" the 1.1.0-SNAPSHOT is being used.

grails run-app after grails clean causes the reloading agent to fail

With the events-push plugin installed, every time the app is run directly after a clean the reloading agent fails with the following exception.

| Error java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:91)
| Error at sun.instrument.TransformerManager.transform(TransformerManager.java:169)
| Error at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
| Error at com.springsource.loaded.ChildClassLoader.defineClass(ChildClassLoader.java:21)
| Error at com.springsource.loaded.TypeRegistry.defineClass(TypeRegistry.java:1055)
| Error at com.springsource.loaded.CurrentLiveVersion.define(CurrentLiveVersion.java:110)
| Error at com.springsource.loaded.CurrentLiveVersion.(CurrentLiveVersion.java:87)
| Error at com.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:369)
| Error at com.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:792)
| Error at com.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:38)
| Error at com.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:202)
| Error at com.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:186)
| Error at java.lang.Thread.run(Thread.java:680)
| Error Caused by: java.lang.NullPointerException
| Error at com.springsource.loaded.agent.JVMPlugin.accept(JVMPlugin.java:131)
| Error at com.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:99)
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:89)
| Error ... 16 more

ERROR cpr.AtmosphereFramework - AtmosphereFramework exception Message: Not supported.

I get the following errors when I use your plugin and access with IE8 or IE9, because websocket is not supported there.

| Error 2013-08-11 18:44:16,477 [http-bio-8080-exec-1] ERROR cpr.AtmosphereFramework  - AtmosphereFramework exception
Message: Not supported.
    Line | Method
->>  594 | startAsync     in org.atmosphere.cpr.AtmosphereRequest
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    130 | suspend        in org.atmosphere.container.Servlet30CometSupport
|    105 | service . . .  in     ''
|     65 | doService      in org.atmosphere.container.Tomcat7Servlet30SupportWithWebSocket
|     87 | doService . .  in org.atmosphere.container.TomcatWebSocketUtil
|     61 | service        in org.atmosphere.container.Tomcat7Servlet30SupportWithWebSocket
|   1594 | doCometSupport in org.atmosphere.cpr.AtmosphereFramework
|    176 | doPost         in org.atmosphere.cpr.AtmosphereServlet
|    162 | doGet . . . .  in     ''
|   1145 | runWorker      in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run            in java.lang.Thread
| Error 2013-08-11 18:44:16,489 [http-bio-8080-exec-1] ERROR [/test].[MesosphereServlet]  - Servlet.service() for servlet [MesosphereServlet] in context with path [/test] threw exception
Message: Not supported.
    Line | Method
->>  594 | startAsync     in org.atmosphere.cpr.AtmosphereRequest
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    130 | suspend        in org.atmosphere.container.Servlet30CometSupport
|    105 | service . . .  in     ''
|     65 | doService      in org.atmosphere.container.Tomcat7Servlet30SupportWithWebSocket
|     87 | doService . .  in org.atmosphere.container.TomcatWebSocketUtil
|     61 | service        in org.atmosphere.container.Tomcat7Servlet30SupportWithWebSocket
|   1594 | doCometSupport in org.atmosphere.cpr.AtmosphereFramework
|    176 | doPost         in org.atmosphere.cpr.AtmosphereServlet
|    162 | doGet . . . .  in     ''
|   1145 | runWorker      in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run            in java.lang.Thread

Events push and event si interference ?

Hello guys, is there any problem of interference between events push and event si, or i didn't configure them the right way ?

the thing is that, events push opens the connection without any problem but does not invoke grailsEvents.on('getNotification', function (data) {
console.log("test") // can not access here
});

besides the name space must be specified when using event() from a plugin, that's what i did but still something is wrong !

P.S : i am developing a PLUGIN project that uses both of them.

Thanks.
Best regards.

SNAPSHOT BROKEN?

Is grails-events-push M2 snapshot broken?

I installed grails-events-push M2 snapshot and events-si M2 snapshot in my app...It works well yesterday afternoon before 2pm EST....

But it displays the following error right now:

ERROR - core - (resource.ResourceMeta) - Resource not found: /plugins/platform-core-1.0.M3/js/bootstrap.min.js

And event push does't work right now...I have to refresh my page manually to see the new notification....

Even the Todo Example in Cloudfoundry is broken....If I open two tabs, add one todo in one tab, the other tab will not show the new adding todo automatically...You have to refresh that manually to display the new todo...

Thank you..

AtmosphereFramework exception java.lang.IllegalStateException: Not supported.

I am using Events-Push in my grails application. every thing is fine when running application from my IDE (IntelliJ Idea). but when I deploy it to tomcat (7.0) following exception raises:

2013-07-08 09:07:19,118 [ajp-nio-8009-exec-13] ERROR cpr.AtmosphereFramework  - AtmosphereFramework exception
java.lang.IllegalStateException: Not supported.
    at org.atmosphere.cpr.AtmosphereRequest.startAsync(AtmosphereRequest.java:594)
    at org.atmosphere.container.Servlet30CometSupport.suspend(Servlet30CometSupport.java:138)
    at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:104)
    at org.atmosphere.container.Tomcat7Servlet30SupportWithWebSocket.doService(Tomcat7Servlet30SupportWithWebSocket.java:65)
    at org.atmosphere.container.TomcatWebSocketUtil.doService(TomcatWebSocketUtil.java:87)
    at org.atmosphere.container.Tomcat7Servlet30SupportWithWebSocket.service(Tomcat7Servlet30SupportWithWebSocket.java:61)
    at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:1571)
    at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:176)
    at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:162)
    at com.googlecode.psiprobe.Tomcat70AgentValve.invoke(Tomcat70AgentValve.java:38)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

myservlet config in web.xml is:

<servlet>
        <description>MeteorServlet</description>
        <servlet-name>MeteorServlet</servlet-name>
        <servlet-class>org.grails.plugin.platform.events.push.GrailsMeteorServlet</servlet-class>
        <init-param>
            <param-name>org.atmosphere.cpr.broadcaster.shareableThreadPool</param-name>
            <param-value>true</param-value>
        </init-param>
        <init-param>
            <param-name>org.atmosphere.cpr.broadcaster.maxProcessingThreads</param-name>
            <param-value>20</param-value>
        </init-param>
        <init-param>
            <param-name>org.atmosphere.cpr.broadcaster.maxAsyncWriteThreads</param-name>
            <param-value>20</param-value>
        </init-param>
        <load-on-startup>0</load-on-startup>
        <async-supported>true</async-supported>
    </servlet>

usage is

var receivedOrders = new Array();
    var grailsEvents = new grails.Events("${rootPath}",
    {
        transport: 'sse',
        fallbackTransport: 'long-polling',
        timeout: 10000,
        onMessage: function(data){
            try{
                if(data.responseBody.length > 0){
                    var order = jQuery.parseJSON(data.responseBody).body;
                    if(order.id){
                        if (receivedOrders.indexOf(order.id) == -1) {
                        receivedOrders[receivedOrders.length] = order.id;
                        var url = "<g:createLink controller="orderAdministration" action="orderNotification"/>";
                        $.ajax({
                            type: "POST",
                            url: url,
                            data: { id: order.id }
                        }).done(function (response) {
                                    if (response != "0") {
                                        $.msgGrowl({
                                            type: 'info', sticky: true, 'title': '${message(code: 'order.notification.title')}', 'text': response, lifetime: 5000
                                        });
                                    }
                                });
                        }
                    }
                }
            } catch (e) {
                // Atmosphere sends commented out data to WebKit based browsers
            }
        }
    });

    grailsEvents.on('order_event', function(data){});

it seems some thing is wrong with tomcat configuration. any idea?

NullPointerException when starting a project using event-push on linux with tomcat-7.0.39

Hi,
I love the way this project integrates push notifications with grails. It works in my dev machine with grails run-app (windows) perfectly. Unfortunately, when deploying the war on a tomcat-7.0.39 I get the following error :

cpr.AtmosphereFramework Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
cpr.AnnotationHandler Found Annotation in class org.grails.plugin.platform.events.push.EventsPushHandler being scanned: interface org.atmosphere.config.service.MeteorService
cpr.AnnotationHandler
java.lang.NullPointerException
at org.atmosphere.cpr.AtmosphereFramework.setDefaultBroadcasterClassName(AtmosphereFramework.java:1634)
at org.atmosphere.cpr.AnnotationHandler.handleAnnotation(AnnotationHandler.java:136)
at org.atmosphere.cpr.DefaultAnnotationProcessor$ServletContainerInitializerAnnotationProcessor.scan(DefaultAnnotationProcessor.java:128)
at org.atmosphere.cpr.DefaultAnnotationProcessor.scan(DefaultAnnotationProcessor.java:81)
at org.atmosphere.cpr.AtmosphereFramework.autoConfigureService(AtmosphereFramework.java:2002)
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:568)
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:507)
at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:74)
at org.atmosphere.cpr.MeteorServlet.init(MeteorServlet.java:122)
at org.grails.plugin.platform.events.push.GrailsMeteorServlet.init(GrailsMeteorServlet.java:37)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)

Afterwards, the events are never pushed to the client. Do I need to setup something special in tomcat server.xml besides changing the connectors to NIO?

Thanks!

could requirement to define events in DSL be more of an option ?

As can be seen in #6, I'm trying to find the best way to have user/role constrained events in the application. One way might be to have the topic names reflect this. So there could be a topic: customerAccount_5_supportTicketUpdate, which would indicate a supportTicket has been updated for the customerAccount with id of 5. In this kind of strategy, the topics/event names will be dynamic. Clearly this sort of strategy would not fit with the requirement to hardcode the events.

Does anyone have any thoughts on this ? Am I looking at it completely wrong ?

Websocket connection not established - fallback to long-polling every time

Hi,

It seems that I'm not able to get a websocket-connection working using Chrome (21), Chrominium (18) and Firefox (14) under Ubuntu 11.10 and Grails 2.1.0, events-push 1.0.M2.
Tomcat NIO support is off (same behaviour with NIO enabled though).

See https://github.com/ClemensSchneider/grails-events-push-tester for a basic grails 2.1.0 app. You may clone it, launch it via grailsw (grails wrapper), open the development-tools and browse to http://localhost:8080/push-tester. There you have a button to subscribe (once) and send an event (setup as described in the grails-events-push readme).

What I am seeing in all browsers is that a websocket-connection upgrade is requested but as soon as I try to register for an event or try to send an event, the websocket-connection is closed and being downgraded to long-polling:

WebSocket is closed before the connection is established. :8080:1
Websocket failed. Downgrading to Comet and resending {"topic":"saveTodo","body":{"hello":"World"}} jquery.atmosphere.js:2297
Websocket closed, reason: Unknown: no status code was provided even though one was expected. jquery.atmosphere.js:2297
Websocket closed, wasClean: true jquery.atmosphere.js:2297
Websocket closed normally jquery.atmosphere.js:2297

Request and response when creating the grails.Events instance look like the following:

Request URL:ws://localhost:8080/push-tester/g-eventsbus/eventsbus?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=1.0&X-Atmosphere-Transport=websocket&X-Atmosphere-TrackMessageSize=true&X-Cache-Date=0&topics=eventsbus
Request Method:GET
Status Code:101 Switching Protocols

Request Headers

Connection:Upgrade
Host:localhost:8080
Origin:http://localhost:8080
Sec-WebSocket-Extensions:x-webkit-deflate-frame
Sec-WebSocket-Key:LmwF9EHgvsMubhChVx0yMQ==
Sec-WebSocket-Version:13
Upgrade:websocket
(Key3):00:00:00:00:00:00:00:00
Query String Parametersview URL encoded
X-Atmosphere-tracking-id:0
X-Atmosphere-Framework:1.0
X-Atmosphere-Transport:websocket
X-Atmosphere-TrackMessageSize:true
X-Cache-Date:0
topics:eventsbus

Response Headers

Connection:upgrade
Date:Fri, 17 Aug 2012 06:56:55 GMT
Sec-WebSocket-Accept:uYV8WubfjVXRGoDKnnFQYM+508A=
Server:Apache-Coyote/1.1
Transfer-Encoding:chunked
Upgrade:websocket
X-Atmosphere-tracking-id:87cf5b84-c565-456c-b041-ab4581ba66f7
(Challenge Response):00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

When I'm creating new grails.Events("http://localhost:8080/push-tester") without registering or sending anything over the wire, I can see, that there are frames (2<@>{}) sent by the server in intervals of 10 seconds, but after one minute, the connection seems to get terminated, a reconnect is initiated and the following is printed to the console (chrome):

Websocket closed, reason: The endpoint is terminating the connection due to a protocol error. (jquery.atmosphere.js:2297)
Websocket closed, wasClean: true

This repeats itself (endlessly?).

Spring Security Integration

I think more elegant and robust integration between spring-security integration and the browserFilters could be a good. It would be for me at least. Allow me to share what I have so far.

I can obtain the principal user with the following code. It looks a little ugly, but it works - well for long-polling and sse anyway! It doesn't seem to work for web sockets.

events {
    'newTicket' browser:true, browserFilter: { message, request ->
          def HttpSessionSecurityContextRepository = org.springframework.security.web.context.HttpSessionSecurityContextRepository
         def securityContext = (org.springframework.security.core.context.SecurityContext)request.getSession().getAttribute (HttpSessionSecurityContextRepository.SPRING_SECURITY_CONTEXT_KEY)
        def personId = securityContext?.authentication?.principal?.id   
    }
}

Stephane, I'm hoping you might have some tips / thoughts... :)

Connection closed after a while

I'm using this plugin and all goes well but when the system has a period being idle the connection is lost and cannot reconnect with server.
When I refresh the page everything goes well again.

This is the error on chrome:
WebSocket connection to 'ws://192.168.1.109:8080/EasyRestaurant//g-eventsbus/eventsbus?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.1.5-jquery&X-Atmosphere-Transport=websocket&X-Atmosphere-TrackMessageSize=true&X-Cache-Date=0&Content-Type=application/json&X-atmo-protocol=true' failed: Received a broken close frame containing a reserved status code.

After this error if I try to send an event another one appears:
No suspended connection available. Make sure atmosphere.subscribe has been called and request.onOpen invoked before invoking this method.

PS: I'm using CORS, and atmosphere-javascript-2.1.5 in tomcat:7.0.52.1 (events-push:1.0.0.BUILD-SNAPSHOT and org.grails.plugins:events:1.0.0.BUILD-SNAPSHOT)

headers?

Not sure if this is more appropriate for some other venue, but I'll try to be specific here.

When an event comes in, it seems it can only be attached to a method on a service, not on a controller. Is that by design? Probably is, but it leads to the second question - how do I know what client sent the message in to the event?

In GrailsServiceActivatingHandler.java there's a _message which has a load of metadata about the incoming message, along with 'payload' (that actual data). It seems that only payload is getting passed in to the final event handler, not the rest of the 'headers' metadata. Having that headers metadata would seem like it would be extremely useful - why is that not available? Or is it, and I'm just missing how to get at it?

hibernate session not bound to thread

something for the wish list Stephane....

on two separate occassions I ran into no hibernate session bound to the thread problems.
I can plop a DomainClass.withTransaction { -> closure in there which can kind of fix them but if it wasn't required that would be nice. The two occassions are:

  • In the browser filter if I need to verify whether I can send the event to the client or not, I need to pull in other objects
  • In the JSON rendering, I use custom renderers for domain objects, and again pull in associated data via hibernate - if that makes sense

A gorm event can only be used by one domain object

Lets say I have this in my Events DSL:

'afterInsert' namespace: 'gorm', filter: com.mycompany.Dog, browser: true

Can I then add ?:

'afterInsert' namespace: 'gorm', filter: com.mycompany.Cat, browser: true

Would the following then be rendering Cats and Dogs

grailsEvents.on('afterUpdate', function(data) {  renderToTemplate(data)  });

I wonder if the gorm events are really compatible with a non-trivial client-side application. Perhaps the best strategy here is to just trigger custom events like newCat and newDog where appropriate.

Browser opens multiple connections per session and keeps them indefinitely

I am using 0.7 version of Events Push plugin. The web page contains logic for registering to 4 different events. After introduction of the plugin we noticed sharp increase of open connections on the Tomcat server (version 7). Most of the connections stay open for a long time and come from Atmosphere library. Moreover we see browser maintaining multiple connections to the server, some with 3 out of 4 events, some with all 4. I tried adding
grails.push.server.initParams to Config.groovy with
org.atmosphere.cpr.CometSupport.maxInactiveActivity and
org.atmosphere.websocket.maxIdleTime parameters, but they have no effect.

Is it normal for a browser to open multiple Atmosphere connection to the server. Is it normal for these connection to stay open indefinitely? How to limit the connections to one per browser? How to make connection time out?

Something is broken with event-push plugin

It's working well yesterday night, but the plugin seems broken today.

And I don't change anything of my code.

I get message like:

2012-08-03 13:01:51,811 [Atmosphere-AsyncWrite-0] WARN gateway.GatewayProxyFactoryBean$MethodInvocationGateway - failure occurred in gateway sendAndReceive
org.springframework.integration.MessageDeliveryException: failed to send Message to channel 'gorm://afterInsert'
at org.grails.plugin.platform.events.publisher.SpringIntegrationEventsPublisher.event(SpringIntegrationEventsPublisher.java:63)
at org.grails.plugin.platform.events.publisher.GormBridgePublisher.onApplicationEvent(GormBridgePublisher.java:59)
at ChatAtmosphereHandler$_onStateChange_closure1.doCall(ChatAtmosphereHandler.groovy:68)
at org.grails.datastore.gorm.GormStaticApi.withTransaction(GormStaticApi.groovy:573)
at ChatAtmosphereHandler.onStateChange(ChatAtmosphereHandler.groovy:66)
at org.atmosphere.cpr.DefaultBroadcaster.broadcast(DefaultBroadcaster.java:845)
at org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:760)
at org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:793)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.springframework.amqp.support.converter.MessageConversionException: failed to convert to serialized Message content
... 14 more
Caused by: java.lang.IllegalArgumentException: Could not serialize object of type: class org.springframework.integration.message.GenericMessage
... 14 more
Caused by: java.io.NotSerializableException: com.test.ChatLog
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at java.util.HashMap.writeObject(HashMap.java:1001)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:940)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:422)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:940)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
... 14 more

The error came from a place where I did "SomeDomain.save()"

But I registered "gorm:// afterInsert" listen for another domain not that one where the error occurs...

support spring-core websocket/stomp/sock.js stack

its just a matter of time when spring-4 will be ga and then make it - someday ;) - into grails-core.

it would be really nice if then, events-push would support spring-4's built-in websocket/stomp/sock.js based stack.

just gave it a whirl with spring-boot and gotta say - does feel clean. as i understand, reactor integration (poking grails-events here) is also getting attention / will be supported.

Incompatible with Resources plugin v1.2.RC2

The events-push plugin exports a dependency on version 1.1.6 of the resources plugin which makes it impossible to upgrade an app to resources:1.2.RC2. On startup the app tries to uninstall the 1.2RC2 version and install the 1.1.6 version.

Since version 1.2RC2 is the officially stated installation dependency on the grails.org plugin page for the resources plugin, it seems that this plugin should be updated to support it.

Something wrong with receiving server generated event

Hi, not sure what is exactly wrong any help or pointers would be appreciated. Here is the log files,

2012-11-17 18:13:01,798 [qtp23117860-47 - /pbs/g-eventsbus/eventsbus?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=1.1&X-Atmosphere-Transport=sse&X-Atmosphere-TrackMessageSize=true&X-Cache-Date=0&topics=eventsbus%2CsavedTodo] WARN  servlet.ServletHandler  - Error for /pbs/g-eventsbus/eventsbus

Message: org.eclipse.jetty.server.Request.isAsyncStarted()Z
    Line | Method
->>  768 | isAsyncStarted in org.atmosphere.cpr.AtmosphereRequest
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    136 | suspend        in org.atmosphere.container.Servlet30CometSupport
|    103 | service . . .  in     ''
|   1293 | doCometSupport in org.atmosphere.cpr.AtmosphereFramework
|    293 | doPost . . . . in org.atmosphere.cpr.AtmosphereServlet
|    279 | doGet          in     ''
|    565 | handle . . . . in org.eclipse.jetty.servlet.ServletHolder
|   1360 | doFilter       in org.eclipse.jetty.servlet.ServletHandler$CachedChain
|   1331 | doFilter . . . in     ''
|    477 | doHandle       in org.eclipse.jetty.servlet.ServletHandler
|    119 | handle . . . . in org.eclipse.jetty.server.handler.ScopedHandler
|    521 | handle         in org.eclipse.jetty.security.SecurityHandler
|    227 | doHandle . . . in org.eclipse.jetty.server.session.SessionHandler
|   1031 | doHandle       in org.eclipse.jetty.server.handler.ContextHandler
|    406 | doScope . . .  in org.eclipse.jetty.servlet.ServletHandler
|    186 | doScope        in org.eclipse.jetty.server.session.SessionHandler
|    965 | doScope . . .  in org.eclipse.jetty.server.handler.ContextHandler
|    117 | handle         in org.eclipse.jetty.server.handler.ScopedHandler
|    111 | handle . . . . in org.eclipse.jetty.server.handler.HandlerWrapper
|    345 | handle         in org.eclipse.jetty.server.Server
|    449 | handleRequest  in org.eclipse.jetty.server.AbstractHttpConnection
|    910 | headerComplete in org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler
|    634 | parseNext . .  in org.eclipse.jetty.http.HttpParser
|    230 | parseAvailable in     ''
|     76 | handle . . . . in org.eclipse.jetty.server.AsyncHttpConnection
|    609 | handle         in org.eclipse.jetty.io.nio.SelectChannelEndPoint
|     45 | run . . . . .  in org.eclipse.jetty.io.nio.SelectChannelEndPoint$1
|    599 | runJob         in org.eclipse.jetty.util.thread.QueuedThreadPool
|    534 | run . . . . .  in org.eclipse.jetty.util.thread.QueuedThreadPool$3
^    722 | run            in java.lang.Thread
2012-11-17 18:13:01,800 [qtp23117860-47 - /pbs/g-eventsbus/eventsbus?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=1.1&X-Atmosphere-Transport=sse&X-Atmosphere-TrackMessageSize=true&X-Cache-Date=0&topics=eventsbus%2CsavedTodo] DEBUG servlet.ServletHandler  - (GET /pbs/g-eventsbus/eventsbus?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=1.1&X-Atmosphere-Transport=sse&X-Atmosphere-TrackMessageSize=true&X-Cache-Date=0&topics=eventsbus%2CsavedTodo)@365982 org.eclipse.jetty.server.Request@5959e
2012-11-17 18:13:01,801 [qtp23117860-47 - /pbs/g-eventsbus/eventsbus?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=1.1&X-Atmosphere-Transport=sse&X-Atmosphere-TrackMessageSize=true&X-Cache-Date=0&topics=eventsbus%2CsavedTodo] DEBUG servlet.ServletHandler  - Response already committed for handling 
Message: org.eclipse.jetty.server.Request.isAsyncStarted()Z
    Line | Method
->>  768 | isAsyncStarted in org.atmosphere.cpr.AtmosphereRequest
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    136 | suspend        in org.atmosphere.container.Servlet30CometSupport
|    103 | service . . .  in     ''
|   1293 | doCometSupport in org.atmosphere.cpr.AtmosphereFramework
|    293 | doPost . . . . in org.atmosphere.cpr.AtmosphereServlet
|    279 | doGet          in     ''
|    565 | handle . . . . in org.eclipse.jetty.servlet.ServletHolder
|   1360 | doFilter       in org.eclipse.jetty.servlet.ServletHandler$CachedChain
|   1331 | doFilter . . . in     ''
|    477 | doHandle       in org.eclipse.jetty.servlet.ServletHandler
|    119 | handle . . . . in org.eclipse.jetty.server.handler.ScopedHandler
|    521 | handle         in org.eclipse.jetty.security.SecurityHandler
|    227 | doHandle . . . in org.eclipse.jetty.server.session.SessionHandler
|   1031 | doHandle       in org.eclipse.jetty.server.handler.ContextHandler
|    406 | doScope . . .  in org.eclipse.jetty.servlet.ServletHandler
|    186 | doScope        in org.eclipse.jetty.server.session.SessionHandler
|    965 | doScope . . .  in org.eclipse.jetty.server.handler.ContextHandler
|    117 | handle         in org.eclipse.jetty.server.handler.ScopedHandler
|    111 | handle . . . . in org.eclipse.jetty.server.handler.HandlerWrapper
|    345 | handle         in org.eclipse.jetty.server.Server
|    449 | handleRequest  in org.eclipse.jetty.server.AbstractHttpConnection
|    910 | headerComplete in org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler
|    634 | parseNext . .  in org.eclipse.jetty.http.HttpParser
|    230 | parseAvailable in     ''
|     76 | handle . . . . in org.eclipse.jetty.server.AsyncHttpConnection
|    609 | handle         in org.eclipse.jetty.io.nio.SelectChannelEndPoint
|     45 | run . . . . .  in org.eclipse.jetty.io.nio.SelectChannelEndPoint$1
|    599 | runJob         in org.eclipse.jetty.util.thread.QueuedThreadPool
|    534 | run . . . . .  in org.eclipse.jetty.util.thread.QueuedThreadPool$3
^    722 | run            in java.lang.Thread
2012-11-17 18:13:01,804 [qtp23117860-47 - /pbs/g-eventsbus/eventsbus?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=1.1&X-Atmosphere-Transport=sse&X-Atmosphere-TrackMessageSize=true&X-Cache-Date=0&topics=eventsbus%2CsavedTodo] DEBUG server.Server  - RESPONSE /pbs/g-eventsbus/eventsbus  200
2012-11-17 18:13:01,805 [qtp23117860-47] DEBUG http.HttpParser  - filled 0/0
2012-11-17 18:13:06,428 [qtp23117860-45] DEBUG nio.ChannelEndPoint  - Exception while filling
Message: Connection reset by peer
    Line | Method
->>  230 | fill           in org.eclipse.jetty.io.nio.ChannelEndPoint
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    309 | fill           in org.eclipse.jetty.io.nio.SelectChannelEndPoint
|   1038 | fill . . . . . in org.eclipse.jetty.http.HttpParser
|    276 | parseNext      in     ''
|    230 | parseAvailable in     ''
|     76 | handle         in org.eclipse.jetty.server.AsyncHttpConnection
|    609 | handle . . . . in org.eclipse.jetty.io.nio.SelectChannelEndPoint
|     45 | run            in org.eclipse.jetty.io.nio.SelectChannelEndPoint$1
|    599 | runJob . . . . in org.eclipse.jetty.util.thread.QueuedThreadPool
|    534 | run            in org.eclipse.jetty.util.thread.QueuedThreadPool$3
^    722 | run . . . . .  in java.lang.Thread

javascript logs.

Unexpected response code: 501 :8080:1
Websocket closed, reason: Connection was closed abnormally (that is, with no close frame being sent). jquery.atmosphere.js:2390
Websocket closed, wasClean: false jquery.atmosphere.js:2390
Websocket failed. Downgrading to Comet and resending jquery.atmosphere.js:2390
WebSocket is closed before the connection is established. :8080:1
Websocket failed. Downgrading to Comet and resending {"topic":"saveTodo","body":{"hello":"World"}} 

How to test event()?

Hi,

I am writing Spock test and wondering how to verify an event was fired. Can someone please provide an example?

Thanks

something fails deploying in AppFog

Hello!

In my computer all works fine, but when deploying on AppFog i get this error. Dunno if an AppFog issue, or grails configuration problem, or grails-events-push,... Thanks!

2013-01-02 00:08:41,819 [main] ERROR cpr.AtmosphereFramework - Failed to initialize Atmosphere Framework
java.lang.NoClassDefFoundError: org/grails/plugin/platform/events/push/EventsPushHandler$1
at org.grails.plugin.platform.events.push.EventsPushHandler.init(EventsPushHandler.java:108)
at org.atmosphere.util.AtmosphereFilterChain.init(AtmosphereFilterChain.java:125)
...
Caused by: java.lang.ClassNotFoundException: org.grails.plugin.platform.events.push.EventsPushHandler$1
... 9 more
java.io.FileNotFoundException: /var/vcap.local/dea/apps/grooscript-0-0613fa7183e2ca45eae953304f9817cd/tomcat/../tomcat.state (Too many open files)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(Unknown Source)
at java.io.FileOutputStream.(Unknown Source)
at java.io.PrintWriter.(Unknown Source)
at com.vmware.appcloud.tomcat.AppCloudLifecycleListener.handleNotification(A

Could receive a byte data from send event?

Hello.

I'm developing a application that uses this plugin and I'm trying to send data bytes in the "send" event, from the browser. I want to send bytes data from a webcam, something like that:

var data = canvas.get()[0].toDataURL('image/jpeg', 1.0);
newblob = dataURItoBlob(data);
grailsEvents.send($('#to').val(), data);

I read that is possible in original implementation of Websockets, send String data or Byte data, Is it possible in this plugin?

Thank you very much.

Kind Regards,
Miguel.

Tomcat 7 crash

No idea why my application, which makes use of this plugin, is bringing down Tomcat (v7) whenever client-side javascript code sends push request to server-side event topic. I read some discussion on google group and someone suggested that increasing heap size of the jvm will sort out the problem but it doesnt work in my case. Has anyone encountered this issue?

BTW, here is an excerpt from the jvm dump file which indicates the culprit is Atmosphere but I have no idea to workaround this:

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.apache.tomcat.jni.Socket.send(J[BII)I+0
j org.apache.coyote.http11.upgrade.UpgradeAprProcessor.write(I)V+14
j org.apache.coyote.http11.upgrade.UpgradeOutbound.write(I)V+5
j org.apache.catalina.websocket.WsOutbound.doWriteBytes(Ljava/nio/ByteBuffer;Z)V+45
j org.apache.catalina.websocket.WsOutbound.doWriteText(Ljava/nio/CharBuffer;Z)V+65
j org.apache.catalina.websocket.WsOutbound.writeTextMessage(Ljava/nio/CharBuffer;)V+44
j org.atmosphere.container.version.TomcatWebSocket.write(Lorg/atmosphere/cpr/AtmosphereResponse;Ljava/lang/String;)Lorg/atmosphere/websocket/WebSocket;+82
j org.atmosphere.container.version.TomcatWebSocket.write(Lorg/atmosphere/cpr/AtmosphereResponse;Ljava/lang/String;)Lorg/atmosphere/cpr/AsyncIOWriter;+3
j org.atmosphere.cpr.AtmosphereResponse$2.write(Ljava/lang/String;)V+43
j org.atmosphere.handler.AbstractReflectorAtmosphereHandler.onStateChange(Lorg/atmosphere/cpr/AtmosphereResourceEvent;)V+315
j org.atmosphere.cpr.DefaultBroadcaster.broadcast(Lorg/atmosphere/cpr/AtmosphereResource;Lorg/atmosphere/cpr/AtmosphereResourceEvent;)V+7
j org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(Lorg/atmosphere/cpr/DefaultBroadcaster$AsyncWriteToken;)V+270
j org.atmosphere.cpr.DefaultBroadcaster$3.run()V+88
j java.util.concurrent.Executors$RunnableAdapter.call()Ljava/lang/Object;+4
j java.util.concurrent.FutureTask$Sync.innerRun()V+30
j java.util.concurrent.FutureTask.run()V+4
j java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Ljava/lang/Runnable;)V+59
j java.util.concurrent.ThreadPoolExecutor$Worker.run()V+28
j java.lang.Thread.run()V+11

JavaScript event handler is somehow invoked twice

After upgrading to 1.0.M2-SNAPSHOT, my event handler on a particular topic was surprisingly executed twice whenever an event occurs on the topic. Since I noticed there is a significant change in grailsEvents.js between version 1.0.M1-SNAPSHOT and 1.0.M2-SNAPSHOT, I tried to configure grails to use the grailsEvent.js copied from the former. Surprisingly, my event handler is now called only once per event. So i am suspecting that there is a bug in the current version of grailsEvents.js. Has anyone come across this issue?

Triggering server-side event as described does not work

Hi,

following the readme I tried triggering server side events in a service using event('savedTodo', data).
When debug is enabled you can see the following log-entry (which should be level WARN I guess :) ):
2012-08-17 09:32:58,582 [grailsTopicExecutor-10] DEBUG registry.DefaultEventsRegistry - Failing call to class MyService.saveTodo with args {hello=World, moreData=There we go....} : java.lang.reflect.InvocationTargetException

It starts working when I use event('savedTodo', data, {}) (with a closure-callback as third parameter).

In IE8 event listening is not working properly

Hi
I am trying to use events-push plugin on IE8. In chrome it is working fine.
Below is the code how it looks like

someView.gsp

<r:script>
$(document).ready(function () {

    var grailsEvents = new grails.Events("http://localhost:8080",{shared:true,logLevel:'debug', maxRequest:70, transport: 'websocket'});
    grailsEvents.on('myEvent'+myUserId, function (data) {
        alert ("Testing data : "+data)
    });
});

/r:script

someController.groovy

def myNewEvent() {
event (for:'browser', topic:'myEvent'+userId, data:new JSONObject(jsonEventObj.content),fork:false)
}

someService.groovy

def myNewEventService() {
event (for:'browser', topic:'myEvent'+userId, data:new JSONObject(jsonEventObj.content),fork:false)
....
// event triggers are called in multiple places.
}

When the events are triggered IE8 sometimes gets last 2 events or the 1st event message or sometimes nothing. Is there a parameter that can specify listen for event every time. Because the same code works fine in chrome but it is not in IE8.

browserFilter not working when namespace is 'browser'

I have 2 events configured:

import org.atmosphere.cpr.AtmosphereRequest
import org.grails.plugin.platform.events.EventMessage

def eventsSecurityService = ctx.eventsSecurityService

events = {
    'message'   namespace='browser', browserFilter: { EventMessage msg, AtmosphereRequest request ->
        eventsSecurityService.checkPermission(msg, request)
    }
    'message-*' browser:true, nambrowserFilter: { EventMessage msg, AtmosphereRequest request ->
        eventsSecurityService.checkPermission(msg, request)
    }
}

where the eventsSecurityService is:

import org.atmosphere.cpr.AtmosphereRequest
import org.grails.plugin.platform.events.EventMessage

class EventsSecurityService {

    Boolean checkPermission(EventMessage msg, AtmosphereRequest request) {
        log.info "checking permission on ${msg?.data}"
        false
    }
}

when I raise an event from javascript using:

var grailsEvents = new grails.Events(grails_root);
grailsEvents.send("message", {"context": "foo", "text": "my message"});

The listener receives the message without being filtered by checkPermission, but events raised by the grails application backend are filtered as expected.

Dependency with Atmosphere-1.1.0-SNAPSHOT failing

Hi,

recompiling my grails application the following error is shown:

https://oss.sonatype.org/content/repositories/snapshots/org/atmosphere/atmosphere-runtime/1.1.0-SNAPSHOT/atmosphere-runtime-1.1.0-20130507.181108-166.jar

https://oss.sonatype.org/content/repositories/snapshots/org/atmosphere/atmosphere-runtime/1.1.0-SNAPSHOT/atmosphere-runtime-1.1.0-SNAPSHOT.jar

    ::::::::::::::::::::::::::::::::::::::::::::::

    ::          UNRESOLVED DEPENDENCIES         ::

    ::::::::::::::::::::::::::::::::::::::::::::::

    :: org.atmosphere#atmosphere-runtime;1.1.0-SNAPSHOT: not found

    ::::::::::::::::::::::::::::::::::::::::::::::

BuildConfig.groovy contains the entry mavenRepo "https://oss.sonatype.org/content/repositories/snapshots/".
None of the above mentioned jar-files are in the repository.
a) Is there some errors in the maven-metadata.xml?
b) It is possible to point the plugin to a stable atomosphere version?

Regards

  • Marco

user aware events

Stephane,

I'm hoping you can point me in the right direction. I like this plugin, and your grailsToDo example, but I have a little hurdle in applying it to my own use cases.

Let's take the grailsTodo example. In this example every client connected to the server is going to have every new todo pushed out to it. Now let's say, you enhanced the todo app so that it allowed users to login, and view just their todos. In this scenario, one wouldn't want all new todos broadcast to all clients, only those todos that are owned by the relevant user. Do you know how this could be done with your fine plugin ?

Thanks in advance,
Eamonn

Problems subscribing to multiple topics in rapid succession

I have an app where some web pages need to subscribe to up to 5 separate topics using long polling. Calling grails.Events.on() 5 times in a row triggers a series of 5 connections from the browser to the server. 4 of these are shut down before they have completed a subscription, due to the on() method calling unsubscribe(). The 5th connection correctly subscribes to all 5 topics.

In our case, the series of disconnects confuses network machines with connection pooling, resulting in data being sent down the wrong connection, potentially to a different user. Even without this issue, it's a bit inefficient to repeatedly connect each time we subscribe. I'm curious if anyone else has seen this behavior.

To fix this, I wrote a version of grails.Events that allows us to register topic handlers without connecting. Once all topics are registered, I call a connect() method.

Another potential fix would be to have a method that allows multiple handlers to be registered at once.

ERROR http11.Http11Protocol - Error reading request, ignored

I've written a simple example based on your documentation but I cannot get it to work.

I keep getting the following exception on the server side

| Error 2014-02-08 14:16:57,862 [http-bio-8080-exec-7] ERROR http11.Http11Protocol - Error reading request, ignored
Message: null
Line | Method
->> 339 | invokeWebSocketProtocol in org.atmosphere.websocket.DefaultWebSocketProcessor


| 83 | onTextData in org.atmosphere.container.TomcatWebSocketHandler
| 1145 | runWorker . . . . . . . in java.util.concurrent.ThreadPoolExecutor
| 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 744 | run . . . . . . . . . . in java.lang.Thread

Here are the files I changed from a standard grails 2.3.5 app:

MyEvents.groovy:

events = {
    'savedTodo' namespace: 'browser', browser:true // allows browser push on this topic
}

MyService.groovy

package sandbox

import grails.transaction.Transactional

@Transactional
class MyService {
    //will receive client events from 'saveTodo' topic
    @grails.events.Listener(namespace='browser') saveTodo(Map data) {
        println data
        //...
        event([namespace: 'browser', topic: 'savedTodo', data: data]) // will trigger registered browsers on 'savedTodo' topic
    }
}

and index.gsp

    <body>
        <r:require module="grailsEvents"/>
        <r:script>
            var grailsEvents = new grails.Events("http://localhost:8080/sandbox");
            //grailsEvents.send('saveTodo', data); //will send data to server topic 'saveTodo'
            //grailsEvents.on('savedTodo', function(data){...}); //will listen for server events on 'savedTodo' topic
        </r:script>
        <button onclick="grailsEvents.send('saveTodo', {'key1': 'value1', 'key2': 'value2'});">Hello World</button>
    </body>

Also, I set the following in my BuildConfig.groovy:

        mavenRepo "https://oss.sonatype.org/content/repositories/snapshots/"
        build ":tomcat:7.0.42"
        compile ":events-push:1.0.M7"

Client not receiving the event

I have the following code

events = {

"processed" namespace: 'browser', browser: true

}

code in the service
def map= [:]
map.json = data
event('processed',map,{})

code on the client

var grailsEvents = new grails.Events('${createLink(uri: '')}', {transport:'sse'});
grailsEvents.on('processed', function(data){
alert("received Push")
});

I don't see anything on the client.

Documentation update

Update the documentation to use the grails-events plugin instead of grails-platform-core (in case that is intended to use grails-events).
Migration docs would be appreciated as well.

long polling race conditions / missing events

Ok, so not necessarily within the scope of this plugin, but something to consider for sure.

When two events were triggered from the one action, only one would find its way to the server. Lets take objects SupportTicket and Comment. Now lets say I create a comment which simultaneously closes the Ticket. This could trigger one event for the new Comment, and another event for the updated Ticket. I only ever saw one of these two events, and which one the client saw was indeterminate. I believe the reason to be that moment where the server sends its response for the first event, the second event fires, but because there is no request waiting for the second event, it is not broadcast to the client. Delaying one of the events does seem to solve the issue, but probably not an ideal solution.

internal server error (500) when js tries to connect to GrailsMeteorServlet

Hi,

Im trying to use the events-push plugin, i was able to register my custom events, i can see them at the platform/events url.
but on the client side i see the following error, caused bu the jquery-atmosphere.js
GET http://localhost:9090/helloworld/g-eventsbus/eventsbus?_=1342171108737 500 (Internal Server Error)

I checked the web.xml and found:

  <servlet>
    <description>MeteorServlet</description>
    <servlet-name>MeteorServlet</servlet-name>
    <servlet-class>org.grails.plugin.platform.events.push.GrailsMeteorServlet</servlet-class>
  ...

  <servlet-mapping>
    <servlet-name>MeteorServlet</servlet-name>
    <url-pattern>/g-eventsbus/*</url-pattern>
  </servlet-mapping>

any tips what is causing the error 500?
btw the grailsTodos sample has the same error 500.

cheers,
lalyos

Update the demo

The reason why I'm going to try another plugin now is because I can't get the demo to work. First of all, it is annoying that it targets grails 3.0.0-snapshot. Also, the version of grails-events-push is events-push:1.0.0.BUILD-SNAPSHOT in stead of a proper version like events-push:1.0.M7. I now get "Cannot find the class file for org.hamcrest.Matcher. Fix the build path then try building this project" and I'm giving up now.

Bug when using this plugin and atmosphere plugin together

Hi,

It seems that this plugin will cause the malfunction of atmosphere plugin......

I have a chat application works well before install it.

After the installation, the chat application reconnecting multiple times when every message is sent. And finally stopped because max reconnection number exceeded....

Thank you.

Alex

browser:true not working as expected!

When I define a given event using browser:true it doesn't accept events from the browser.

events = {    
    'savedTodo' browser:true // allows browser push on this topic
}

But when I replace browser:true with namespace: 'browser' it works. Is this the expected behavior?

events = {    
    'savedTodo' namespace: 'browser' // allows browser push on this topic
}

New release request.

Hi Stephane,

I'm getting close to using this plugin in a production environment. For me M2 doesn't work, but M2-Snapshot does. I wonder if it possible to stamp the current state as M3 (or whatever you deem best...) and publish to the public plugin repo.

Thanks!

Dependencies with org.atmosphere:atmosphere-runtime:1.1.0-SNAPSHOT failed

When start the application, with the added plugin in BuliConfig "compile ":events-push:1.0.M7"", it's fail when try to compile it.

This is te message:

http://repo1.maven.org/maven2/org/atmosphere/atmosphere-runtime/1.1.0-SNAPSHOT/atmosphere-runtime-1.1.0-SNAPSHOT.jar

    ::::::::::::::::::::::::::::::::::::::::::::::

    ::          UNRESOLVED DEPENDENCIES         ::

    ::::::::::::::::::::::::::::::::::::::::::::::

    :: org.atmosphere#atmosphere-runtime;1.1.0-SNAPSHOT: not found

    ::::::::::::::::::::::::::::::::::::::::::::::

I tried to deploy application to probe the plugin, with the only dependencie on this plugin ang Grails 2.2.0 version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.