financer-web-client has a hard dependency on push-service #8

Closed
opened 2020-12-18 00:46:02 +01:00 by MK13 · 4 comments
MK13 commented 2020-12-18 00:46:02 +01:00 (Migrated from 77zzcx7.de)

Start of financer-web-client fails if push-service is not running/reachable. This should be a soft dependency so push-service is not required to run financer-web-client.

Start of financer-web-client fails if push-service is not running/reachable. This should be a soft dependency so push-service is not required to run financer-web-client.
MK13 commented 2020-12-23 00:41:34 +01:00 (Migrated from 77zzcx7.de)

To solve this following things should be done:

  • AccountController: set subscriptionService annotation @Autowired to @Autowired(required = false)
  • Add null check to if in sentTestNotification()

static/javascript/init.js is fine, will soft-fail with a log in browser console.

To solve this following things should be done: - AccountController: set `subscriptionService` annotation `@Autowired` to `@Autowired(required = false)` - Add null check to `if` in `sentTestNotification()` `static/javascript/init.js` is fine, will soft-fail with a log in browser console.
MK13 commented 2020-12-23 00:47:56 +01:00 (Migrated from 77zzcx7.de)

While at it, the typo in the method name could also be corrected: sent -> send

While at it, the typo in the method name could also be corrected: sent -> send
MK13 commented 2020-12-25 01:31:09 +01:00 (Migrated from 77zzcx7.de)

Solved by doing the previously mentioned change, which turned out to be not really relevant, and changing the packaging of the push-service-client-libs module to vanilla JAR AND removing the Spring Boot application class for that. This was required as in a standalone servlet container the push-service-client-libs Spring Boot application was always loaded before the financer-web-client application, which somehow broke the app contexts.

Solved by doing the previously mentioned change, which turned out to be not really relevant, and changing the packaging of the push-service-client-libs module to vanilla JAR _AND_ removing the Spring Boot application class for that. This was required as in a standalone servlet container the push-service-client-libs Spring Boot application was always loaded before the financer-web-client application, which somehow broke the app contexts.
MK13 commented 2021-01-16 18:34:00 +01:00 (Migrated from 77zzcx7.de)

Reopen because push-client is still required to build financer, which also should not be the case.

  • make dependency optional
  • Somehow make bean instantiation loosely-coupled, so if the push-client JAR is not on the CP it is just not instantiated -> Perhaps via Class.forName()
Reopen because push-client is still required to build financer, which also should not be the case. * make dependency optional * Somehow make bean instantiation loosely-coupled, so if the push-client JAR is not on the CP it is just not instantiated -> Perhaps via Class.forName()
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MK13/financer#8
No description provided.