ConnectionResource.java 531 Bytes
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.service;

import com.adobe.service.ConnectionAllocator;
import com.adobe.service.Resource;

public abstract class ConnectionResource
extends Resource
implements ConnectionAllocator {
    private Object connection;

    public Object getConnection() {
        if (this.connection == null) {
            this.connection = this.allocateConnection();
        }
        return this.connection;
    }

    protected void clearConnection() {
        this.connection = null;
    }
}