About the CML Components

The CML Web application uses five custom objects (three COM components and two objects) on the business tier to handle the business logic, and one component that resides on the client computer.

These six custom objects are described in the following tables. The first column lists the component ProgId that is used by the Web pages. The second column describes the purpose of the component, that is, the tasks the component performs and the MTSTransaction property value that describes the transactional behavior of the component or object. In general, the components that make modifications to the database require transactions. In particular, components that make modifications to more than one table require transactions. The CML application has two DLLs, CML and CMLC. CML.dll contains the server-side components and CMLC.dll contains the client-side component. CML components are created using Visual Basic 6.0.

CML.dll contains five custom objects

Object Comment
Admin object

Admin code

The methods to support library administration: locate the first borrower in the queue, verify availability of library materials, check in, check out, and renew library items, update item and title information. Admin uses the methods and properties of the TableQueue object.
MTSTransaction: RequiresTransactions
Also see: COM Components and Objects
Search object

Search code

The methods and properties of the search process.
MTSTransaction: NoTransactions
User object

User code

Routines to add and change information in the borrower table, display the user's library requests and library checkouts, and add requests for library items. Uses the methods and properties of the TableQueue object.
MTSTransaction: UsesTransactions
Also see: COM Components and Objects
TableQueue code Methods and properties for managing the library item wait lists. Three methods: add to the end of the queue, remove the first request in the queue, and delete a request in the queue. The TableQueue object is a private class. It is only accessed from the Admin and User components.
MTSTransaction: Does not apply; this is a private object.
Also see: COM Components and Objects
MTSEnvironment code Contains three methods: CreateInstance places COM component in MTS context, SetAbort calls SetAbort on the MTS ObjectContext object, and SetComplete calls SetComplete on the MTS ObjectContext object.
MTSTransaction: Does not apply; this is a private object.
Also see: COM Components and Objects

CMLC.dll contains one custom object

Object Comment
UserInfo code Client-side object that captures the user logon. Two read-only properties. Uses the Win32® APIs GetUserName and GetComputerName.
MTSTransaction: NoTransactions
Also see: COM Components and Objects

The following diagram shows the relationship among the CML COM components and the CML objects. The solid border identifies a COM component and the stippled one indicates a CML object. UserInfo, Admin, User, and Search are COM components with public interfaces. The MTSEnvironment and TableQueue objects are private and expose no public interfaces.