[Contents] [Prev] [Next] [Index] [Report an Error]

# Installing and Configuring the Prepaid Services Demo

You must install and configure both the account server and the Prepaid Account Administration application. Additionally, you must configure the prepaid plug-in on the SAE and create and configure the service(s) that will use the prepaid accounts.

## Installing the Account Server

You must manually install the UMCppdemo package to deploy the account server.

`

pkgadd -d /cdrom/cdrom0/Demos+Sample_Applications UMCppdemo

`

| Note: The prepaid services demo is provided on the SRC application library CD.

For information about installing the prepaid services demo, see Installing the Sample SRC Applications.

## Configuring the Account Server

Before you start the account server for the first time, you must run a script to configure it. To configure the account server:

1. On the SAE host, log in as root or as an authorized nonroot admin user.
2. Launch the configuration script from the prepaid services demo installation directory.
   `
   /opt/UMC/prepaid/etc/config
   `
3. The configuration script prompts you for input and confirms your choices, as in the following example:
   `
   Which naming prefix shall be used for publishing the objects? [demo/accountServer] [?,q]
   demo/accountServer
   Which naming server do you want to use? [] [?,q]
   corbaname::localhost
   Which file name prefix shall be used for publishing the objects? [] [?,q]
   /var/tmp/accountServer
   Which user-id shall be running the account server? [nobody] [?,q]
   nobody
   COSName: "demo/accountServer"
   NameServer: "corbaname::localhost"
   IORFile: "/var/tmp/accountServer"
   USERID: "nobody"
   Is this correct? y
   `
4. The script configures the account server according to your responses.

### Publishing the Object References

The sample configuration presented above configures the account server to publish the object references to a COS naming service and to a local file. Depending on your needs, you might want to choose only one or the other method.

| Note: The account server and the Prepaid Account Administration application must run on the same host for the local file feature to work. If you install these components on multiple hosts, you must configure the account server to publish the object references to a COS naming service.

When you publish the objects to a COS naming service, you specify the prefix of the published name, such as demo/accountServer, and the URL of the name server, such as corbaname::localhost. In this case the account server publishes the object reference of the plug-in to the URL corbaname::localhost#demo/accountServer.plugin. The account server publishes the object reference of the account manager to the URL corbaname::localhost#demo/accountServer.acctMgr.

The local file is specified by the path and prefix of the filename, /var/tmp/accountServer. In this case the account server publishes the object reference of the account manager to /var/tmp/accountServer.acctMgr and the object reference of the prepaid plug-in to /var/tmp/accountServer.plugin.

### Manual Configuration

Although the configuration script is sufficient to configure the account server for most purposes, you can also configure the server by using the command line.

- To publish the object references into a local file, specify the path and prefix of the filename:
  `
  #accountServer -f <fileNamePrefix>
  `
- To publish the object references to a COS naming service, specify the prefix of the published name:
  `
  #accountServer -c <namePrefix>
  `

- The COS naming server is taken from the initial references. You can do one of the following:
  - Globally configure omniORB in the file /etc/omniORB.cfg
  - Specify the following option when you configure the account server:
    `
    -ORBInitRef NameService=corbaname::nameServerHostname
    `

    For example, to publish the object references to a COS naming server running on server ns.domain.com, configure the account server as follows:

    `
    #accountServer -ORBInitRef NameService=corbaname::ns.domain.com -c demo/accountServer
    `
- If you start the account server as a root user, the account server switches the user ID to an unprivileged user after initialization. The default user ID is nobody. To override the default value, specify a different user:
  `
  #accountServer -f /var/tmp/accountServer -u <username>
  `

## Starting the Account Server

To start the account server:

1. On the account server host, log in as root or as an authorized nonroot admin user.
2. Start the account server from the root directory.
   `
   /etc/init.d/accountServer start
   `

   The system responds with a start message.

## Stopping the Account Server

To stop the account server:

1. On the account server host, log in as root or as an authorized nonroot admin user.
2. Stop the account server from the root directory.
   `
   /etc/init.d/accountServer stop
   `

   The system responds with a stop message.

## Configuring the SAE for the Prepaid Plug-In

You configure the prepaid plug-in in the same way that you configure other SAE external plug-ins. For information about configuring SAE plug-ins, seeSRC PE Subscribers and Subscriptions Guide

The properties for this plug-in are as follows.

Plugin.prepaid.objectref

- Specifies the reference of the plug-in object implemented by the account server.
- Value—Depends on the host and the configuration of the account server; that is, whether the object reference is published to a COS naming service or a local file
- Examples

  In the following example, the object reference has been published to a COS naming service running on the host ns.domain.com:

  Plugin.prepaid.objectref = corbaname::ns.domain.com#demo/accountServer.plugin

  In the following example, the object reference has been published to a local file on the host:

  Plugin.prepaid.objectref = file:/var/tmp/accountServer.plugin

Plugin.prepaid.attr

- Defines the attributes used by the plug-in.
- Value—Use only the following value:
  Plugin.prepaid.attr = PA_UID,PA_AUTH_USER_ID, PA_SESSION_TIME, PA_DOWNSTREAM_BANDWIDTH, PA_UPSTREAM_BANDWIDTH

## Configuring the Prepaid Services

Each defined service that uses prepaid accounts must be configured to use the prepaid plug-in as its authorization and tracking plug-in. For example, suppose you have a GameMaster premium gaming service for which you want to use prepaid accounts. You must create this service with SDX Admin and enter the value “ prepaid” into the Authorization Plugin and Tracking Plugin fields.

## Deploying the Prepaid Account Administration Application

You must deploy the WAR file for the Prepaid Account Administration application in the Web application server. You can find this file, accountAdmin.war, in the folder webapp on the SRC application library CD. Refer to the documentation for your Web application server for information about deploying applications.

For example, to deploy the Prepaid Account Administration application inside JBoss, copy the file to the JBoss /server/default/deploy directory.

`

cp /cdrom/cdrom0/Demos+Sample_Applications/webapp/accountAdmin.war /opt/UMC/jboss/server/default/deploy

`

JBoss automatically starts the application when a new WAR file is copied into the deploy directory.

## Configuring the Prepaid Account Administration Application

You must configure the Prepaid Account Administration application with the object reference of the account manager. Configure the object reference as a <context-param> in the WEB-INF/web.xml file from the accountAdmin.war file. The parameter name is acctMgr, and the value is a CORBA URL of the account manager object reference, as in the following example:

`

<context-param>
<param-name>acctMgr</param-name>
<param-value>corbaname::ns.domain.com#demo/accountServer.acctMgr
</param-value>
</context-param>

`

[Contents] [Prev] [Next] [Index] [Report an Error]