The c8-services.xml file contains a sample service entry section for this purpose. You can either customize this section, or make a copy of it elsewhere in the file and customize the copy.
Here is the sample public window database service entry that appears in the
c8-services.xml file. As with other examples in this guide, some items appear in italics. These are stand-in values, for which you must provide the actual information. For example, replace
user-name
with the appropriate user name.
<!-- Sample Service Configuration for Public Window -->
<Service Name="
MyPublicWindowDB
" 1 Type="DATABASE"2 >
<Description>
Sample Service Configuration for DB Subqueries (Public Windows)
</Description>3
<!-- DBDriverType should be set to DBDriverPublicWindows -->
<Param Name="DBDriverType">DBDriverPublicWindows4</Param>
<!-- DBDriverConnectString should be set to:
ccl://<your-manager-host>:<your-manager-port>/Project/
<your-workspace-name>/<your-project-name>
with <your-workspace-name> and <your-project-name>
corresponding to the workspace and name of the
top-level module containing the Public Window(s)
that you want to query -->
<Param Name="DBDriverConnectString">
\
ccl://mymanager:1234/Project/MyWorkspace/MyProject5
</Param>
<!-- Set to an integer > 0 to enable caching -->
<Param Name="CacheMaximumAge">06</Param>
<!-- Set your Username and Password Appropriately if
your server configuration requires authentication
-->
<Param Name="Username">
user-name7
</Param>
<Param Name="Password">
password8
</Param>
</Service>
1
|
Provide a unique service name for the public window service in the "Service Name" preference on this line. This name is case-sensitive, must begin with a letter and may contain letters, digits, underscores, dots and/or colons. The service name should be the same name as the name of the "database" service you use in your CCL queries. For example, if your database subquery is:
...
FROM (DATABASE "PublicWindow1" SCHEMA "valuation.ccs"
SELECT * FROM Stocks WHERE T.symbol=Stocks.symbol)
The database name (PublicWindow1) in the database subquery should match the service name in the c8-services.xml file.
|
2
|
Set the "Type" preference on this line to
DATABASE
.
|
3
|
Optionally, add a description of your service entry in the "Description" element.
|
4
|
Set the "DBDriverType" preference on this line to DBDriverPublicWindows. This preference indicates the type of driver used to communicate with the external "database".
|
5
|
Enter the ccl: URI of the project that contains the public window in the "DBDriverConnectString" preference on this line.
|
6
|
This line allows you to specify how long the Sybase CEP Server should keep a cached copy of the information that it read from the public window.
For more information about caching, see "Caching Data from an External Database, RPC Server, or Public Window".
|
7
|
If the public window being set up as a service is using the Sybase CEP Server's user authentication feature, indicate the user name that Sybase CEP Engineshould use when communicating with the Sybase CEP Server that contains the public window in the "Username" preference on this line.
Note that this value is unencrypted: anyone who has access to the c8-services.xml file will be able to read the user name.
|
8
|
If the public window being set up as a service is using the Sybase CEP Server's user authentication feature, indicate the password that Sybase CEP Engine should use when communicating with the Sybase CEP Server that contains the public window in the "Password" preference, on this line.
Like the user name above it, the password is unencrypted.
|
If you want to connect to public windows in more than one project, create a separate section for each project.
Here is an example of how you might set the configuration preferences.
<Service Name="MyPublicWindowDB" Type="DATABASE">
<Description>Sample Service Configuration for DB Subqueries (Public Windows)</Description>
<!-- DBDriverType should be set to DBDriverPublicWindows -->
<Param Name="DBDriverType">DBDriverPublicWindows</Param>
<Param Name="DBDriverConnectString">ccl://mymanager:1234/Project/MyWorkspace/MyProject</Param>
<!-- Set to an integer > 0 to enable caching -->
<Param Name="CacheMaximumAge">0</Param>
<!-- Set your Username and Password Appropriately if
your server configuration requires authentication
-->
<Param Name="Username">Helen</Param>
<Param Name="Password">Troy450BC</Param>
</Service>