Before a Java™ Client application can send a request to the CICS® server, it must create and open a JavaGateway object.
When the JavaGateway is open, the Java Client application can flow requests to the CICS server using the flow method of the JavaGateway. The request is sent to the Gateway daemon if you have a remote JavaGateway or direct to CICS if you are using a local JavaGateway on z/OS® or direct to the Client daemon if you are using a local JavaGateway on multiplatforms.
When there are no more requests for the CICS Transaction Gateway, the Java Client application closes the JavaGateway object.