Note
that all NamingEntries will be bound in a single namespace. The "global" level is just in the top level context. The "local" level is a context specific to a webapp.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| protected String | |
| protected String | |
| protected String | |
| protected Object |
| Access | Constructor and Description |
|---|---|
| public | |
| public | NamingEntry(String
the name of the object which will eventually be in java:comp/env jndiName, Object the object to be bound object)Create a NamingEntry. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public String | |
| public Object | |
| public void | |
| protected void | |
| public void |
| __contextName | back to summary |
|---|---|
| public static final String __contextName | |
| jndiName | back to summary |
|---|---|
| protected String jndiName | |
| namingEntryNameString | back to summary |
|---|---|
| protected String namingEntryNameString | |
| objectNameString | back to summary |
|---|---|
| protected String objectNameString | |
| objectToBind | back to summary |
|---|---|
| protected Object objectToBind | |
| NamingEntry | back to summary |
|---|---|
| public NamingEntry(Object scope, String jndiName, Object object) throws NamingException | |
| NamingEntry | back to summary |
|---|---|
| public NamingEntry(String jndiName, Object object) throws NamingException Create a NamingEntry. A NamingEntry is a name associated with a value which can later be looked up in JNDI by a webapp. We create the NamingEntry and put it into JNDI where it can be linked to the webapp's env-entry, resource-ref etc entries. | |
| bindToENC | back to summary |
|---|---|
| public void bindToENC(String localName) throws NamingException Add a java:comp/env binding for the object represented by this NamingEntry, but bind it as the name supplied | |
| getJndiName | back to summary |
|---|---|
| public String getJndiName() Get the unique name of the object | |
| getObjectToBind | back to summary |
|---|---|
| public Object getObjectToBind() throws NamingException Get the object that is to be bound | |
| release | back to summary |
|---|---|
| public void release() Unbind this NamingEntry entirely | |
| save | back to summary |
|---|---|
| protected void save(Object scope) throws NamingException Save the NamingEntry for later use. Saving is done by binding the NamingEntry itself, and the value it represents into JNDI. In this way, we can link to the value it represents later, but also still retrieve the NamingEntry itself too. The object is bound at the jndiName passed in. This NamingEntry is bound at __/jndiName. eg jdbc/foo : DataSource __/jdbc/foo : NamingEntry | |
| unbindENC | back to summary |
|---|---|
| public void unbindENC() Unbind this NamingEntry from a java:comp/env | |