JBoss.orgCommunity Documentation

Chapter 61. Initial Context Binder

61.1. API

Initial Context Binder is responsible for binding references at runtime, persisting in file and automatically rebinding. Java temp directory is used to persist references in bind-references.xml file by default. In case when need to definde special file it can be done by add parameter to InitialContextInitializer configuration.

Service provide methods for binding reference:

public void bind(String bindName, String className, String factory, String factoryLocation, Map<String, String> refAddr) throws NamingException, FileNotFoundException, XMLStreamExcept
public void bind(String bindName, Reference ref) throws NamingException, FileNotFoundException, XMLStreamExcept

Returns reference associated with defined name:

public Reference getReference(String bindName)

Unbind the Reference with defined name:

public void unbind(String bindName) throws NamingException, FileNotFoundException, XMLStreamException