[jboss-cvs] JBossAS SVN: r90815 - in branches/JBPAPP_5_0: profileservice/src/main/org/jboss/profileservice/management/templates and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Jul 4 15:51:00 EDT 2009


Author: scott.stark at jboss.org
Date: 2009-07-04 15:51:00 -0400 (Sat, 04 Jul 2009)
New Revision: 90815

Modified:
   branches/JBPAPP_5_0/connector/src/main/org/jboss/resource/deployers/management/DsDataSourceTemplateInfo.java
   branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java
Log:
JBAS-7050, use writeReplace to avoid returning the server template info classes

Modified: branches/JBPAPP_5_0/connector/src/main/org/jboss/resource/deployers/management/DsDataSourceTemplateInfo.java
===================================================================
--- branches/JBPAPP_5_0/connector/src/main/org/jboss/resource/deployers/management/DsDataSourceTemplateInfo.java	2009-07-04 16:56:48 UTC (rev 90814)
+++ branches/JBPAPP_5_0/connector/src/main/org/jboss/resource/deployers/management/DsDataSourceTemplateInfo.java	2009-07-04 19:51:00 UTC (rev 90815)
@@ -21,6 +21,7 @@
  */
 package org.jboss.resource.deployers.management;
 
+import java.io.ObjectStreamException;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.UndeclaredThrowableException;
 import java.util.Collections;
@@ -199,4 +200,15 @@
       }
    }
 
+   /**
+    * Expose only plain BasicDeploymentTemplateInfo to avoid leaking server types.
+    *
+    * @return simpler ManagedPropertyImpl
+    * @throws java.io.ObjectStreamException for any error
+    */
+   private Object writeReplace() throws ObjectStreamException
+   {
+      BasicDeploymentTemplateInfo info = new BasicDeploymentTemplateInfo(getName(), getDescription(), getProperties());
+      return info;
+   }
 }

Modified: branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java
===================================================================
--- branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java	2009-07-04 16:56:48 UTC (rev 90814)
+++ branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java	2009-07-04 19:51:00 UTC (rev 90815)
@@ -21,6 +21,7 @@
  */
 package org.jboss.profileservice.management.templates;
 
+import java.io.ObjectStreamException;
 import java.util.Map;
 
 import org.jboss.managed.api.Fields;
@@ -110,4 +111,15 @@
       }
    }
 
+   /**
+    * Expose only plain BasicDeploymentTemplateInfo to avoid leaking server types.
+    *
+    * @return simpler ManagedPropertyImpl
+    * @throws java.io.ObjectStreamException for any error
+    */
+   private Object writeReplace() throws ObjectStreamException
+   {
+      BasicDeploymentTemplateInfo info = new BasicDeploymentTemplateInfo(getName(), getDescription(), getProperties());
+      return info;
+   }
 }




More information about the jboss-cvs-commits mailing list