Getting Started-JetNet |
The service component that you saved in Lesson 7 contains service routines that display data on the client screen and allow the client to update the database. In Lesson 4, you defined a service, test, in the JIF, and identified the service routine and service component.
All services must be defined for your application in the JIF, an interface file that maps each service name to a service routine and component. The JIF also defines other attributes of a service, such as its input and output requirements.
In general, the JIF is accessed for these reasons:
If service components were created with the screen wizard, you must update the JIF with definitions of the services that are associated with that service component. The JIF has its own editor which lets you access those service definitions and edit them, or add new definitions for services that you create yourself.
In this lesson you learn how to:
You can add and update services while you are using the editor by invoking the JIF editor.
UNIX: Start the editor, and choose ToolsJIF Editor.
If the information is correct, that is, if it matches the entries you made in your server setup, you are connected to the middleware and the JIF editor workspace opens. The View Services dialog box is displayed showing the test service you defined (Lesson 3) in the jif.bin
from the remote common.lib
.
Note:
(Windows only) If you did not set the SMFLIBS
variable in the jifedtut.ini
to open the remote common.lib (host!common.lib
), choose FileOpenRemote Library and select the remote common.lib that resides in the proltut
directory. Choose FileOpenJIF and select the jif.bin
library member
.
If the connection to the middleware is invalid or is not made, the JIF editor opens, but you will not have access to common.lib on the application server. In addition, updates to the JIF will not take effect and new services will not be advertised since the server won't know of the changes.
Determine the correct host name (SMRBHOST
) and port value (SMRBPORT
), and under UNIX, the broker.bin (SMRBCONFIG
) location. Try connecting to the middleware by entering the correct values in the Connect dialog box.
Define services to carry out basic database transaction requests. For the screen you just created with the screen wizard, you want to define services that let users add, update, select, and delete distributor records.
The Create Service dialog box opens.
distributor_d
in the Service Name field and press TAB
.
The JIF editor supplies the routine name, in this case delete, because of the _d
suffix in the Service Name. It also provides a default service component name—using the prefix of the service name.
dstord
(to match the name you provided in the editor when you saved the service component to server.lib
).
The fields clear so that you can create another service.
More About Service Options
There are additional service specifications you can define in the JIF that let you control such things as:
By default, the JIF uses the service name to determine the transaction type; therefore, a service name that ends with _i sets the service to the transaction manager Insert operation. In addition, the Cache Service Component option by default is set to open or cache a service's service component when the service is advertised by the server.Repeat steps 5 through 8 for each of the other services:
distributor_i
,distributor_s
, anddistributor_u
. Remember to provide the correct name of the service component,dstord
.
distributor_i
, distributor_s
, and distributor_u
. Remember to provide the correct name of the service component, dstord
.The View Services dialog box displays the services you created.
Since you are connected to the middleware, servers are notified immediately when changes are saved to the JIF. In addition, new services (depending on the advertise specification and if the server is configured to advertise all services) are advertised and immediately available to your application.
You are prompted to release the reservation on the JIF since it is stored in a remote library and is shared by others.
The JIF editor closes.
In this lesson, you invoked the JIF editor and:
You learned:
What did you learn?