You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2007/01/08 11:59:05 UTC
svn commit: r494021 -
/incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContext.java
Author: jlaskowski
Date: Mon Jan 8 02:59:02 2007
New Revision: 494021
URL: http://svn.apache.org/viewvc?view=rev&rev=494021
Log:
OPENEJB-368 EJBContext.lookup
Submitted by: Mohammad Nour
Modified:
incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContext.java
Modified: incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContext.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContext.java?view=diff&rev=494021&r1=494020&r2=494021
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContext.java (original)
+++ incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContext.java Mon Jan 8 02:59:02 2007
@@ -226,6 +226,13 @@
throw new java.lang.IllegalStateException("container-managed transaction beans can not access the UserTransaction");
}
+ /**
+ * Lookup a resource within the component's private naming context.
+ * @param name - Name of the entry (relative to java:comp/env).
+ * @return The looked-up object.
+ * @see http://java.sun.com/javaee/5/docs/api/javax/ejb/EJBContext.html#lookup(java.lang.String)
+ * @see EJB3.0 "Core Contracts and Requirements", section 4.5.2, table 2.
+ */
public Object lookup(String name) {
Context initialContext = null;
Object object = null;
@@ -234,7 +241,6 @@
initialContext = new InitialContext();
object = initialContext.lookup("java:comp/env/"+name);
} catch (NamingException nex) {
- // @see http://java.sun.com/javaee/5/docs/api/javax/ejb/EJBContext.html#lookup(java.lang.String)
throw new IllegalArgumentException(nex);
}
return object;