<feed xmlns='http://www.w3.org/2005/Atom'>
<title>guess-market/lib/tomcat, branch 3.0</title>
<subtitle>definitely not polymarket
</subtitle>
<id>https://git.sartin.in/guess-market/atom?h=3.0</id>
<link rel='self' href='https://git.sartin.in/guess-market/atom?h=3.0'/>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/'/>
<updated>2026-10-09T09:55:40Z</updated>
<entry>
<title>server: add Tomcat webapp module with shared engine and CORS</title>
<updated>2026-10-09T09:55:40Z</updated>
<author>
<name>Kostya</name>
<email>mail@sartin.in</email>
</author>
<published>2026-10-09T09:55:16Z</published>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/commit/?id=9a62e94261e6531c6b60d296322e0cef2a5b21e1'/>
<id>urn:sha1:9a62e94261e6531c6b60d296322e0cef2a5b21e1</id>
<content type='text'>

Exercise 3 moves the market behind a Tomcat server that the desktop
and browser clients share. Add a server module, registered in the
build scripts, holding the pieces every later endpoint builds on:

- ServerEngine wires one in-memory market (repositories, ledger,
  trading pipeline, v3 upload loader) and lives in the servlet context
  for the webapp's lifetime. Its catalog refuses path-based loading,
  so events can only arrive through uploaded streams and the server
  never reads or writes files.
- EngineBootstrap builds that engine when the webapp deploys.
- CorsFilter answers preflights and echoes the caller's Origin with
  Allow-Credentials, which the browser client needs to send its
  session cookie from another origin. With usernames as the only
  login, echoing any origin exposes nothing a page couldn't get by
  logging in itself.
- /api/health reports that the engine is up.

Vendor tomcat-juli 10.1.26 next to the other Tomcat jars. It ships in
Tomcat's bin/ rather than lib/, and embedded Tomcat cannot start
without it. A test deploys the module into embedded Tomcat, so
annotation scanning, the health check and CORS are checked against a
real container.


</content>
</entry>
<entry>
<title>flatten modules to repo root, vendor deps, repair Eclipse build paths</title>
<updated>2026-08-09T11:46:25Z</updated>
<author>
<name>Kostya</name>
<email>mail@sartin.in</email>
</author>
<published>2026-08-09T11:46:25Z</published>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/commit/?id=34deee1c5ef2df5ba2514f77ec4dfd4a684a9d13'/>
<id>urn:sha1:34deee1c5ef2df5ba2514f77ec4dfd4a684a9d13</id>
<content type='text'>
Move api, engine, ui-console and ui-desktop out of modules/ up to the
repo root and drop the empty exception project (GuessMarketException now
lives in api).

Vendor gson, jaxb, okhttp, openjfx and tomcat under lib/, and group the
JUnit standalone jar into lib/junit/ alongside them.

Rewrite every .classpath: drop the copy-pasted optional="true" that was
masking real build path errors, point the library entries at ../lib/,
and put the JUnit jar on the test source folders so the placeholder
AppTest classes compile.

ui-desktop: take the JavaFX jars off the modulepath (there is no
module-info.java, so module="true" left the packages unresolvable) and
add a Launcher that calls Application.launch, avoiding the "JavaFX
runtime components are missing" check without VM arguments.

engine: add LocalGuessMarketService and the GuessMarketContext provider
interface, and give GuessMarketException the no-arg and cause
constructors they need.
</content>
</entry>
</feed>
