eventuate-tram / eventuate-tram-sagas

Sagas for microservices
Other
994 stars 225 forks source link

Make sagas work with devTools #30

Open cer opened 4 years ago

cer commented 4 years ago

Problem:

This is the likely solution: https://github.com/spring-projects/spring-boot/issues/3805

Eventuate libraries (including JSonMapper) need to use ThreadLocal.getThread().getContextClassLoader()

dartartem commented 4 years ago

@cer Chris, could you please clarify, should I jast replace explicit classloader usage by ThreadLocal.getThread().getContextClassLoader(), or there is something else?

Btw, I found only these entries:

https://github.com/dartartem/eventuate-tram-sagas/blob/master/eventuate-tram-sagas-orchestration/src/main/java/io/eventuate/tram/sagas/orchestration/SagaDataSerde.java#L18

https://github.com/eventuate-local/eventuate-local/blob/master/eventuate-client-java-common-impl/src/main/java/io/eventuate/javaclient/commonimpl/AggregateCrudMapping.java#L49

https://github.com/eventuate-foundation/eventuate-common/blob/master/eventuate-common-json-mapper/src/main/java/io/eventuate/common/json/mapper/JSonMapper.java#L43

cer commented 4 years ago

AFAIK as I know that's all that's required. I'd first try to reproduce the problem by including Devtools and then verify that the change fixes the problem.

dartartem commented 4 years ago

Got it, thank you