Context API
Passing request and context information between different layers in applications could be needed in most applications. For example, context information could include:
-
Current User
-
Current System
-
Current Module
-
Current View
-
Current Action
-
Remote Machine/Port
-
App Machine/Port
-
Current Controller
-
Current session information
And others.
In JK-Framework, the context information will be automatically populated on each request in JKDefaultFilter
, and
could be accessed using;
JKContextFactory.getCurrentContext().getXXX();
Context information are also shared across microservices using JKFramework-ServiceClient
project.