You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by ju...@apache.org on 2005/08/19 09:49:05 UTC
svn commit: r233448 -
/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java
Author: jukka
Date: Fri Aug 19 00:48:51 2005
New Revision: 233448
URL: http://svn.apache.org/viewcvs?rev=233448&view=rev
Log:
JCR-RMI: Remove connection caching in ClientRepositoryFactory.
Modified:
incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java
Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java?rev=233448&r1=233447&r2=233448&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java Fri Aug 19 00:48:51 2005
@@ -50,11 +50,6 @@
public static final String URL_PARAMETER = "url";
/**
- * Cache for repository references.
- */
- private Map repositories;
-
- /**
* Local adapter factory.
*/
private LocalAdapterFactory factory;
@@ -72,7 +67,6 @@
* @param factory local adapter factory
*/
public ClientRepositoryFactory(LocalAdapterFactory factory) {
- this.repositories = new HashMap();
this.factory = factory;
}
@@ -80,9 +74,6 @@
* Returns a client wrapper for a remote content repository. The remote
* repository is looked up from the RMI registry using the given URL and
* wrapped into a {@link ClientRepository ClientRepository} adapter.
- * <p>
- * The repository references are cached so that only one client instance
- * (per factory) exists for each remote repository.
*
* @param url the RMI URL of the remote repository
* @return repository client
@@ -94,13 +85,8 @@
public synchronized Repository getRepository(String url) throws
ClassCastException, MalformedURLException,
NotBoundException, RemoteException {
- Repository repository = (Repository) repositories.get(url);
- if (repository == null) {
- RemoteRepository remote = (RemoteRepository) Naming.lookup(url);
- repository = factory.getRepository(remote);
- repositories.put(url, repository);
- }
- return repository;
+ RemoteRepository remote = (RemoteRepository) Naming.lookup(url);
+ return factory.getRepository(remote);
}
/**