I have a package of CFCs that I provide access to my developers via a
factory.  This factory is loaded by a database configuration and a
properties xml configuration file.

 

For example (all examples are very simplified)

 

<cfset application.factory=createObject('component',
'components.edonor.factory').init() />

 

<cffunction name="init">

            <!--- load from db --->

            <!--- load from config -->

            <!--- loop through beans -->

            

            <cfreturn this />

</cffunction>

 

My package includes components such as Donor and BloodDrive.  To use
these within the package I simply call getDonor().  Within the view you
simply call application.factory.getDonor().

 

I added ColdSpring to manage dependencies between the package and other
packages which work out well as long as there is access to shared
scopes.

 

I am in the process of creating a simple SOA service bus which is
basically a factory off services which is another package. Currently my
packages can standalone or depend on each other.  My problem is that
some of these services need to access say a Donor record.   I need for
my bus package to talk to the base package.  I can't use the application
scope, so therefore ColdSpring or I can connect these two packages.  I
can make it work, however I do not want to have to initialize of course
the packages again. 

 

Does anyone have any suggestions?  Since the REST and SOAP services in
the bus package do not have access to any shared scopes, how is it
possible to have a cache layer that contains the packages?

 

Packages

            Basepackage (talks amongst itself, provided via application
and server scope)

            Servicebus (needs to talk to base and logging, only rest and
soap services)  (Do not want to have to init logging and or basepackage
on every call.   How to cache the initialization?) 

            Logging (talks to base via coldspring, talks amongst itself,
provided via the base package)

 

Thanks,

Bryan


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to