3.3.2 Sending a ServletDataSet
The ServletSessionPool
provides overloaded call()
methods
for use inside an HTTP servlet. These methods accept their input parameters in terms of an
HttpServletRequest
object, and therefore can conveniently be passed the
same HttpServletRequest
object that was passed into your HTTP servlet's
doPost()
or doGet()
methods. However, in this instance,
you must ensure that the names of the HTTP posted
name=value
pairs correspond to those expected by the Tuxedo service. The ordering is not
important, because the data is ultimately converted into a Java Hashtable. Other non-related
data in the HttpServletRequest
will not disrupt the Tuxedo service.
A Tuxedo service is invoked from within an HTTP servlet with the following method:
ssPool.call("serviceName", request);
where ssPool
is a reference to a ServletSessionPool
,
"
serviceName
" is the name of the Tuxedo service you wish to call, and the
request
argument is the HttpServletRequest
object associated with the
servlet.
The ServletSessionPool.call()
method internally converts the
HttpServletRequest
into a ServletDataSet
, which can be
submitted to a regular SessionPool
.
Parent topic: Using a Servlet Session Pool