/**
* @see nexj.core.persistence.file.FileStorageConnectionFactory#getConnection(nexj.core.persistence.file.FileAdapter)
*/
public FileConnection getConnection(FileAdapter adapter)
{
FileConnectionFactory factory;
synchronized (this)
{
factory = m_factory;
}
try
{
return factory.getConnection();
}
catch (ResourceException ex)
{
if (s_logger.isDebugEnabled())
{
s_logger.debug("Rebinding to the stale factory \"" + m_sFactoryName + "\"");
}
try
{
synchronized (this)
{
// Check not already rebound
if (factory == m_factory)
{
initFactory();
}
factory = m_factory;
}
return factory.getConnection();
}
catch (NamingException nx)
{
if (s_logger.isDebugEnabled())
{