sharing coldspring config

1 view
Skip to first unread message

David Mineer

unread,
Dec 17, 2009, 12:39:42 PM12/17/09
to coldspri...@googlegroups.com
I have a coldspring definition file for a model glue app.  Seperate from the main model glue coldspring config file.
 
How can I reuse this in another non modelglue app?
 
Pointing to the absolute path in loadbeans works to load the bean, but then the paths for all the beans are all setup relative to the mgapp.

What are my options?

--
David Mineer Jr
---------------------
The critical ingredient is getting off your
butt and doing something. It's as simple
as that. A lot of people have ideas, but
there are few who decide to do
something about them now. Not
tomorrow. Not next week. But today.
The true entrepreneur is a doer.

Chuck Savage

unread,
Dec 17, 2009, 12:42:48 PM12/17/09
to coldspri...@googlegroups.com
have you tried mappings?

David Mineer

unread,
Dec 17, 2009, 12:47:02 PM12/17/09
to coldspri...@googlegroups.com
No I haven't, but I can see how that would work, but It would require some changes to the current xml file, which I could do, but would rather not.  Most beans just point somewhere in the model directory, and there are those that point to the transfer directory.
 
I guess I could rename them to something less generic and create mappings like mymodel and mytransfer.  If there isn't a better way then that is what I will try, I was hoping to just pull it out and have it work exactly as if I were inside the MG app as far as calling objects from coldspring is concerned, so I wouldn't have to duplicate alot of that already written code.

On Thu, Dec 17, 2009 at 10:42 AM, Chuck Savage <ch...@searisen.com> wrote:
have you tried mappings?

--

You received this message because you are subscribed to the Google Groups "ColdSpring-Users" group.
To post to this group, send email to coldspri...@googlegroups.com.
To unsubscribe from this group, send email to coldspring-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/coldspring-users?hl=en.

Chuck Savage

unread,
Dec 17, 2009, 1:02:21 PM12/17/09
to coldspri...@googlegroups.com
Well I'm not an expert, you might wait for one of the guru's to reply or cross post to the MG user group.  I was just thinking if your mg app was in a directory /mg, you could create a mapping to the model folder with /mg/model and for all those beans that refer to the transfer, create another mapping /frameworks/transfer (or wherever you have it).

I have to do similar for my MG app to work, here's a snippet from my MG application.cfc
    this.mappings['/mg'] = ExpandPath('.');
    this.mappings['/ColdSpring'] = ExpandPath('/Frameworks/ColdSpring');
    this.mappings['/EnvironmentConfig'] = ExpandPath('/Frameworks/EnvironmentConfig');
    this.mappings['/ModelGlue'] = ExpandPath('/Frameworks/ModelGlue');
    this.mappings['/reactor'] = ExpandPath('/Frameworks/Reactor/reactor');
    this.mappings['/reactorData'] = ExpandPath('./reactorData');

I figure you might do something similar.

Brian Kotek

unread,
Dec 17, 2009, 1:17:31 PM12/17/09
to coldspri...@googlegroups.com
Move the common components into a central location (i.e. "shared.components"), create a mapping, and then reference that path in your config file(s).

--

David Mineer

unread,
Dec 17, 2009, 4:34:39 PM12/17/09
to coldspri...@googlegroups.com
That makes sense. I will use that approach.
 
Thank you,

Sean Corfield

unread,
Dec 18, 2009, 11:33:00 AM12/18/09
to coldspri...@googlegroups.com
On Thu, Dec 17, 2009 at 10:17 AM, Brian Kotek <bria...@gmail.com> wrote:
Move the common components into a central location (i.e. "shared.components"), create a mapping, and then reference that path in your config file(s).

We just went through this on a project where we went from one website to four and they all share some components.

We use <import> in the per-application ColdSpring files to pull in the shared definitions. That keeps the CFML code simpler (it just loads its own local ColdSpring file).
--
Sean A Corfield -- (904) 302-SEAN
Railo Technologies US -- http://getrailo.com/
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
Reply all
Reply to author
Forward
0 new messages