Package org.apache.ojb.broker.metadata

Examples of org.apache.ojb.broker.metadata.RepositoryPersistor


     * @throws Exception
     */
    public void init() throws Exception
    {
        MetadataManager metaManager = MetadataManager.getInstance();
        RepositoryPersistor persistor = new RepositoryPersistor();
        URL descriptorUrl = getClass().getClassLoader().getResource(repositoryPath);

        logger.info("Merging OJB respository "+descriptorUrl+" for DAO class "+getClass().getName());
        DescriptorRepository repo = persistor.readDescriptorRepository(descriptorUrl.openStream());
        metaManager.mergeDescriptorRepository(repo);
    }
View Full Code Here


     * @throws Exception
     */
    public void init() throws Exception
    {
        MetadataManager metaManager = MetadataManager.getInstance();
        RepositoryPersistor persistor = new RepositoryPersistor();
        URL descriptorUrl = getClass().getClassLoader().getResource(repositoryPath);

        logger.info("Merging OJB respository "+descriptorUrl+" for DAO class "+getClass().getName());
        DescriptorRepository repo = persistor.readDescriptorRepository(descriptorUrl.openStream());
        metaManager.mergeDescriptorRepository(repo);
    }
View Full Code Here

            {
                public void run()
                {
                    try
                    {
                        RepositoryPersistor persistor = new RepositoryPersistor ();
                        DescriptorRepository repository = persistor.readDescriptorRepository(selectedFile.getCanonicalPath());
                        JIFrmOJBRepository frm = new JIFrmOJBRepository(repository);
                        containingFrame.getContentPane().add(frm);
                        frm.setVisible(true);
                    }
                    catch (Throwable t)
View Full Code Here

                  
            invoker = new StoreEventInvoker(listeners, this);
            pb = PersistenceBrokerFactory.createPersistenceBroker(pbKey);       
            toBeStored = new HashSet();
            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);               
            }
        }
        catch (Throwable e)
        {
View Full Code Here

TOP

Related Classes of org.apache.ojb.broker.metadata.RepositoryPersistor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.