[jboss-cvs] JBossAS SVN: r90816 - in branches/Branch_5_x: 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:57:32 EDT 2009
Author: scott.stark at jboss.org
Date: 2009-07-04 15:57:32 -0400 (Sat, 04 Jul 2009)
New Revision: 90816
Modified:
branches/Branch_5_x/connector/src/main/org/jboss/resource/deployers/management/DsDataSourceTemplateInfo.java
branches/Branch_5_x/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/Branch_5_x/connector/src/main/org/jboss/resource/deployers/management/DsDataSourceTemplateInfo.java
===================================================================
--- branches/Branch_5_x/connector/src/main/org/jboss/resource/deployers/management/DsDataSourceTemplateInfo.java 2009-07-04 19:51:00 UTC (rev 90815)
+++ branches/Branch_5_x/connector/src/main/org/jboss/resource/deployers/management/DsDataSourceTemplateInfo.java 2009-07-04 19:57:32 UTC (rev 90816)
@@ -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/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java
===================================================================
--- branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java 2009-07-04 19:51:00 UTC (rev 90815)
+++ branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java 2009-07-04 19:57:32 UTC (rev 90816)
@@ -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