User: patriot1burke
  Date: 01/09/24 17:45:44

  Modified:    src/main/org/jboss/ha/jndi HANamingService.java
  Log:
  more cleanup
  
  Revision  Changes    Path
  1.7       +7 -24     jbossmx/src/main/org/jboss/ha/jndi/HANamingService.java
  
  Index: HANamingService.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbossmx/src/main/org/jboss/ha/jndi/HANamingService.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- HANamingService.java      2001/09/21 21:59:12     1.6
  +++ HANamingService.java      2001/09/25 00:45:44     1.7
  @@ -61,9 +61,9 @@
    
    @author oberg
    @author [EMAIL PROTECTED]
  - @version $Revision: 1.6 $
  + @version $Revision: 1.7 $
    */
  -public class HANamingService extends ServiceMBeanSupport implements Runnable, 
HANamingServiceMBean, DistributedReplicantManager.ReplicantListener
  +public class HANamingService extends ServiceMBeanSupport implements Runnable, 
HANamingServiceMBean
   {
      // Constants -----------------------------------------------------
      
  @@ -94,11 +94,8 @@
      protected int rmiPort = 0;
      protected Logger log;
   
  -   protected HARMITarget hatarget;
      protected HARMIServerImpl rmiserver;
  -   protected HARMIClient haclient;
  -   protected Naming hastub;
  -   protected RemoteStub stub;
  +   protected Naming stub;
      protected HAPartition partition;
      protected DistributedReplicantManager replicantManager;
      protected String partitionName = "DefaultPartition";
  @@ -198,11 +195,6 @@
         serverSocketFactory = (RMIServerSocketFactory) clazz.newInstance();
      }
   
  -   public void replicantsChanged(String key, ArrayList newReplicants)
  -   {
  -      haclient.setTargets(newReplicants.toArray());
  -   }
  -
      public void initService() throws Exception
      {
         log.info("Initializing HAJNDI server");
  @@ -219,18 +211,9 @@
      {
         log.info("Starting HAJNDI server");
   
  -      this.rmiserver = new HARMIServerImpl(partition, "HAJNDI", theServer);
  -      this.haclient = new HARMIClient(new Object[0], new RoundRobin());
  -      
         log.info("Register with replicantManager as listener for HAJNDI replicants");
  -      replicantManager.registerListener("HAJNDI", this);
  -      replicantManager.add ("HAJNDI", this.rmiserver.getStub ());
  -      log.info("create proxy");
  -      
  -      this.hastub = (Naming)Proxy.newProxyInstance(
  -         Naming.class.getClassLoader(),
  -         new Class[] { Naming.class },
  -         this.haclient);
  +      this.rmiserver = new HARMIServerImpl(partition, "HAJNDI", Naming.class, 
theServer, new RoundRobin());
  +      this.stub = (Naming)rmiserver.getHAStub();
   
         log.info("Start listener");
         try
  @@ -300,9 +283,9 @@
         try
         {
            ObjectOutputStream out = new ObjectOutputStream(socket.getOutputStream());
  -         synchronized(haclient)
  +         synchronized(stub)
            {
  -            out.writeObject(new MarshalledObject(hastub));
  +            out.writeObject(new MarshalledObject(stub));
            }
         }
         catch (IOException ex)
  
  
  

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

Reply via email to