org.jboss.ha.jndi
Class HAJNDI
java.lang.Object
org.jboss.ha.jndi.HAJNDI
- All Implemented Interfaces:
- HAPartition.HAPartitionStateTransfer (src) , Naming (src) , java.rmi.Remote, java.io.Serializable
- public class HAJNDI
- extends java.lang.Object
- implements HAPartition.HAPartitionStateTransfer (src) , java.io.Serializable, Naming (src)
This class extends the JNP JNDI implementation.
binds and unbinds will be distributed to all members of the cluster
that are running HAJNDI.
lookups will look for Names in HAJNDI then delegate to the local InitialContext
- See Also:
- Serialized Form
Method Summary |
void |
bind(javax.naming.Name name,
java.lang.Object obj,
java.lang.String className)
|
javax.naming.Context |
createSubcontext(javax.naming.Name name)
|
java.io.Serializable |
getCurrentState()
Called when a new node need to be initialized. |
Naming (src) |
getHAStub()
|
void |
init()
|
java.util.Collection |
list(javax.naming.Name name)
|
java.util.Collection |
listBindings(javax.naming.Name name)
|
java.lang.Object |
lookup(javax.naming.Name name)
|
void |
rebind(javax.naming.Name name,
java.lang.Object obj,
java.lang.String className)
|
void |
setCurrentState(java.io.Serializable newState)
This callback method is called when a new service starts on a new node: the state that it should hold is transfered to it through this callback |
void |
setHAStub(Naming (src) stub)
|
void |
stop()
|
void |
unbind(javax.naming.Name name)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
partition
protected HAPartition (src) partition
delegate
protected TreeHead (src) delegate
haStub
protected Naming (src) haStub
HAJNDI
public HAJNDI(HAPartition (src) partition)
throws javax.naming.NamingException
init
public void init()
throws java.lang.Exception
- Throws:
java.lang.Exception
stop
public void stop()
throws java.lang.Exception
- Throws:
java.lang.Exception
setHAStub
public void setHAStub(Naming (src) stub)
getHAStub
public Naming (src) getHAStub()
getCurrentState
public java.io.Serializable getCurrentState()
- Description copied from interface:
HAPartition.HAPartitionStateTransfer (src)
- Called when a new node need to be initialized. This is called on any existing node to determine a current state for this service.
- Specified by:
getCurrentState
in interface HAPartition.HAPartitionStateTransfer (src)
- Returns:
- A serializable representation of the state
setCurrentState
public void setCurrentState(java.io.Serializable newState)
- Description copied from interface:
HAPartition.HAPartitionStateTransfer (src)
- This callback method is called when a new service starts on a new node: the state that it should hold is transfered to it through this callback
- Specified by:
setCurrentState
in interface HAPartition.HAPartitionStateTransfer (src)
- Parameters:
newState
- The serialized representation of the state of the new service.
bind
public void bind(javax.naming.Name name,
java.lang.Object obj,
java.lang.String className)
throws javax.naming.NamingException
- Specified by:
bind
in interface Naming (src)
- Throws:
javax.naming.NamingException
rebind
public void rebind(javax.naming.Name name,
java.lang.Object obj,
java.lang.String className)
throws javax.naming.NamingException
- Specified by:
rebind
in interface Naming (src)
- Throws:
javax.naming.NamingException
unbind
public void unbind(javax.naming.Name name)
throws javax.naming.NamingException
- Specified by:
unbind
in interface Naming (src)
- Throws:
javax.naming.NamingException
lookup
public java.lang.Object lookup(javax.naming.Name name)
throws javax.naming.NamingException
- Specified by:
lookup
in interface Naming (src)
- Throws:
javax.naming.NamingException
list
public java.util.Collection list(javax.naming.Name name)
throws javax.naming.NamingException
- Specified by:
list
in interface Naming (src)
- Throws:
javax.naming.NamingException
listBindings
public java.util.Collection listBindings(javax.naming.Name name)
throws javax.naming.NamingException
- Specified by:
listBindings
in interface Naming (src)
- Throws:
javax.naming.NamingException
createSubcontext
public javax.naming.Context createSubcontext(javax.naming.Name name)
throws javax.naming.NamingException
- Specified by:
createSubcontext
in interface Naming (src)
- Throws:
javax.naming.NamingException