RE: ObjectRepositoryAssembler issue
"Christian Cryder" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Thelmo, Ok, you have discovered a bug (congratulations :-) <object name="$myconfig" class="mypackage.Config"> <prop name="a">Set this string</prop> <method name="addSomethingToB" arg="do" arg0="it" /> </object> What was happening is that the arglist gets populated by the first prop statement, and then it was never getting cleared, so when you called the method...BANG! there was additional stuff there. The solution was to clear the argList every time we start a <method> tag. I've updated the test cases, verified it works, and rebuilt the jars (specifically, plankton.jar), so if you can update from cvs, your problems should be solved. Thanks for finding this... Christian ---------------------------------------------- Christian Cryder Internet Architect, ATMReports.com Project Chair, BarracudaMVC - http://barracudamvc.org ---------------------------------------------- "Coffee? I could quit anytime, just not today" > -----Original Message----- > From: [email protected] > [mailto:[email protected]]On Behalf Of Thelmo Loisio > Sent: Wednesday, November 12, 2003 4:24 AM > To: [email protected] > Subject: [Barracuda] ObjectRepositoryAssembler issue > > > I would like to start using the OR which really is a good way to solve > some of my problems. > > I need to set some global (application wide) parameters so i've done a > class which have some methods that i would like to call from > object-repository.xml > > In my class i got: > class Config { > public static String a; > public HashMap b; > public void addSomethingToB(String key, String value) { > b.pub(key, value); > } > } > > And in object-repository.xml i got > <object name="$myconfig" class="mypackage.Config"> > <prop name="a">Set this string</prop> > <method name="addSomethingToB" arg="do" arg0="it" /> > </object> > <register key="MY_CONFIG" value="$myconfig" /> > > Now i've enable all the possible logging (which is a lot) and i can se > that the prop is correctly settled while when it try to invoke the > method it use: > addSomethingToB(Set this string, do, it) instead of using only the two > "arg" value i'm passsing to it > > Any hint !? > > Thanks > -- > Thelmo > > > > -- > Email.it, the professional e-mail, gratis per te: http://www.email.it/f > > Sponsor: > Scopri i vantaggi della Wooow Flat: fino a 3 mesi gratis, scopri > come cliccando qui > Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1813&d=12-11 > _______________________________________________ > Barracuda mailing list > [email protected] > http://barracudamvc.org/lists/listinfo/barracuda