[jboss-cvs] JBossAS SVN: r62316 - branches/Branch_4_2/server/src/main/org/jboss/naming.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Apr 13 06:38:46 EDT 2007


Author: adrian at jboss.org
Date: 2007-04-13 06:38:46 -0400 (Fri, 13 Apr 2007)
New Revision: 62316

Modified:
   branches/Branch_4_2/server/src/main/org/jboss/naming/LinkRefPairService.java
Log:
[JBAS-4329] - Hold a static reference to the LinkRefPairObjectFactory to avoid
the GUID changing if the class was garbage collected.

Modified: branches/Branch_4_2/server/src/main/org/jboss/naming/LinkRefPairService.java
===================================================================
--- branches/Branch_4_2/server/src/main/org/jboss/naming/LinkRefPairService.java	2007-04-13 10:27:59 UTC (rev 62315)
+++ branches/Branch_4_2/server/src/main/org/jboss/naming/LinkRefPairService.java	2007-04-13 10:38:46 UTC (rev 62316)
@@ -24,6 +24,7 @@
 import javax.naming.InitialContext;
 
 import org.jboss.deployment.DeploymentException;
+import org.jboss.logging.Logger;
 import org.jboss.system.ServiceMBeanSupport;
 
 /**
@@ -35,6 +36,15 @@
 public class LinkRefPairService extends ServiceMBeanSupport
    implements LinkRefPairServiceMBean
 {
+   /** This is a hack to make sure this class doesn't get garbage collected */
+   protected static final Class HACK = LinkRefPairObjectFactory.class;
+   
+   static
+   {
+      // Make sure the LinkRefPairObjectFactory class is initialized
+      Logger.getLogger(LinkRefPairService.class).debug("LinkRefPair guid=" + LinkRefPairObjectFactory.guid);
+   }
+   
    // Constants -----------------------------------------------------
    
    // Attributes ----------------------------------------------------




More information about the jboss-cvs-commits mailing list