How the Bean Invoker Factory works

Put your short description here; used for first paragraph and abstract.

The follow process is a generic description of what happens when the Bean Invoker Factory sends a request to the application logic layer:

  1. A request comes from the client.
  2. The Struts Extensions or the request handler retrieves the Bean Invoker Factory from Singleton.
  3. Using the request ID, the Bean Invoker Factory retrieves the corresponding invoker from the bean invoker pool.
    If the invoker does not exist in the bean invoker pool, the Bean Invoker Factory does the following:
    1. According to the request ID, goes to the Registry to get the corresponding resource bundle.
    2. Creates the invoker using the information in the resource bundle.
  4. Using the request ID and session ID, the Bean Invoker Factory retrieves a bean proxy from the bean proxy cache.

    If the bean proxy does not exist in the bean proxy cache, the Bean Invoker Factory creates the bean proxy according to the request ID and session ID.

  5. The Bean Invoker Factory set the bean proxy to the invoker.
  6. The Bean Invoker Factory returns the invoker to the toolkit Struts Extensions or request handler.
  7. The requester makes an EJB call to the application logic layer with the invoker.
  8. When the EJB call finishes, the requester releases the invoker back to the Bean Invoker Factory.
    Note: If you use invokers to call business processes, the return value from business process is flattern. Invokers do not have APIs to parse this value, so that you need to write your own code to do the parsing.
  9. The Bean Invoker Factory separates the bean proxy from the invoker.
  10. The Bean Invoker Factory releases the invoker to the bean invoker pool, and releases the bean proxy to the bean proxy cache.
  11. When a session ends, the Bean Invoker Factory removes all bean proxies related to this session from the bean proxy cache.

The figure below shows the workflow of the Bean Invoker Factory.

Bean Invoker Factory work flow