I created a service in my cuba application middleware, this service uses AWS IOT to receive messages over mqtt.
With a @PostCostruct method I established the persistent connection with AWS iot and declared an handler method for the incoming mqtt messages.
When a message arrives I need to store it in a persistent entity to save informations on DB, but when I try to persist the entity using
I get a SecurityException:"No security context bound to the current thread"
**Is it possibile to exec login and get security context from a middleware service bean? **
I need to store entities from the middleware without using API Rest / UI