/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  org.aopalliance.intercept.MethodInterceptor
 *  org.aopalliance.intercept.MethodInvocation
 */
package com.l7tech.server.util;

import com.l7tech.server.util.UserSwitchedRoutingDataSource;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class UserSwitchedRoutingDataSourceSelector
implements MethodInterceptor {
    private final String a;

    public UserSwitchedRoutingDataSourceSelector(String string) {
        this.a = string;
    }

    public Object invoke(MethodInvocation methodInvocation) throws Throwable {
        try {
            UserSwitchedRoutingDataSource.setDataSourceKey(this.a);
            Object object = methodInvocation.proceed();
            return object;
        }
        finally {
            UserSwitchedRoutingDataSource.setDataSourceKey(null);
        }
    }
}

