We're planning an "REST"-Server and now have the problem, that we want different REST-Interfaces to share information.
As an example to make thing clearer
This SessionMaker checks if user and password are correct and returns sessiontoken if so (this works). It's supposed to store the token in the sessionMap so that DoThings can access it. But DoThings can't access that SessionMap instead, a new instance is created.
How can we have SessionMaker and DoThings share the same SessionMap-instance.
I have 3 ideas but don't know which are even applicable.
The only other question that I found, which deals with a similar situation is: Jersey REST Server: instantiating resource classes
You should use EJBs for this purpose.