BEA WebLogic User Manual page 197

Mobility server
Hide thumbs Also See for WebLogic:
Table of Contents

Advertisement

Request Out-of-Session Delivery Contexts
Establish the Delivery Context Store
A Delivery Context Store must be established before attempting to retrieve Delivery Contexts.
This Delivery Context Store indicates the Device Repository instance against which the
subsequent Delivery Context queries should be issue. There are two methods for establishing the
Delivery Context Store depending on whether the Device Repository is deployed in a relational
database or as an XML file.
To establish a Delivery Context Store where the Device Repository is deployed in a database,
the following method is used:
DeliveryContextStoreFactory.getDeliveryContextDBStore("deviceDB.url",
"deviceDB.driver")
where deviceDB.url is the location of the Device Repository (including user and password if
required) and deviceDB.driver is the driver to be used to access the database. These database
connection parameters should be provided by the database administrator.
To establish a Delivery Context Store where the Device Repository is deployed as an XML
file, the following method is used:
DeliveryContextStoreFactory.getDeliveryContextXMLStore("deviceDB.url")
where deviceDB.url is the path to the deployed Device Repository XML file.
Methods for Retrieving Delivery Contexts
There are four method calls that can be used to retrieve Delivery Contexts for devices in the
Device Repository. The methods are described as follows:
To retrieve a single device where a specified attribute matches a specified value:
DeliveryContextFactory.getDeliveryContext(deliveryContextStore,
"attributeName", "attributeValue")
where deliveryContextStore indicates the established delivery context store to query,
attributeName indicates the device store attribute to match on, and attributeValue indicates
the value of the indicated Device Repository attribute to match on. For example, to retrieve a
delivery context for the Sony Ericsson P900 you could use the following:
deliveryContext =
DeliveryContextFactory.getDeliveryContext(deliveryContextStore,
"DeviceUniqueName","root^xhtmlmp^ericsson(xhtml)^sonyericssonp900")
Note: If more than one device matches the indicated criteria, the first device that matched
will be returned.
To retrieve a single device matching a specified "where" expression:
DeliveryContextFactory.getDeliveryContext(deliveryContextStore,
"whereExpression")
where deliveryContextStore indicates the established delivery context store to query and
whereExpression indicates the where expression to evaluate and return the first matching
device for. For example, an alternative way to retrieve a delivery context for the Sony
Ericsson P900 would be:
DeliveryContext deliveryContext =
DeliveryContextFactory.getDeliveryContext(deliveryContextStore,
"DeviceUniqueName=='root^xhtmlmp^ericsson(xhtml)^sonyericssonp900'")
Note: If more than one device matches the indicated criteria, the first device that matched
will be returned.
BEA WebLogic Mobility Server User Guide - 193
Part VIII Appendixes
DeliveryContext

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the WebLogic and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Weblogic mobility server

Table of Contents