This application offers a simple system for maintaining a database of suppliers and products. It provides functions for adding updating, retrieving and deleting suppliers and products. All database access is simulated.
Microsoft Visual Studio.NET Professional or greater.
Windows 2000 or Windows XP.
There are two classes, Supplier and Product, that form the basis for the components in this application.
The application has been programmed for Dynamic Registration, which means that the COM+ application the components belong to will automatically be created the first time one of the classes is invoked, provided that the calling application has Administrator privileges. Review the AssemblyInfo file, where the assembly attributes that enable dynamic registration are located.
On the data input form you can add a supplier, by entering a Company Name and
Phone and clicking Add Supplier. To update, enter a Company Name, Phone and ID.
To delete a supplier, only an ID is needed. If the operation is successful, a
message on the status line will indicate that. Working with products is
similar.
Note that no database access is performed. This How-To is focused on
illustrating COM+ features.
Each class writes to the Output Window when various events occur, such as instantiation, activation, and deactivation. See the DoTracing procedure in each class. You can uncomment the lines that make it also write to the Event Log. Review these entries to track the life cycle of the components.
Set breakpoints at various places in the classes to see the sequence of events as an object is used in the Enterprise Services environment.
Writing Serviced Components Transaction Processing List of COM+ Attributes