git://wamblee.org
/
utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Now using connections managed by JPA instead of using JNDI mocking.
[utils]
/
test
/
enterprise
/
src
/
main
/
java
/
org
/
wamblee
/
support
/
ThreadSpecificProxyFactory.java
diff --git
a/test/enterprise/src/main/java/org/wamblee/support/ThreadSpecificProxyFactory.java
b/test/enterprise/src/main/java/org/wamblee/support/ThreadSpecificProxyFactory.java
index 1e9c3468d355370d81242d8ed39d1eb2b61f3fe2..e47c037ac8f23e56086235c4758c8df7a759c2ad 100644
(file)
--- a/
test/enterprise/src/main/java/org/wamblee/support/ThreadSpecificProxyFactory.java
+++ b/
test/enterprise/src/main/java/org/wamblee/support/ThreadSpecificProxyFactory.java
@@
-49,28
+49,34
@@
public class ThreadSpecificProxyFactory<T> {
private Class clazz;
/**
private Class clazz;
/**
- * Constructs the factory.
- * @param aClass Interface class of the service to proxy.
+ * Constructs the factory.
+ *
+ * @param aClass
+ * Interface class of the service to proxy.
*/
public ThreadSpecificProxyFactory(Class<T> aClass) {
*/
public ThreadSpecificProxyFactory(Class<T> aClass) {
- if ( !aClass.isInterface() ) {
- throw new IllegalArgumentException("Class " + aClass.getName() + " is not an interface");
+ if (!aClass.isInterface()) {
+ throw new IllegalArgumentException("Class " + aClass.getName() +
+ " is not an interface");
}
clazz = aClass;
}
/**
}
clazz = aClass;
}
/**
- * Sets the thread-specific service.
- * @param aService Service, use null value to reset.
+ * Sets the thread-specific service.
+ *
+ * @param aService
+ * Service, use null value to reset.
*/
public void set(T aService) {
svc.set(aService);
}
/**
*/
public void set(T aService) {
svc.set(aService);
}
/**
- * Gets the proxy that delegates to the thread-specific instance set by
+ * Gets the proxy that delegates to the thread-specific instance set by
* {@link #set(Object)}
* {@link #set(Object)}
- * @return Proxy.
+ *
+ * @return Proxy.
*/
public T getProxy() {
InvocationHandler handler = new ThreadSpecificInvocationHandler();
*/
public T getProxy() {
InvocationHandler handler = new ThreadSpecificInvocationHandler();
@@
-82,8
+88,9
@@
public class ThreadSpecificProxyFactory<T> {
new Class[] { InvocationHandler.class }).newInstance(
new Object[] { handler });
return proxy;
new Class[] { InvocationHandler.class }).newInstance(
new Object[] { handler });
return proxy;
- } catch (Exception e) {
- throw new RuntimeException("Could not create proxy for " + clazz.getName(), e);
+ } catch (Exception e) {
+ throw new RuntimeException("Could not create proxy for " +
+ clazz.getName(), e);
}
}
}
}
}
}