getJcrSession will open one if needed, which close does not need to do. This
also caused some timing issues in the REST tests as it concurrently operated
on the same session
public void close()
throws MetadataRepositoryException
{
- try
+ if ( jcrSession != null && jcrSession.isLive() )
{
- if ( getJcrSession().isLive() )
- {
- getJcrSession().logout();
- }
- }
- catch ( RepositoryException e )
- {
- log.error( e.getMessage(), e );
- throw new MetadataRepositoryException( e.getMessage(), e );
+ jcrSession.logout();
}
}