|
From: Alef A. <al...@jt...> - 2004-04-03 11:21:50
|
Err, Been able to get a beanfactory up-and-running, however, not in a way as elegant as I wanted it to be, but that's something that's probably going = to take some more time and thinking. It's something like this, and I don't = like it ;-) test =3D new BeanDef (age:8,name:'susan') test.singleton =3D true test.dependencyCheck =3D PRIMITIVES est =3D new BeanDef (age:10) est.name=3D'jim' est.spouse=3Dtest est.singleton =3D false I'm not entirely sure how to go about the dependencies and properties of = a bean versus the behavioral stuff (singleton, dependency checking, = etcetera). For sure we need some extra stuff here (i.e. some kind of wrapper around = the BeanDefinition class--the BeanDef class in the script above), I don't = think dealing with MutablePropertyValue objects in a Groovy script directly is = the way to go. But maybe you noticed the problem in the script above = already: you can't have dependencies named 'singleton' or 'dependencyCheck' here. = So maybe including some kind of metadata object might be an option. By the way, from my point of view, there's a difference between reading = in and modifying a applicationcontext and its beandefinition and actually approaching/using it at runtime. Currently I'm only thinking about the former... Using it from Groovy scripts however could be quite something = as well! Regards, Alef > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On = Behalf > Of Darren Davison > Sent: Saturday, April 03, 2004 1:01 PM > To: spr...@li... > Subject: [Springframework-developer] Groovy / Jython (was: Road map) >=20 > On Saturday 03 April 2004 09:47, Alef Arendsen wrote: >=20 > > It would be nice to have something in the sandbox indeed. I'm = currently > > experimenting with a GroovyBeanDefinitionReader and it seems it's = not > > going to be all that tough to get it running! >=20 > snap! >=20 > I started looking at something similar in both Groovy and Jython = (partly > to > see which of those two was 'best'). Thought it may be very useful for > writing tests or certain deployment scripts. >=20 > How far have you got with it? >=20 > -- >=20 > Darren Davison > Public Key: http://www.davison.uk.net/key.jsp >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |