Information Technology Reference
In-Depth Information
Table 5.2.
JMS generated output files.
Type
Name
Purpose
Client Files
ClockDate.class
The client class file that connects to the re-
mote service
getDate()
accessed via the
generated JMSServer class
JMSClient.class
The RemoteJ generated JMS client helper
class
Server Files
JMSServer.class
The server class file that delegates remote
calls to the
ClockDate.getDate()
method
used by the
nextServer
statement to connect to an alternative server in
the event of a communication or distribution error. This may be overrid-
den by the
remotej.servers
command line option. If neither
servers
nor
remotej.servers
have been defined, the application will terminate.
serverThreads.
The number of server threads to create in the JMS container.
receiveTimeout.
The period to wait for a message response. In addition, the JMS
time-to-live field is set to the
receiveTimeout
value to ensure stale messages
are removed from the queue (if supported by the JMS implementation).
serverPlugin.
This optional statement is used to add a user-defined class to be
started in a thread in the server-generated code. It is provided to allow for
advanced user-defined recovery scenarios as described in Section 5.3.
Given a DDL with the single pointcut statement illustrated in Figure 5.8 the
classes in Table 5.2 are generated.
In contrast to the complexity of the RMI implementation, the JMS imple-
mentation contains only two code generation phases, the client and the server
generation phases.
5.5.2
JMS Client Generation
The JMS client generation phase performs the same checks as described for the
RMI implementation to ensure that methods matched by statements defined in
the DDL are not defined as
synchronized
or contain synchronized blocks of code.
Client methods matched in the DDL are replaced with method calls that:
• Create an instance of the
Transfer
object, described in Section 5.3.
• Call various
Transfer
object methods to set the name of the class and the
associated method to be executed, the method's parameter names, and the
method's parameter values.
• Use the RemoteJ
JMSClient
helper class to transmit the
Transfer
object
from the client to the server using the JMS
ObjectMessage
message type.
On the server, the values contained in the
Transfer
object are used to call
the requested method using the following process.
Search WWH ::
Custom Search