Bugzilla – Bug 4717
Delegation Resources need to provide more flexibility in the selection of the persistence mechanism
Last modified: 2006-09-19 14:58:41
You need to log in before you can comment on or make changes to this bug.
The DelegationResource class provides a persistent storage mechanism for Delegation Services. However, under the current implementation, this mechanism only provides persistence to a flat file. This functionality is hard coded into the class via the “store” and “load” methods. The design should be changed to allow more flexibility in the selection of the persistence mechanism. For a project currently under development at NCSA, delegation service objects needed to be persisted in a manner that allowed them to be machine independent. This functionality was needed to allow for fail over of containers. Delegation service objects were serialized and written out just as they currently are, only instead of a flat file, they were stored in a database. By using the database, services running on a different machine were able to make use of the delegation resource. The code written for this project has the same problem as the current code, only instead of a hard coded flat file, it makes use of a hard coded database connection. Attached is the NCSA version of the DelegationResource class. This is not meant to be a patch or a fix of the existing class, only a reference. The code works and shows how to persist the object to a MySQL database. Also, the schema for the corresponding database table is included.
Created an attachment (id=1049) [details] DelegationResource Class that writes to a MySQL table instead of a flat file This file is for reference only and is not a fix.
Created an attachment (id=1050) [details] Schema for the DelegationResource table in MySQL The table schema used to persist DelegationResource objects in a MySQL table.