portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Closed: (JS2-38) Allow PBStore PersistenceStore implementation to grab user defined repository from META-INF
Date Thu, 20 May 2004 19:47:01 GMT
Message:

   The following issue has been closed.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JS2-38

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JS2-38
    Summary: Allow PBStore PersistenceStore implementation to grab user defined repository
from META-INF
       Type: New Feature

     Status: Closed
   Priority: Minor
 Resolution: FIXED

    Project: Jetspeed 2
 Components: 
             Other
   Versions:
             2.0-a1

   Assignee: Scott T Weaver
   Reporter: Scott T Weaver

    Created: Thu, 20 May 2004 12:20 PM
    Updated: Thu, 20 May 2004 12:45 PM

Description:
This feature will allow us to place our user-defined repositrory xml files into a components
META-INF/ directory instead of having to add an ENTITY definition to the root repository.xml.
 The PBStore impl will just enumerate all META-INF/ojb_repository.xml files from the class
and add them directly to OJB's meta data repository on the fly.

This is all I will need to add to the PBStore constructor:

MetadataManager metaManager = MetadataManager.getInstance();
            RepositoryPersistor persistor = new RepositoryPersistor();
            Enumeration descriptors = getClass().getClassLoader().getResources("META-INF/ojb_repository.xml");
            while(descriptors.hasMoreElements())
            {
                URL descriptorUrl = (URL) descriptors.nextElement();
                log.info("Merging OJB respository: "+descriptorUrl);
                DescriptorRepository repo = persistor.readDescriptorRepository(descriptorUrl.openStream());
                metaManager.mergeDescriptorRepository(repo);                
            }


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message