[jboss-dev-forums] [Design of POJO Server] - ProfileService/OBR repository
scott.stark@jboss.org
do-not-reply at jboss.com
Tue Sep 18 15:40:35 EDT 2007
I just checked in a OSGi OBR like addition to the org.jboss.profileservice.spi.repository package. The interfaces in there mirror the OSGi OBR interfaces with two additions:
1. The RepositoryAdmin has an additional Repository getRepository(URI repository) throws Exception; method.
2. There is an extension of the Repository interface that allows for addition/removal and modification detection of Resources:
| public interface MutableRepository extends Repository
| {
| /** */
| public enum ModifyStatus {ADDED, MODIFIED, REMOVED};
|
| /**
| * Add a resource to the repository.
| * @param resource the resource to add
| * @throws Exception thrown on any addition failure
| */
| public void addResource(Resource resource)
| throws Exception;
| /**
| * Remove a resource from the repository
| * @param name the resource SYMBOLIC_NAME or ID
| * @return the Resource that was removed if found, null otherwise.
| * @throws Exception thrown on any remove failure
| */
| public Resource removeResource(String name)
| throws Exception;
| /**
| * Return a collection of resources that have been modified since
| * the last call to this method. The returned resources contain
| * a modifyStatus property of type ModifyStatus to indicate the
| * type of change.
| *
| * @return The Resources that have been modified.
| * @throws Exception
| */
| public Collection<Resource> getModifiedResources()
| throws Exception;
| }
|
There are still a lot of issues to validate in terms of actually using an OBR implementation. The validation of the OBR like API is in the mapping class org.jboss.system.server.profileservice.repository.RepositoryAdminAdaptor. This maps the current org.jboss.profileservice.spi.DeploymentRepository spi onto the org.jboss.profileservice.spi.repository.RepositoryAdmin OBR like SPI. I'm going to look at using some form of the Felix 1.1 bundlerepository code(http://svn.apache.org/repos/asf/felix/trunk/bundlerepository/) for the next release.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085728#4085728
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085728
More information about the jboss-dev-forums
mailing list