User: slaboure
Date: 01/11/09 14:43:28
Modified: src/main/org/jboss/ha/framework/server HAPartitionImpl.java
Log:
Added some basic methods used for SFSB support:
- allow to get the current view
- rebind instead of bind to JNDI
Revision Changes Path
1.7 +11 -4
jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java
Index: HAPartitionImpl.java
===================================================================
RCS file:
/cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- HAPartitionImpl.java 2001/10/20 20:51:33 1.6
+++ HAPartitionImpl.java 2001/11/09 22:43:28 1.7
@@ -56,10 +56,10 @@
*
* @author [EMAIL PROTECTED]
* @author [EMAIL PROTECTED]
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
*
* <p><b>Revisions:</b><br>
- */
+*/
public class HAPartitionImpl extends RpcDispatcher implements HAPartition,
MembershipListener, MessageListener
{
protected HashMap rpcHandlers = new HashMap ();
@@ -150,7 +150,7 @@
//
StringRefAddr addr = new StringRefAddr ("nns", jndiName);
Reference ref = new Reference ( classType.getName (), addr,
NonSerializableFactory.class.getName (), null);
- ctx.bind (n.get (0), ref);
+ ctx.rebind (n.get (0), ref);
}
public void start () throws Exception
@@ -184,6 +184,7 @@
public void close () throws Exception
{
+ log.info ("Closing partition " + partitionName);
// Stop the DRM and DS services
//
try {this.replicantManager.stop ();} catch (Exception printed)
{printed.printStackTrace ();}
@@ -192,6 +193,7 @@
try {channel.Close ();} catch (Exception printed) {printed.printStackTrace
();}
new InitialContext ().unbind ("/HAPartition/" + partitionName);
+ log.info ("Partition " + partitionName + " closed.");
}
public String getNodeName ()
@@ -218,6 +220,11 @@
{
return this.currentViewId;
}
+
+ public Vector getCurrentView ()
+ {
+ return this.members;
+ }
// ***************************
// ***************************
@@ -388,7 +395,7 @@
// we update the view id
//
this.currentViewId = newView.GetVid().GetId();
- log.info("new view accepted: " + currentViewId);
+ log.info("new view accepted: " + currentViewId + " (" + newView.GetMembers
() + ")");
if (this.members == null)
{
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development