You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by da...@apache.org on 2004/04/13 21:57:19 UTC
cvs commit: incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/java ComponentContextBuilder.java
dain 2004/04/13 12:57:19
Modified: modules/naming/src/java/org/apache/geronimo/naming/java
ComponentContextBuilder.java
Log:
Added a general bind method
Revision Changes Path
1.8 +9 -2 incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/java/ComponentContextBuilder.java
Index: ComponentContextBuilder.java
===================================================================
RCS file: /home/cvs/incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/java/ComponentContextBuilder.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ComponentContextBuilder.java 10 Mar 2004 09:59:08 -0000 1.7
+++ ComponentContextBuilder.java 13 Apr 2004 19:57:18 -0000 1.8
@@ -19,7 +19,6 @@
import java.net.MalformedURLException;
import java.net.URL;
-
import javax.management.MalformedObjectNameException;
import javax.naming.NamingException;
import javax.naming.Reference;
@@ -53,6 +52,14 @@
throw new IllegalStateException("Context has been frozen");
}
context.internalBind("UserTransaction", userTransaction);
+ }
+
+
+ public void bind(String name, Object value) throws NamingException {
+ if (context.isFrozen()) {
+ throw new IllegalStateException("Context has been frozen");
+ }
+ context.internalBind(ENV + name, value);
}