Comments (8)
@RoadRunner120485 Sorry, my fault. This has been fixed/implemented in the PostgresJournalActor
.
git pull
and build, or get the latest binaries from Bintray; these are considered snapshots.
from xoom-symbio.
The default adapter is working. See the following test that uses Entity2
, which does not have a specific StateAdapter
registered.
Also note that although the StateAdapter
can now be defaulted (assuming that the state is of type TextState
) you must still register the store name:
from xoom-symbio.
But that now works just with the InMemoryStateStore
or does this work for other TextState
based stores too?
from xoom-symbio.
It should work for all. Can you please try it and let me know your results?
from xoom-symbio.
I've tested it with the PostgresJournalActor
and it does not work. If I skip registration of all Info
types containing the Adapters
the I'm getting a NPE from the lattice module:
vlingo/actors: DefaultSupervisorOverride: Failure of: Address[id=15, name=(none)]
vlingo/actors: java.lang.NullPointerException
at io.vlingo.lattice.model.sourcing.Sourced.restore(Sourced.java:353)
at io.vlingo.lattice.model.sourcing.Sourced.start(Sourced.java:78)
at io.vlingo.actors.LifeCycle.lambda$sendStart$0(LifeCycle.java:110)
at io.vlingo.actors.LocalMessage.internalDeliver(LocalMessage.java:116)
at io.vlingo.actors.LocalMessage.deliver(LocalMessage.java:49)
at io.vlingo.actors.plugin.mailbox.concurrentqueue.ConcurrentQueueMailbox.run(ConcurrentQueueMailbox.java:96)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
When I register an Info
for my test aggregate without any Adapter
I'm getting this Exception:
at io.vlingo.lattice.model.sourcing.Sourced.lambda$appendAllResultedIn$3(Sourced.java:307)
at io.vlingo.common.Failure.otherwise(Failure.java:45)
at io.vlingo.lattice.model.sourcing.Sourced.appendAllResultedIn(Sourced.java:303)
at io.vlingo.symbio.store.journal.JournalAppendResultInterest__Proxy.lambda$appendAllResultedIn$1(JournalAppendResultInterest__Proxy.java:40)
at io.vlingo.actors.LocalMessage.internalDeliver(LocalMessage.java:116)
at io.vlingo.actors.LocalMessage.deliver(LocalMessage.java:49)
at io.vlingo.actors.ResumingMailbox.run(ResumingMailbox.java:19)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: io.vlingo.symbio.store.StorageException: Adapter not registrered for: de.test.TestCreated
at io.vlingo.symbio.store.journal.jdbc.postgres.PostgresJournalActor.appendAllResultedInFailure(PostgresJournalActor.java:299)
at io.vlingo.symbio.store.journal.jdbc.postgres.PostgresJournalActor.lambda$appendAllWith$5(PostgresJournalActor.java:128)
at io.vlingo.symbio.store.journal.jdbc.postgres.PostgresJournalActor.asEntry(PostgresJournalActor.java:175)
at io.vlingo.symbio.store.journal.jdbc.postgres.PostgresJournalActor.asEntries(PostgresJournalActor.java:163)
at io.vlingo.symbio.store.journal.jdbc.postgres.PostgresJournalActor.appendAllWith(PostgresJournalActor.java:129)
at io.vlingo.symbio.store.journal.Journal__Proxy.lambda$appendAllWith$2(Journal__Proxy.java:57)
at io.vlingo.actors.LocalMessage.internalDeliver(LocalMessage.java:116)
at io.vlingo.actors.LocalMessage.deliver(LocalMessage.java:49)
at io.vlingo.actors.plugin.mailbox.concurrentqueue.ConcurrentQueueMailbox.run(ConcurrentQueueMailbox.java:96)
... 3 more
Caused by: java.lang.IllegalStateException: Adapter not registrered for: de.test.TestCreated
at io.vlingo.symbio.store.journal.jdbc.postgres.PostgresJournalActor.adapter(PostgresJournalActor.java:157)
at io.vlingo.symbio.store.journal.jdbc.postgres.PostgresJournalActor.asEntry(PostgresJournalActor.java:171)
... 9 more
I will add a StateStore
version to my test but for a Journal it does seem work. But I assume that the changes you made are not intended to work with a Journal
from xoom-symbio.
@VaughnVernon it is working now. I just need to register an empty Info
in the SourceTypeRegistry
but then it works without providing any custom Adapter
. I like the AdapterProvider
s as they allow to mix up custom and default adapter implementations.
from xoom-symbio.
@RoadRunner120485 Great, I am glad it works and that you like how it works! The SourceTypeRegistry
is necessary to tell the Sourced
entity which Journal
it uses even if you don't register any adapters.
Is it ok to close this issue?
from xoom-symbio.
Closing as fixed.
from xoom-symbio.
Related Issues (7)
- Implement Storage for DynamoDB HOT 2
- Need Clarity Around SourcedTypeRegistry and Sourced<T> and Defaulted Adapters HOT 2
- The mapping registration should be moved outside ObjectStore HOT 2
- Make State Data Optional HOT 1
- JDBCJournalActor can no longer be initialised with the Journal factory
- Move Concrete Implementations to Implementation-Specific Repositories HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xoom-symbio.