Using the properties object in Java
You can optionally use a properties object to control when your Java™ application uses the optimized REST service interface.
Before you begin
Ensure that an optimized REST service interface is available.
About this task
The Java programming language provides a construct that is called the properties object. Before using the properties object, set conventions on how property files and property values are defined, named, and managed. You can use the properties object to manage configuration values across different platforms or control URLs at the OpenAPI descriptor level or the service descriptor level. For example, you can run the same Java application in development, test, and production environments without requiring any code changes when you request z/TPF stateless application services. When you develop and test your Java application, the property file directs requests for stateless z/TPF application services to remote z/TPF test systems. When you deploy the same Java application to test and production systems, you can set the property file to use the optimized REST service interface when you call local stateless z/TPF application services.
You can use properties objects for stateful and stateless services. However, if you use properties objects for stateful services, you must always use the optimized REST service interface for the stateful services.
- If a Java application that calls a z/TPF application service is not on the z/TPF system, specify the URL as the host name or the IP address of the z/TPF system.
- If the Java application is on the same z/TPF processor as the z/TPF application service, specify the URL as localhost.