Trying to use CDI Event Bus like Guava's EventBus, but not working
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


CDI Event Bus Problem

Trying to use CDI Event Bus like Guava’s EventBus:

	@Inject Event<Object> eventBus;
	@Schedule(second="*/3", minute="*", hour="*", dayOfWeek="*", persistent=false)
	public void sendSomething() {"Send something!"); Booking(5.0)); Notify(new Date()));

Problem is, the event handler is never called:

	public void logBooking(@Observes Booking booking) {"Got booking " + booking);

Because the EventBus implementation is Event<Object>, and Object as declared is
not assignable to Booking.

However, the object passed to fire() is a Booking, so the observer is actually able able
to handle it.

So it’s impossible to this:

@Inject Event<Document> eventBus;

and expect this to work: SpreadsheetDocument());

There’s no way to specialize the event? (other than explicitly typing the event, hence limiting
ability to fire events dynamically.)