archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/RepositorySession.java
/**
     * Close the session. Required to be called for all open sessions to ensure resources are properly released.
     * If the session has been marked as dirty, it will be saved. This may save partial changes in the case of a typical
     * <code>try { ... } finally { ... }</code> approach - if this is a problem, ensure you revert changes when an
     * exception occurs.
     * <b>can throw RuntimeException</b>
     */
Close the session. Required to be called for all open sessions to ensure resources are properly released.
If the session has been marked as dirty, it will be saved. This may save partial changes in the case of a typical
try { ...
Close the session . Required to be called for all open sessions to ensure resources are properly released . If the session has been marked as dirty it will be saved . This may save partial changes in the case of a typical try { ...
@Override
    public void close()
    {
        try
        {
            if ( isDirty() )
            {
                save();
            }
        }
        catch ( MetadataSessionException e )
        {
            throw new RuntimeException( "Could not save the session " + e.getMessage( ), e );
        }
    }
@ Override public void close ( ) { try { if ( isDirty ( ) ) { save ( ) ; } } catch ( MetadataSessionException e ) { throw new RuntimeException ( "Could not save the session " + e . getMessage ( ) , e ) ; } }
Close the session.
Close the session .