-
1. Re: JBossSerialization and Inheritance
clebert.suconic Apr 26, 2006 4:28 PM (in response to brei)I will fix that...
http://jira.jboss.org/jira/browse/JBSER-68
Thanks -
2. Re: JBossSerialization and Inheritance
clebert.suconic Apr 26, 2006 4:53 PM (in response to brei)Hummm... sorry about that.
I won't fix this.
Even JavaSerialization works like that.
If a super class doesn't implement Serializable, their fields are not serialized either. -
3. Re: JBossSerialization and Inheritance
brei Apr 26, 2006 5:54 PM (in response to brei)Now I'm confused.....
In the JBossRemoting docu they say:
The transporter serialization example (found in org.jboss.remoting.samples.transporter.serialization package) is very similar to the previous basic example, except in this one, the domain objects being sent over the wire will NOT be Serializable. This is accomplished via the use of JBoss Serialization. This can be useful when don't know which domain objects you may be using in remote calls or if adding ability for remote calls on legacy code.
So if I have legacy code with class hierarchies I can not use the "cool feature" that I don't have to implement java.io.Serializable?
Reto -
4. Re: JBossSerialization and Inheritance
clebert.suconic Apr 26, 2006 5:59 PM (in response to brei)If your Class doesn't implement Serializable at al, JBossSerialization will send every single field.
But if your class does implement Serializable, JBossSerialization will mimic the same behavior that JavaSerialization does.
So, if you are using JBossRemoting, and if you remove the word Serializable from your class, everything should be serializable. If this is not the case, then it's a bug. -
5. Re: JBossSerialization and Inheritance
brei Apr 26, 2006 6:05 PM (in response to brei)So I think it is a bug. Should I send you a test case for this use case?
Reto -
6. Re: JBossSerialization and Inheritance
clebert.suconic Apr 26, 2006 6:09 PM (in response to brei)Probably I should enter to the guiness book.
The fastest solution to bug after being informed :-) lol
I already created the testcase, and fixed the code already.
I reopened http://jira.jboss.org/jira/browse/JBSER-68 and added a description.
Code is already commited. -
7. Re: JBossSerialization and Inheritance
brei Apr 26, 2006 6:17 PM (in response to brei)Thanks a lot Clebert alias Speedy Conzales.....:-)
-
8. Re: JBossSerialization and Inheritance
clebert.suconic Apr 26, 2006 6:18 PM (in response to brei)Testcase is on org.jboss.serial.nonserializable package BTW, under testsuite.
The fix was simply explore super classes if the Slot is for a non serializable class.
The fix is on org.jboss.serial.classmetamodel.ClassMetaDataSlot -
9. Re: JBossSerialization and Inheritance
epbernard Apr 26, 2006 6:18 PM (in response to brei)"clebert.suconic@jboss.com" wrote:
Probably I should enter to the guiness book.
The fastest solution to bug after being informed :-) lol
Nan what is really fast is when you just commit the fix before the question is raised ;-)