On Wed, Jan 25, 2012 at 4:04 AM, Chris Blackwell <ch
...@team193.com> wrote:
> oh that is very cool.. i like that.
> I went with option 2
> so what i've done is
> - add the required schema's to the core xml file, i think this should be
> compatible with CS1.2? (haven't tested yet)
> - alter ModelGlue's ColdspringBootstrapper to detect which version of CS
> is available,
> - if its CS2 also include an extra file with a bean definition for
> "ColdSpring2RegistryCleaner"
> - ColdSpring2RegistryCleaner checks for the existence of transfer and
> reactor and if not available removes the beans (if they exist)
> This is working nicely in the site i'm currently developing. I'll have to
> merge my changes with the latest MG and see if all the unit tests pass. If
> they do i'll submit a patch to the team and see what they think
> Thanks for the help
> Chris
> On 24 January 2012 14:14, Mark Mandel <mark.man...@gmail.com> wrote:
>> ColdSpring call getComponentMetaData() on all it's beans. I don't think
>> there is a way not to make it do that (be curious as to the stack trace you
>> are getting, so I can work out if it would even be possible, but I doubt
>> it), and I assume that is where your issue lies.
>> There are 2 ways, but basically one concept - you need to check if the
>> framework Reactor / Transfer exists, and then programatically add in the
>> BeanDefinitions for the ormAdapter and ormService beans.
>> 1) Write a custom xml namespace for model glue to use internally.
>> This is the cleanest from an implementation point of view, but is a bit
>> more work. The parse() method in a AbstractBeanDefinitionParser gives you a
>> nice simple hook to add in your own bean definitions to the BeanRegistry.
>> http://coldspring.sourceforge.net/2.0-alpha1/docs/api/coldspring//col...
>> 2) This is probably a bit less work to do - but add a
>> BeanDefinitionRegistryPostProcessor to your XML configuration.
>> http://coldspring.sourceforge.net/2.0-alpha1/docs/api/coldspring/cold...
>> This will enable you to intercept very early on in the instantiation
>> process - such that you can manually add and remove your own beans.
>> From either approach, you can look for the existance of either of these
>> frameworks, and add the required services as you need them.
>> These approaches need more than just API documentation, but I'm happy to
>> point you towards existing code that shows you how it works.
>> Mark
>> On Wed, Jan 25, 2012 at 12:28 AM, Chris Blackwell <ch...@team193.com>wrote:
>>> I've got a patch mostly working but i'm slightly stuck.
>>> The CS1.2 compatible ModelGlueConfiguration.xml that contains the
>>> frameworks core beans defines beans for the Reactor and Transfer factories.
>>> I guess in CS1.2 these were never looked at unless requested, but CS2 is
>>> throwing an error because the cfc's don't exists even though they are never
>>> used.
>>> One solution would be to remove them and require the user to include
>>> them in their app's beans if required, but i wondered if there was any
>>> other way around this as i'm trying to minimize the changes required.
>>> Cheers, Chris
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ColdSpring-Users" group.
>>> To post to this group, send email to coldspring-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> coldspring-users+unsubscribe@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/coldspring-users?hl=en.
>> --
>> E: mark.man...@gmail.com
>> T: http://www.twitter.com/neurotic
>> W: www.compoundtheory.com
>> 2 Devs from Down Under Podcast
>> http://www.2ddu.com/
>> --
>> You received this message because you are subscribed to the Google Groups
>> "ColdSpring-Users" group.
>> To post to this group, send email to coldspring-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> coldspring-users+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/coldspring-users?hl=en.
> --
> You received this message because you are subscribed to the Google Groups
> "ColdSpring-Users" group.
> To post to this group, send email to coldspring-users@googlegroups.com.
> To unsubscribe from this group, send email to
> coldspring-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/coldspring-users?hl=en.