commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor Marakov" <igor...@ivmsystems.com>
Subject [betwixt] Reader registration problem
Date Wed, 01 Mar 2006 21:40:22 GMT
I wonder if anybody had seen this:

When reader registration map is created for incoming XML translation it is
created with tag/class pairs.

I ran today into the situations when IF an element of the registration
HashMap in the reader has NOT NULL "next" element, then during the
translation instance of the wrong class is created. 

Unfortunately I cannot provide a real example but, here is what happens:

** registration process **
...
reader.registerBeanClass("mybean", com.rather.long.class.name.Mybean);
reader.registerBeanClass("mybeanSimilarName",
com.rather.long.class.name.MybeanSimilarName);
...

What I see in debugger:
** resulting HashMap ** inside the reader ( registeredClasses )
HashMap$Entry [xx] value com.rather.long.class.name.Mybean
Field "key"  com.rather.long.class.name.Mybean
Field "next" HashMap$Entry com.rather.long.class.name.MybeanSimilarName


** On translation of the XML element "mybeanSimilarName"

** Bean factory ( I have my own chained in ) ** 
reports two beans being instantiated:
com.rather.long.class.name.Mybean
com.rather.long.class.name.MybeanSimilarName


** resulting object is **
com.rather.long.class.name.Mybean
 

Thanks,
Igor


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message