Yes, thanks.
I was hoping there is some standardized/recommended way of storing global application state – eg: like session info, or a connection to a database.
In the end I resorted to creating a separate jar, added it to userlib in the Mendix app.
This jar contains:
- all protoc-generated java code in a package
- another package containing boilerplate code, which, for now, only creates and returns the gRPC channel/stub
You probably need to use java to achieve this. Look at the following tutorial – https://docs.mendix.com/howto/logic-business-rules/extending-your-application-with-custom-java