0 votes
asked in MicroStream for Java by (1k points)
edited by

First of all, a Java Code Formater in the forum would be nice ;) 

I am still quite new to MicroStream. Going through the configuration. I tried setting up an enbedded storageManager with a path for the database and another path for the database backup:


EmbeddedStorageManager storageManager = EmbeddedStorageFoundation.New().




I was expecting this to work, but got following exception:

Exception in thread "main" one.microstream.exceptions.MissingFoundationPartException: Missing assembly part of type interface one.microstream.storage.types.EmbeddedStorageConnectionFoundation. 

at one.microstream.storage.types.EmbeddedStorageFoundation$Default.createConnectionFoundation(EmbeddedStorageFoundation.java:392)

at one.microstream.storage.types.EmbeddedStorageFoundation$Default.getConnectionFoundation(EmbeddedStorageFoundation.java:413)

at one.microstream.storage.types.EmbeddedStorageFoundation$Default.createEmbeddedStorageManager(EmbeddedStorageFoundation.java:574)

at one.microstream.storage.types.EmbeddedStorageFoundation.createEmbeddedStorageManager(EmbeddedStorageFoundation.java:102)

at ...

Shouldn't the remaining values fallback  to a default? Like a default connection foundation? Maybe I am still missing the point and have to continue in the documentation. I will be able to fix this I guess, but was wondering, why there is no default in this case.

Thanks in advance,


2 Answers

0 votes
answered by (580 points)
selected by
Best answer
I looked into this and found that you are right.

The EmbeddedStorageConnectionFoundation instance is created in the convenience method EmbeddedStorage#Foundation, but not on demand in the actual EmbeddedStorageFoundation instance. There might have been a reason for that in the past, but I can't find one for the current state of the code, so the instance should, indeed, be created on demand if missing.

Since this should take very little time to fully investigate and fix (or find a reason why), I have put this on the list for the next version.

Thank you for pointing it out.
0 votes
answered by (1k points)
OK, it seems Configuration.Default (as mentioned next in the documentation under "External Configuration" is what I was looking for. I guess the Foundation is too advanced for me to use it by now.
Notes: Every question must be a separate forum post. Headline: Formulate your question shortly and precisely. Thank you!
Powered by Question2Answer