Replies: 2 comments
-
|
Hi, Regarding the StorageExceptionInitialization: I also identified issue in “TrainStorage::store”: |
Beta Was this translation helpful? Give feedback.
-
|
Some findings:
public class TrainStorage {
private final EmbeddedStorageManager storageManager;
public final TrainDepot depot;
public TrainStorage() {
this.storageManager = EmbeddedStorage.start(Path.of("traindepot"));
System.out.println("Storage initialized");
if (this.storageManager.root() != null) {
this.depot = (TrainDepot) this.storageManager.root();
System.out.println("Loaded existing storage");
System.out.println("Current trains: " + this.depot.trains.size());
} else {
System.out.println("No existing storage found, starting fresh");
this.depot = new TrainDepot();
this.storageManager.setRoot(this.depot);
this.storageManager.storeRoot();
}
}
...
}
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Sample needed
I'm looking for a very basic example how to use EclipseStore with Quarkus. My own attempts turned out futile, I only learned new Exception classes:
What I tried
@ApplicationScopedand@InjectenumSingleton (public enum Factory() { INSTANCE; /* ... */ })I must be missing something substantial
Advice is very much appreciated!
Reproducer: https://github.com/Stwissel/quarkus-eclipsestore
Beta Was this translation helpful? Give feedback.
All reactions