--- C:/Red5/svn_trunk/org/red5/io/object/Serializer.new.java	Thu Jan 04 02:54:07 2007
+++ C:/Red5/svn_trunk/org/red5/io/object/Serializer.java	Thu Jan 04 02:59:01 2007
@@ -487,14 +487,34 @@
         while (it.hasNext()) {
 			BeanMap.Entry entry = (BeanMap.Entry) it.next();
 			if (entry.getKey().toString().equals("class")) {
 				continue;
 			}
-
+			
 			out.writePropertyName(entry.getKey().toString());
+			
+			// Read the value here so it can be processed first
+			Object value = entry.getValue();
+			
 			//log.info(entry.getKey().toString()+" = "+entry.getValue());
-			serialize(out, entry.getValue());
+			// Check if the Field corresponding to the getter/setter pair is transient
+			try {
+				Field field = bean.getClass().getDeclaredField(entry.getKey().toString());
+				int modifiers = field.getModifiers();
+				
+				if (Modifier.isTransient(modifiers)) {
+					if (log.isDebugEnabled()) {
+						log.debug("Skipping " + field.getName() + " because its transient");
+					}
+					value = null; // Serialize null instead of the real value.
+				}
+			} catch(NoSuchFieldException nfe) {
+				// Ignore this exception and use the default behaviour
+			}
+			
+			serialize(out, value);
+			
 			if (it.hasNext()) {
 				out.markPropertySeparator();
 			}
 		}
         // Write out end of object mark
