Le lundi 6 juin 2011, Alexander Klimetschek a écrit : > > session.getRepository() returns a Repository interface. You cannot make > any assumption about its implementation. In Jackrabbit's
I don't understand the philosophy. I init a repository with the implementation I choose, so the jcr MUST get back the implementation I choose, not other assumption. > TransientRepository case, it's actually a different object than the > TransientRepository you start at the beginning, because of some good > reason. Since creating/starting the repository (in this case calling > Jackrabbit's "new TransientRepository") is not defined by the JCR > spec/API, this is ok. > What is ok ? What are these good reasons ? If JCR doesn't define, why doesn't use the define I choose ? > Might even be to avoid that other (unprivileged) sessions can actually > cast back to the TransientRepository to get "control" over the repository, > but I don't know for sure. > In this case, session.getRepository() is a mistake in itself. Perhaps session.getProxyOrSomethingElseRepository ? > Regards, Same.