Hello, I'm planning to embed usage of ActiveRecord into a codebase
used in different tiers:
* desktop client application
* service
* API for customers to use

all these tiers use the same models (2 models, 2 db at the same time),
and the database can change at runtime for a given model, so it make
the framework configuration a bit tricky, but I think I can deal with
that with DifferentDatabaseScope or similar solutions.

Now my concern is mostly about ActiveRecord/NHibernate initialization
because from the API I don't have control over entry point and I don't
want to avoid customers to use ActiveRecord as well.

Still I need my handle on the initialization to register assemblies/
types and settings if the client code is already responsible of AR
initialization, or I need to perform this initialization automatically
(for client code that is not aware of AR, 99% of the cases).

Questions:
* Anyone has experience integrating ActiveRecord and dealing with
these initialization issues when there is no control over entry point?
* does using static initializer in my API codebase and
ActiveRecordStarter.ModelCreated event to perform additional type
registration sounds stupid (case when I want to add up to user AR
initialization)?
* does using ActiveRecordStarter.IsInitialized in API facade object
constructor to determine wether registration has to be performed
within API sounds stupid (case when I want to initialize AR by
myself)?

Thanks for sharing your experience

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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/castle-project-users?hl=en.

Reply via email to