From 4b9f81b79e3d2e0f607a6a4126bf02b56b6a98ad Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Mon, 5 Jul 2010 19:56:05 +0000 Subject: [PATCH] --- .../support/jndi/JndiProxyFactory.java | 3 +++ .../wamblee/support/jndi/package-info.java | 23 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 test/enterprise/src/main/java/org/wamblee/support/jndi/package-info.java diff --git a/test/enterprise/src/main/java/org/wamblee/support/jndi/JndiProxyFactory.java b/test/enterprise/src/main/java/org/wamblee/support/jndi/JndiProxyFactory.java index 99088576..1b6f67fa 100644 --- a/test/enterprise/src/main/java/org/wamblee/support/jndi/JndiProxyFactory.java +++ b/test/enterprise/src/main/java/org/wamblee/support/jndi/JndiProxyFactory.java @@ -27,6 +27,9 @@ import javax.naming.NamingException; * Proxy factory that can provide contextual references to objects retrieved * from JNDI. * + * NOTE: This class is probably better suited as a production class, not a test support class. + * It needs to find a new home in a Java EE production utilities library. + * * @param T * Interface to proxy. * @author Erik Brakkee diff --git a/test/enterprise/src/main/java/org/wamblee/support/jndi/package-info.java b/test/enterprise/src/main/java/org/wamblee/support/jndi/package-info.java new file mode 100644 index 00000000..505730ea --- /dev/null +++ b/test/enterprise/src/main/java/org/wamblee/support/jndi/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright 2005-2010 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * This package provides utilities for JNDI testing. + * + * Using {@link StubInitialContextFactory}, JNDI can be mocked in junit tests. + * {@link JndiProxyFactory} provides a proxy that transparently delegates to an object in the + * JNDI tree. + */ +package org.wamblee.support.jndi; \ No newline at end of file -- 2.31.1