Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Created May 31, 2023 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdamBien/62791e98ed40d1d2b13801e3e717a949 to your computer and use it in GitHub Desktop.
Save AdamBien/62791e98ed40d1d2b13801e3e717a949 to your computer and use it in GitHub Desktop.
112thAirhacksQ&A.md
@ulrichcech
Copy link

Hallo Adam,
in your Vimeo-Video-Course "Microservices", you describe the opportunity to introduce ManagedExecutorService in combination with @suspended and AsyncResponse to execute the business code in another thread (execution-thread).
The problem here is, that within this execution-thread from the ExecutorService, all/most RequestScroped beans are not available and throw a ContextNotActiveException (especially all injected objects which are HTTP-Request-aware like JsonWebToken, Principal, HttpSevletRequest and so on)... which is understandable because the injected beans are proxies and they are bound to the Http-thread.
Is there a more elegant way to access these "injected" beans instead of fetching all relevant informations from these beans and pass these concrete values to the execution-thread as method parameters?
I also found/tried this annotation (javax.enterprise.context.control.ActivateRequestContext) at the executed method, which is called from the execution-thread, but this does not change anything.
Many thanks in advance, Ulrich

@AdamBien
Copy link
Author

I want to deploy my angular application automaticly to aws lambda. Now i search a good instruction to do this. Does everyone known a good one?
someone is better
from: https://discord.gg/airhacks / https://discord.com/channels/1042522430876438549/1042522430876438552/1124318818043437067

@AdamBien
Copy link
Author

AdamBien commented Jul 3, 2023

The airhacks.tv time machine. Questions from the 12th episode: https://www.adam-bien.com/roller/abien/entry/rest_tx_clustering_dead_soap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment