Search code examples
javaspark-java

How to manage transactions decalaratively in sparkjava?


I am exploring sparkjava and I cant see the Tranasaction manager for sparkjava especially declaratively. Spring has a declarative transaction manager. Is there something similar in Spark? Or it is always one thread at a time of thing?


Solution

  • Spark is a Web engine, no more, no less.

    Spring is a full fledged DI container with integrations for whatever exists in the Java world.

    If you want to manage transactions in a Spark Web application, you'll have to do it yourself, e.g with a before/after pair. You won't find a declarative way to automagically have this like in Spring.