[JBoss-dev] CVS update: jbossmx/src/main/org/jboss/ha HAConfigNodeImpl.java HAConfigServer.java

2001-09-11 Thread Scott M Stark

  User: starksm 
  Date: 01/09/11 11:39:55

  Modified:src/main/org/jboss/ha HAConfigNodeImpl.java
HAConfigServer.java
  Log:
  Convert all logging to org.jboss.logging.Logger which is a subclass of
  org.apache.log4j.Category.
  
  Revision  ChangesPath
  1.4   +17 -18jbossmx/src/main/org/jboss/ha/HAConfigNodeImpl.java
  
  Index: HAConfigNodeImpl.java
  ===
  RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/HAConfigNodeImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- HAConfigNodeImpl.java 2001/09/01 19:50:29 1.3
  +++ HAConfigNodeImpl.java 2001/09/11 18:39:55 1.4
  @@ -20,8 +20,6 @@
   import JavaGroups.DistributedTree.DistributedTreeListener;
   import JavaGroups.Address;
   import JavaGroups.Common.Trace;
  -
  -// TODO this needs to be replaced with the log4j logging
   import org.jboss.logging.Logger;
   
   import org.jboss.ejb.plugins.jrmp.interfaces.ContainerRemote;
  @@ -31,7 +29,7 @@
*
*   @see HAConfigNode
*   @author mailto:[EMAIL PROTECTED]";>Sacha Labourey
  - *   @version $Revision: 1.3 $
  + *   @version $Revision: 1.4 $
