kuujo / vertigo

Flow-based programming for the Vert.x application platform.
Apache License 2.0
155 stars 24 forks source link

Hooks not working. #37

Closed yngbldjr closed 10 years ago

yngbldjr commented 10 years ago

I can not get ComponentHook - specifically EventBusHook working since .7.

I see the fields getting set from the handleStart, but when the other methods are called, the fields are null. Here is a small snippet. I added the EventBusHook to the NetworkTest integration test.

java.lang.NullPointerException at net.kuujo.vertigo.hook.EventBusHook.handleSend(EventBusHook.java:52) at net.kuujo.vertigo.io.port.impl.DefaultOutputPort.triggerSend(DefaultOutputPort.java:382) at net.kuujo.vertigo.io.port.impl.DefaultOutputPort.send(DefaultOutputPort.java:400) at net.kuujo.vertigo.io.port.impl.DefaultOutputPort.send(DefaultOutputPort.java:53) at net.kuujo.vertigo.test.integration.NetworkTest$TestManyToOneSender.start(NetworkTest.java:197) at org.vertx.java.platform.Verticle.start(Verticle.java:82)

kuujo commented 10 years ago

Okay. Let me look at it when I get back to work in a few

Sent from my iPhone

On May 13, 2014, at 1:50 PM, Carter Youngblood notifications@github.com wrote:

I can not get ComponentHook - specifically EventBusHook working since .7.

I see the fields getting set from the handleStart, but when the other methods are called, the fields are null. Here is a small snippet. I added the EventBusHook to the NetworkTest integration test.

java.lang.NullPointerException at net.kuujo.vertigo.hook.EventBusHook.handleSend(EventBusHook.java:52) at net.kuujo.vertigo.io.port.impl.DefaultOutputPort.triggerSend(DefaultOutputPort.java:382) at net.kuujo.vertigo.io.port.impl.DefaultOutputPort.send(DefaultOutputPort.java:400) at net.kuujo.vertigo.io.port.impl.DefaultOutputPort.send(DefaultOutputPort.java:53) at net.kuujo.vertigo.test.integration.NetworkTest$TestManyToOneSender.start(NetworkTest.java:197) at org.vertx.java.platform.Verticle.start(Verticle.java:82)

— Reply to this email directly or view it on GitHub.

kuujo commented 10 years ago

Alright so the problem is with serialization. Vertigo 0.7 configurations are constantly changing as Vertigo synchronizes with other nodes in the cluster. The problem is that the component hook and IO hooks actually end up being two separate instances of the same class. The component hook is properly started, but handleStart is never called on the IO hook. I'm doing a little refactoring to make sure the same instance is used in the component and inputs and outputs.

On May 13, 2014, at 1:50 PM, Carter Youngblood notifications@github.com wrote:

I can not get ComponentHook - specifically EventBusHook working since .7.

I see the fields getting set from the handleStart, but when the other methods are called, the fields are null. Here is a small snippet. I added the EventBusHook to the NetworkTest integration test.

java.lang.NullPointerException at net.kuujo.vertigo.hook.EventBusHook.handleSend(EventBusHook.java:52) at net.kuujo.vertigo.io.port.impl.DefaultOutputPort.triggerSend(DefaultOutputPort.java:382) at net.kuujo.vertigo.io.port.impl.DefaultOutputPort.send(DefaultOutputPort.java:400) at net.kuujo.vertigo.io.port.impl.DefaultOutputPort.send(DefaultOutputPort.java:53) at net.kuujo.vertigo.test.integration.NetworkTest$TestManyToOneSender.start(NetworkTest.java:197) at org.vertx.java.platform.Verticle.start(Verticle.java:82)

— Reply to this email directly or view it on GitHub.

yngbldjr commented 10 years ago

Thanks, I'll give it a go in a few hours! Thanks for the quick response.

On Tuesday, May 13, 2014, Jordan Halterman notifications@github.com wrote:

Closed #37 https://github.com/kuujo/vertigo/issues/37 via 53a5ca9https://github.com/kuujo/vertigo/commit/53a5ca9f698d515c21b7482b320651bc24452a16 .

— Reply to this email directly or view it on GitHubhttps://github.com/kuujo/vertigo/issues/37#event-120812872 .

Carter Youngblood yngbldjr@gmail.com