Globus Toolkit 4: Programming Java Services

Chapter 14: Implementing your Own Operation Providers

In the previous chapter we have been using Globus-supplied operation providers to avoid having to implement the operations required by the standard WSRF portTypes. However, operation providers can be used for more than just that. You can implement your own operation providers to implement some functionality that you easily want to plug into your services. In this chapter we will learn how to do just that.

14.1 The RemoteLogging Provider

Let's suppose that you are programming an application composed of several services deployed in different containers. Furthermore, suppose you want the client applications to be able to instruct the services to write certain log messages in their containers. It would be as simple as having each service expose a writeLog(String msg) operation, and have that operation use the logging infrastructure seen in Chapter 9, Logging to write string msg to the container's log.

This is very simple in concept but, in practice, we would have to add the writeLog(String msg) operation to the WSDL file and Java implementation of each service. A better solution is to take that code and put it in an operation provider that we will be able to easily "plug into" our services, the same way we "plugged in" operation provider GetRPProvider whenever we wanted to use the GetResourceProperty operation to access our service's RPs.

So, we will write an operation provider called RemoteLogging. In general, writing our own operation providers requires three simple steps:

  1. Write the WSDL file for our...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Communication Service Providers
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.