Hi, -1 on defining this on this isolated level.
This should be part of a broader concept of how to architect/structure JR3 and its backend connections. Regards Felix On 28.02.2010 16:40, Thomas Müller wrote: > Currently Jackrabbit initializes the repository storage (persistence > manager) when creating the repository object. If the repository data > is stored in relational database, then the database connection is > opened at that time. > > I suggest to allow delayed initialization (allow, not require). For > some storage backends, the repository could initialize when opening > the first session. > > Example: > > 1) > String url = "jdbc:..."; > RepositoryFactory factory = (RepositoryFactory) > Class.forName(factoryClass).newInstance(); > Map<String, String> parameters = new HashMap<String, String>(); > parameters.put("url", url); > Repository rep = factory.getRepository(parameters); > > 2) > String user = "...", password = "..."; > Session session = rep.login(new SimpleCredentials(user, > password.toCharArray())); > > This example uses a relational database as the storage. When creating > the repository object, user name and password are unknown, so the > repository could not initialize at that time. Only when the first user > logs in, the user name and password are known. In this case, the user > name and password of the session would match the user name and > password of the storage backend, but that's actually not a requirement > (it's just an example). > > The current Jackrabbit architecture doesn't support this 'delayed > initialization' use case yet. > > I suggest that Jackrabbit 3 should support such delayed > initialization. Whether or not we will implement storage backends that > actually do use this mechanism is another question. > > Regards, > Thomas >