That's
a very interesting speculation (that unmarshaller first tries to find class/attr
for every XML element).
I'm
planning to submit a bug and example that seems to result from unmarshaller
doing what you say the first time it tries to unmarshal. Indications are that
even though get/set methods exist and I am not using 'direct', Castor wastes
time looking member variables, and worse yet, it even looks at private
members.
------
Glenn
Nelson in Scotts Valley
mailto:[EMAIL PROTECTED]
Office: 831-440-6484
Mobile: 831-419-8929
-----Original Message-----
From: ext Krueger, Uwe [mailto:[EMAIL PROTECTED]
Sent: Monday, March 08, 2004 1:52 AM
To: [EMAIL PROTECTED]
Subject: [castor-dev] How to avoid usage of the Java Reflection API during unmarshalling?
From: ext Krueger, Uwe [mailto:[EMAIL PROTECTED]
Sent: Monday, March 08, 2004 1:52 AM
To: [EMAIL PROTECTED]
Subject: [castor-dev] How to avoid usage of the Java Reflection API during unmarshalling?
Hi
,
we have a messaging
system withit we send XML to several recievers.
The XML is quite
complex and contains a lot of elements.
I have a reciever
client that is interested in a part of the data only.
I wrote a mapping
file to map only the needed elements and set the unmarshaller to ignore
extra
elements. But the
performance is really poor.
The performance is
getting better the more elements I map.
I suspect that the
unmarshaller first tries to find a class/attributes for every XML element
with
Java Reflection
even though the ignoreExtraElements direction is
set.
Only if it doesn't
find a class it ignores the element.
Is there a way to
avoid the unnecessary usage of reflection and ignore immediatly the
elements?
thanx,
Uwe
M�ller GmbH
& Co. KG
Albstrasse
80
89081 Ulm-Jungingen
Telefon: +49 731/174 -182
Telefax:
+49 731/174 -
E-Mail: Uwe[EMAIL PROTECTED]
Internet: http://www.mueller.de
