Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0
-
None
-
Windows XP SP2, JBoss 4.0.3SP1
Description
Binding a repository to a nameserver using RegistryHelper causes the next subsequent lookup to fail. This is what I observerd:
1. RegistryHelper.registerRepository creates a new BindableRepository and initializes it. This, in turn, initializes the "real" repository (i.e. delagtee). It then binds this reference with the nameserver.
2. On the next lookup, BindableRepositoryFactory.getObjectInstance is invoked. Thie method checks it's cache for a repository. Since one does not exist yet, it creates a new BindableRepository and tries to initialize it. This fails since the call to RegistryHelper.registerRepository already initialized the repository.
The error message basically says the repository is already in use by another process because the .lock file is present. To fix this, I modified RegistryHelper.registerRepository to NOT initialize the repository and simply bind the "Reference".