*
*   Revisions:
*
  @@ -43,6 +41,7 @@
   
   public class HAConfigNodeImpl implements HAConfigNode
   {
  +   static Logger log = Logger.create(HAConfigNodeImpl.class);
   
  public interface HAEventsCallbackable
  {
  @@ -202,7 +201,7 @@
catch (Exception e)
{e.printStackTrace (); }
 else
  - Logger.debug ("registerContainer: called while distributed hashtable 
unavailble!");
  + log.debug ("registerContainer: called while distributed hashtable 
unavailble!");
  }
   
  public void unregisterContainer (String application, String beanname, String 
type)
  @@ -218,7 +217,7 @@
catch (Exception e)
{e.printStackTrace (); }
 else
  - Logger.debug ("unregisterContainer: called while distributed hashtable 
unavailble!");
  + log.debug ("unregisterContainer: called while distributed hashtable 
unavailble!");
  }
   
  public Vector getReplicateContainers (String application, String beanname, 
String type)
  @@ -330,7 +329,7 @@
result = this.getEntries (builtName);
 else
 {
  - Logger.debug ("getReplicateContainers: called while distributed hashtable 
unavailble!");
  + log.debug ("getReplicateContainers: called while distributed hashtable 
unavailble!");
result = new Vector ();
 }
   
  @@ -494,7 +493,7 @@
  //we only propagate events for which we are not concerned
  //
   {
  -   Logger.debug ("Event will be forwarded : " + concernedNode + ", " + 
clusterName );
  +   log.debug ("Event will be forwarded : " + concernedNode + ", " + 
clusterName );
  EventEntry entry = new EventEntry ();
   
  entry.eventType = EventEntry.ADD_EVENT;
  @@ -508,16 +507,16 @@
  wakeUpThread ();
   }
   else
  -   Logger.debug ("... event not forwarded locally.");
  +   log.debug ("... event not forwarded locally.");
}
else
  -Logger.debug ("... event not forwarded locally.");
  +log.debug ("... event not forwarded locally.");
 }
   
 public void addNodeModifiedEvent (String fqn, Serializable contentBefore, 
Serializable contentAfter)
 {
java.util.Vector splitName = getSplitName (fqn);
  - Logger.debug ("Modify Event : " + fqn);
  + log.debug ("Modify Event : " + fqn);
if (splitName.size () == 5)
{
   String clusterName = (String)splitName.elementAt (0);
  @@ -545,16 +544,16 @@
  wakeUpThread ();
   }
   else
  -   Logger.debug ("... event not forwarded locally.");
  +   log.debug ("... event not forwarded locally.");
}
else
  -Logger.debug ("... event not forwarded locally.");
  +log.debug ("... event not forwarded locally.");
 }
   
 public void addNodeRemovedEvent (String fqn)
 {
java.util.Vector splitName = getSplitName (fqn);
  - Logger.debug ("Remove Event : " + fqn);
  + log.debug ("Remove Event : " + fqn);
// we may add a check here: if size == 1 and this is for a node for
// which we still have a son, there is a problem. Maybe usefull during 
debugging
//
  @@ -583,10 +582,10 @@
  wakeUpThread ();
   }
   else
  -   Logger.debug ("... event not forwarded locally.");
  +   log.debug ("... event not forwarded locally.");
}
else
  -Logg

[JBoss-dev] CVS update: jbossmx/src/main/org/jboss/ha HAConfigNodeImpl.java

2001-09-01 Thread Chris Kimpton

  User: kimptoc 
  Date: 01/09/01 12:50:29

  Modified:src/main/org/jboss/ha HAConfigNodeImpl.java
  Log:
  remove deprecated logging import, where possible, otherwise comment as needing 
replacement with log4j must find out how it is use would be good if the 
deprecation message pointed to an example to use...
  
  Revision  ChangesPath
  1.3   +102 -100  jbossmx/src/main/org/jboss/ha/HAConfigNodeImpl.java
  
  Index: HAConfigNodeImpl.java
  ===
  RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/HAConfigNodeImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HAConfigNodeImpl.java 2001/08/23 00:09:05 1.2
  +++ HAConfigNodeImpl.java 2001/09/01 19:50:29 1.3
  @@ -21,7 +21,9 @@
   import JavaGroups.Address;
   import JavaGroups.Common.Trace;
   
  +// TODO this needs to be replaced with the log4j logging
   import org.jboss.logging.Logger;
  +
   import org.jboss.ejb.plugins.jrmp.interfaces.ContainerRemote;
   
   /**
  @@ -29,7 +31,7 @@
*
*   @see HAConfigNode
*   @author mailto:[EMAIL PROTECTED]";>Sacha Labourey
  - *   @version $Revision: 1.2 $
  + *   @version $Revision: 1.3 $
*
*   Revisions:
*
  @@ -41,19 +43,19 @@
   
   public class HAConfigNodeImpl implements HAConfigNode
   {
  -   
  +
  public interface HAEventsCallbackable
  {
 void beanReplicaModified (java.util.Vector newValue);
  }
  -   
  +
  public static final String REMOTE_TYPE = "remote";
  public static final String HOME_TYPE   = "home";
  public static final String CONFIG_ENTRY = "*config*";
  -   
  +
  // Constants -
  -   
  -   
  +
  +
  final String  defConnection 
="UDP(mcast_addr=224.100.100.200;mcast_port=4567;ip_ttl=31;trace=true):" +
  "PING(timeout=3000;num_initial_members=10):" +
  "FD(trace=true;timeout=5000):" +
  @@ -79,7 +81,7 @@
 */
  private final String JNDI_PROVIDER_PREFIX = "jnp";
  private final String JNDI_PORT_NUMBER = "1099"; // read it from JMX config in a 
next version
  -   
  +
  // Attributes 
  StringclusterName = null;
  StringescClusterName  = null;
  @@ -90,21 +92,21 @@
  JavaGroups.AddressjavaGropupsNodeName = null;
  EventDispatcher   dispatcher  = null;
  Hashtable jndiProps   = null;
  -   
  +
  long  proxyNormalRefresh  = 3;
  long  proxyDeathRefresh   = 5000;
  -   
  +
  // Static 
  -   
  +
  // Constructors --
  -   
  +
  public HAConfigNodeImpl ()
  {
 super();
  }
  -   
  +
  // Public 
  -   
  +
  public void init (String cluster, String node, String haConnection, long 
normalDelay, long deathDelay)
  {
 // set local values from our MBEAN service
  @@ -119,10 +121,10 @@
this.haConnection = this.defConnection;
 else
this.haConnection = haConnection;
  -  
  +
 // determine the URL of the locally used
  }
  -   
  +
  public void start ()
  throws Exception
  {
  @@ -134,30 +136,30 @@
jndiProps = new Hashtable (2);
jndiProps.put (Context.INITIAL_CONTEXT_FACTORY, 
"org.jnp.interfaces.NamingContextFactory");
jndiProps.put (Context.PROVIDER_URL, java.net.InetAddress.getLocalHost 
().getHostName ()+ ":" + JNDI_PORT_NUMBER);
  - 
  +
// This is the main distributed tree we use for sharing HA info. In the 
future, configuration such as
// refresh delay (proxyDeathRefresh and proxyNormalRefresh) should also be 
shared this way.
//
beans = new DistributedTree ("JBossHA", haConnection);
  - 
  +
// we want to be informed about any update of the shared tree ...
//
dispatcher = new EventDispatcher ();
beans.AddDistributedTreeListener (dispatcher);
  - 
  +
// ... and membership composition (to clean dead entries)
//
beans.AddMembershipListener (dispatcher);
beans.Start ();
  - 
  +
// we also remember our JavaGroups name
//
this.javaGropupsNodeName = (Address)beans.GetLocalAddress ();
  - 
  +
 } catch (Exception e)
 { e.printStackTrace (); }
  }
  -   
  +
  public void setNormalDelay (long normalDelay)
  {
 this.proxyNormalRefresh = normalDelay;
  @@ -166,7 +168,7 @@
  {
 this.proxyDeathRefresh = deathDelay;
  }
  -   
  +
  public long getN

[JBoss-dev] CVS update: jbossmx/src/main/org/jboss/ha HAConfigNodeImpl.java

2001-08-22 Thread Jason Dillon

  User: user57  
  Date: 01/08/22 17:09:05

  Modified:src/main/org/jboss/ha HAConfigNodeImpl.java
  Log:
   o using this.wait() instead of wait(), to avoid compile problem with older
 jikes.
  
  Revision  ChangesPath
  1.2   +3 -3  jbossmx/src/main/org/jboss/ha/HAConfigNodeImpl.java
  
  Index: HAConfigNodeImpl.java
  ===
  RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/HAConfigNodeImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HAConfigNodeImpl.java 2001/08/19 18:33:53 1.1
  +++ HAConfigNodeImpl.java 2001/08/23 00:09:05 1.2
  @@ -29,7 +29,7 @@
*
*   @see HAConfigNode
*   @author mailto:[EMAIL PROTECTED]";>Sacha Labourey
  - *   @version $Revision: 1.1 $
  + *   @version $Revision: 1.2 $
*
*   Revisions:
*
  @@ -411,7 +411,7 @@
  // 
***
  
  class EventDispatcher
  -   implements Runnable, DistributedTree.DistributedTreeListener, 
DistributedTree.MembershipListener
  +  implements Runnable, DistributedTree.DistributedTreeListener, 
DistributedTree.MembershipListener
  {
 private java.util.Vector events = new java.util.Vector (20);
 private Thread dispatcherThread = null;
  @@ -438,7 +438,7 @@
 {
threadSuspended = (events.size () <= 0);
while (threadSuspended)
  -wait ();
  +this.wait();
 }
  }
   } catch (InterruptedException e)
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development