Configure the scope of a JAX-RPC web services port
When a JAX-RPC web service application is deployed into WebSphere Application Server, an instance is created for each application or module. The instance contains deployment information for the web module or enterprise bean module, including implementation scope, client bindings and deployment descriptor information. There are three levels of scope that can be set: application, session and request.
Deploy a web service into the WAS. To learn more, read about deploying web services applications onto application servers.
The Web Services for Java EE specification states that web services implementations must be stateless. Therefore, to maintain specification compliance, the scope can remain at the application level because the state relevant to the individual sessions level or the requests level is not supposed to be maintained in the implementation. To deviate from the specification and want to access a different JavaBeans instance, because you are looking for information located in another JavaBeans implementation, the scope settings need to change. The setting configured for the scope determines how frequently a new instance of a service implementation class is created for the web services ports in a module. Use this task to configure the scope of a web services port.
(dist)(zos) We can also configure the scope of a web services port with wsadmin.sh. To learn more, see the information on configuring the scope of a web services port with wsadmin.sh.
This task applies only to JAX-RPC web services.
To change the scope setting in the console:
- Open the console.
- Click Applications > Application Types > WebSphere enterprise applications application_name > Manage Modules > module instance > Web services implementation scope
- Set the scope to application, session or request. The application scope causes the same instance of the implementation to be used for all requests on the application. The session scope causes the same instance to be used for all requests in each session. The request scope causes a new instance to be used for every request. For example, with the scope set to application, every message that comes to the server accesses the same JavaBeans instance because that is the way the scope settings are configured.
- Click Apply.
- Click OK.
Results
The scope for a web services port is configured.
What to do next
Now we can finish any other configurations, start or stop the application, and verify the expected behavior of the web service.
Subtopics
- Web services implementation scope
Use this page to view and manage the scope of the ports of a Web service application.
Related tasks
Deploy web services applications onto application servers (dist)(zos) Configure the scope of a web service port
Web services client port information Web services client bindings