*
* It is used for instance to pass a transaction scoped entity manager around.
*
+ * The {@link #set(Object)} method sets the current service instance for the current thread.
+ * The {@link #get()} method gets the current service instance for the current thread.
+ * The {@link #getProxy()} method gets a proxy that will delegate at runtime to the thread-specific
+ * instance. The result from this method can be passed at construction of an object that will be used
+ * by multiple threads.
+ *
* @param T
* Interface to proxy.
* @author Erik Brakkee
public void set(T aService) {
svc.set(aService);
}
+
+ /**
+ * Gets the current thread-specific service.
+ * @return Service.
+ */
+ public T get() {
+ return svc.get();
+ }
/**
* Gets the proxy that delegates to the thread-specific instance set by