Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
ModelGlue with CS2
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Chris Blackwell  
View profile  
 More options Jan 24, 8:28 am
From: Chris Blackwell <ch...@team193.com>
Date: Tue, 24 Jan 2012 13:28:29 +0000
Local: Tues, Jan 24 2012 8:28 am
Subject: ModelGlue with CS2

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Mandel  
View profile  
 More options Jan 24, 9:14 am
From: Mark Mandel <mark.man...@gmail.com>
Date: Wed, 25 Jan 2012 01:14:20 +1100
Local: Tues, Jan 24 2012 9:14 am
Subject: Re: [coldspring-users] ModelGlue with CS2

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

--
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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Blackwell  
View profile  
 More options Jan 24, 12:04 pm
From: Chris Blackwell <ch...@team193.com>
Date: Tue, 24 Jan 2012 17:04:02 +0000
Local: Tues, Jan 24 2012 12:04 pm
Subject: Re: [coldspring-users] ModelGlue with CS2

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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Mandel  
View profile  
 More options Jan 24, 9:25 pm
From: Mark Mandel <mark.man...@gmail.com>
Date: Wed, 25 Jan 2012 13:25:38 +1100
Local: Tues, Jan 24 2012 9:25 pm
Subject: Re: [coldspring-users] ModelGlue with CS2

Oh nice - so you just remove rather than add - that makes sense.

Nice one :)

Mark

--
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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »