vlingo / xoom-symbio

The VLINGO XOOM platform SDK delivering Reactive storage that is scalable, high-throughput, and resilient for CQRS, Event Sourcing, Key-Value, and Objects used by services and applications.
https://vlingo.io
Mozilla Public License 2.0
40 stars 9 forks source link

JDBCJournalActor can no longer be initialised with the Journal factory #25

Open jakzal opened 3 years ago

jakzal commented 3 years ago

I stumbled upon this issue while upgrading from vlingo 1.3.0 to 1.4.0.

Since https://github.com/vlingo/vlingo-symbio-jdbc/pull/43, the Journal factory no longer works:

Journal.using(stage, JDBCJournalActor.class, dispatcher, configuration);

The implementation assumes that dispatcher is part of argument list:

static <A extends Actor, T, RS extends State<?>> Journal<T> using(final Stage stage, final Class<A> implementor,
          final Dispatcher<Dispatchable<Entry<T>,RS>> dispatcher, final Object...additional) {
    return additional.length == 0 ?
             stage.actorFor(Journal.class, implementor, dispatcher) :
             stage.actorFor(Journal.class, implementor, dispatcher, additional);
  }

While it is still valid for some implementations (like InMemoryJournalActor) it is no longer the case for JDBCJournalActor.

/cc @pflueras