smaldini / grails-events-si Goto Github PK
View Code? Open in Web Editor NEWEvents API - Spring Integration plugin
Events API - Spring Integration plugin
I'm trying to get the events-push plugin up and running - without any success so far..
On application-startup, I get the following exception. Looking at SpringIntegrationEventsRegistry
and GrailsPublishSubscribeChannel
reveals, that there is indeed only a setter for interceptors
(instead of interceptor
) for GrailsPublishSubscribeChannel
, accepting a List of ChannelInterceptors
.
Am I missing something obvious here?
| Error 2012-08-16 14:45:20,761 [http-bio-8080-exec-9] ERROR [localhost].[/myApp] - StandardWrapper.Throwable
Message: Error creating bean with name 'savedTodo': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'interceptor' of bean class [org.grails.plugin.platform.events.registry.SpringIntegrationEventsRegistry$GrailsPublishSubscribeChannel]: Bean property 'interceptor' is not writable or has an invalid setter method. Did you mean 'interceptors'?
Line | Method
->> 1396 | applyPropertyValues in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1118 | populateBean in ''
| 517 | doCreateBean . . . . . . . . in ''
| 130 | doCreateBean in org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory
| 456 | createBean . . . . . . . . . in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
| 294 | getObject in org.springframework.beans.factory.support.AbstractBeanFactory$1
| 225 | getSingleton . . . . . . . . in org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
| 291 | doGetBean in org.springframework.beans.factory.support.AbstractBeanFactory
| 197 | getBean . . . . . . . . . . in ''
| 1097 | getBean in org.springframework.context.support.AbstractApplicationContext
| 126 | createChannel . . . . . . . in org.grails.plugin.platform.events.registry.SpringIntegrationEventsRegistry
| 210 | initServiceActivatingHandler in ''
| 141 | registerHandler . . . . . . in ''
| 238 | on in ''
| 172 | registerTopics . . . . . . . in org.grails.plugin.platform.events.push.EventsPushHandler
Hi
I get :
C:\Users\User\.grails\2.1.0\projects\ebtest1\plugins\events-si-1.0.M2\src\java\org\grails\plugin\platform\events\publisher\SpringIntegrationEventsPublisher.java:44: org.grails.plugin.platform.events.publisher.SpringIntegrationEventsPublisher is not abstract and does not override abstract method eventAsync(org.grails.plugin.platform.events.EventMessage,java.util.Map<java.lang.String,java.lang.Object>) in org.grails.plugin.platform.events.publisher.EventsPublisher
public class SpringIntegrationEventsPublisher implements EventsPublisher {
^
1 error
1 error
When I try to compile using platform-core M6 and M4, works fine when using M2
I'm using M2 of events-si .
Cheers,
micke
Hi Stephane,
Just in case you don't know, the snapshot is currently broken due to changes to the platform-core. I'm seeing the following:
SpringIntegrationEventsPublisher is not abstract and does not override abstract method
eventAsync(org.grails.plugin.platform.events.EventMessage,java.util.Map<java.lang.String,java.lang.Object>) in
org.grails.plugin.platform.events.publisher.EventsPublisher
Stephane, please forgive my ignorance. I have seen similar code to what is in your README to what is in the grails-platform-core by Marc Palmer.
Can you share any insight on the relationship between the two ?
Also, I'm assuming an external MQ like RabbitMQ is not required. Is that the case ? And if so, why did you use RabbitMQ in that fantastic ToDos Demo you made ?
Thanks in advance!
Eamonn
just adding this grails-events-si plugin to my buildConfig, I was seeing errors like the following:
cannot find symbol
symbol : class ListenerId
location: class org.grails.plugin.platform.events.registry.SpringIntegrationEventsRegistry
ListenerId listener = ListenerId.build(topic, callback);
When I deliberately added the platform core plugin to my app, this issues disappeared. It could just be a dependency on the wrong version:
compile ":platform-core:1.0.M1"
It is probably something I'm doing wrong, but here it is:
I have in my BuildConfig:
compile ":events-si:1.0.M2-SNAPSHOT"
compile ":platform-core:1.0.M2f-SNAPSHOT"
I have in a Service:
@Listener('beforeInsert')
def handleInvoiceCreated(Invoice invoice){
println "Invoice created $invoice"
}
I have a domain class:
class Invoice {
def beforeInsert() {
println "object before insert"
}
}
Apon persisting a new invoice, the listener in the domain class is executed, but the listener in the service is not.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.