All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nofdev.servicefacade.ServiceContextHolder Maven / Gradle / Ivy

There is a newer version: 1.3.4
Show newest version
package org.nofdev.servicefacade;

/**
 * Created by Qiang on 11/6/15.
 */
public class ServiceContextHolder {
    private static ThreadLocal threadLocal = new ThreadLocal() {
        @Override
        protected ServiceContext initialValue() {
            return new ServiceContext();
        }
    };

    public static void setServiceContext(ServiceContext serviceContext) {
        threadLocal.set(serviceContext);
    }

    public static ServiceContext getServiceContext() {
        return threadLocal.get();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy