Hi, The RepositoryFactoryImpl creates only a TransientRepository. You can see it in the Javadoc ...
With .. RepositoryConfig config = RepositoryConfig.create(xml, dir); Repository repository = RepositoryImpl.create(config) you will get a non transient repository. In a JCA environment the repository creation mechanism is different. If there are two params [homedir and configfile] it will create the repository with RepositoryConfig config = RepositoryConfig.create(xml, dir); Repository repository = RepositoryImpl.create(config) and if not it will use the RepositoryFactory. hope now it's clear greets claus -----Ursprüngliche Nachricht----- Von: Frizz [mailto:[email protected]] Gesendet: Dienstag, 17. Juni 2014 16:07 An: [email protected] Betreff: Re: Repository is started up and shut down in every call Still I don't understand why (1) results in a TransientRepository whereas (2) does not - since both get a config file and a repository directory location. (1) cfgMap.put(RepositoryFactoryImpl.REPOSITORY_CONF, configLocation); cfgMap.put(RepositoryFactoryImpl.REPOSITORY_HOME, repositoryLocation); RepositoryFactory repositoryFactory = new RepositoryFactoryImpl(); repository = repositoryFactory.getRepository(cfgMap); (2) RepositoryConfig config = RepositoryConfig.create(xml, dir); Repository repository = RepositoryImpl.create(config)
