Hi:
i'm a newbie to castor, and couldn't get things to work for the
following use case.. would be grateful if some one could help me with
this..
here's a simplified version of my use case..
i have 2 classes (say, A1, A2), which have a common abstract base class, B..
my producer class generates some instances of the subclasses, and
calls a method with the signature
void consume(B b);
on the consumer.. the consume method, on the other hand, looks at the
runtime class of the argument, and delegates to a specific method..
void consume(B b){
if(b.getClass() == A1.class){
consumeA1((A1)b);
}
else{
consumeA2((A2)b);
}
}
the producer and consumer are sitting in different JVMs, and the data
objects are marshalled (by my communication framework) on the client
side, transferred over the wire, unmarshalled on server side, and
passed as the argument to the Consumer.consume method..
1. can castor help me with this marshalling/unmarshalling without
having to use a mapping-file.. from what i read about castor, i need
to specify the exact subclass for unmarshalling.. and in my case, i
don't know the exact subclass at the time of unmarshalling..
2. can castor help me with a mapping-file? i understand that one
solution is to write a mapping file defining the mappings for all
concrete classes.. but i was looking at avoiding that.. the
auto-naming doesn't seem to work for top-level abstract classes..
thanks in advance..
regards,
Amit
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email