Hi Edgar, Hi Jukka,
thank you for your answers. I didn't read the ClientRepositoryFactory
javadocs, but now it is clear. I used JNDI with other resource factories
and the problem was new to me.
I also think, that for now connection managment should be layered out to
a higher level. Removing the cache in the ClientRepositoryFactory makes
the RMI Server JNDI registration working as I expected it.
-Florian
Jukka Zitting wrote:
Hi,
Edgar Poce wrote:
But I like to use jndi, so IMHO the ClientRepositoryFactory should
validate the reference to the remote repository and discard the
cached references when they become stale, just like a jdbc pool
discards stale connections. thoughts?
Now that I think about this, I'm not sure why I decided to introduce
the connection cache in the ClientRepositoryFactory. There doesn't
seem to be any great benefit in caching the connections (at this
level) and the current behaviour only introduces unnecessary
complexity. Would anyone mind if I just removed the connection cache
to solve this issue?
If needed, connections could still be cached for example by using JNDI
or some other solution like commons-pool.
BR,
Jukka Zitting