Jon, OOH OOH... if you look at "getBean()" as a sort of "power constructor" and we could have multiple beans of the same name with overloading provided by arguments sent to getBean() in addition to the name...
Kidding, only kidding. Chris, put the club down. No, seriously, man... put the club down. I was only kidding. Laterz, J On Mon, 10 Jul 2006 15:47:03 -0600 "Jon Gunnip" <[EMAIL PROTECTED]> wrote: > Hi, > > I just spent some time tracking down an error in CS where > it turned out I had defined the same bean twice (due to > copying and pasting some similar xml snippets). It would > be helpful if CS had alerted me to this issue. Any > reason why it shouldn't? Add the following code to > loadBeanDefinitions() in DefaultXMLBeanFactory may to it. > > on line 128 in v1.0: > <cfset var beansFound = "" > > > on line 156 in v1.0: > <cfif structKeyExists( beansFound, beanAttributes.id )> > <cfthrow > type="coldspring.DuplicateBeanDefinitionException" > message="bean with id #beanAttributes.id# > defined multiple times" > > </cfif> > <cfset beansFound[beanAttributes.id] = 1 > > > This maybe a naive approach since I don't fully > understand the CS code. > Jon > > >
