org.apache.webbeans.corespi.se
Class DefaultJndiService
java.lang.Object
org.apache.webbeans.corespi.se.DefaultJndiService
- All Implemented Interfaces:
- JNDIService
public class DefaultJndiService
- extends java.lang.Object
- implements JNDIService
SPI Implementation of the JNDIService.
This version doesn't operate on a real JNDI context!
Instead it will store the values to bind in a singleton Map.
This is intended for all environments where
the java:comp and java:app context canot be written to, e.g.
because they are only readonly (tomcat, resin, jetty, ...) or
don't exist at all (JDK standalone applications)
- See Also:
org.apache.webbeans.corespi.ee.JNDIServiceEnterpriseImpl
|
Method Summary |
void |
bind(java.lang.String name,
java.lang.Object object)
|
|
getObject(java.lang.String name,
java.lang.Class<? extends T> expectedClass)
|
|
lookup(java.lang.String name,
java.lang.Class<? extends T> expectedClass)
|
void |
unbind(java.lang.String name)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultJndiService
public DefaultJndiService()
bind
public void bind(java.lang.String name,
java.lang.Object object)
throws WebBeansException
-
- Specified by:
bind in interface JNDIService
- Throws:
WebBeansException
getObject
public <T> T getObject(java.lang.String name,
java.lang.Class<? extends T> expectedClass)
throws WebBeansException
-
- Throws:
WebBeansException
unbind
public void unbind(java.lang.String name)
throws WebBeansException
-
- Specified by:
unbind in interface JNDIService
- Throws:
WebBeansException
lookup
public <T> T lookup(java.lang.String name,
java.lang.Class<? extends T> expectedClass)
- Specified by:
lookup in interface JNDIService
Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.