Print Page | Close Window

Application Library Caching problem

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2473
Printed Date: 29-Mar-2025 at 1:35am


Topic: Application Library Caching problem
Posted By: stephenmcd1
Subject: Application Library Caching problem
Date Posted: 28-Jan-2011 at 4:15pm

I upgraded to 6.0.8.0 and wanted to try the Application Library Caching functionality but ran into problems.    

There seems to be some problems with the MEF probing - looking at the Debug Log on the client, when I have Application Library Caching (ALC) enabled, some of the probing fails.  Specifically, here are some event from the working version of my app:

CompositionContext: '-IbDefault-' - Probed for default 'IDataSourceKeyResolver' and found 'IdeaBlade.EntityModel.DefaultDataSourceKeyResolver'.
Trying programmatic configuration of EntityService
CompositionContext: '-IbDefault-' - Probed for any 'ServiceProxyEvents' and found 'IdeaBlade.EntityModel.ServiceProxyEvents'.
Created proxy to EntityService using Uri http://smcdaniel/Dev/60/Primary/EntityService.svc/sl

But with ALC enabled, I end up with this:

CompositionContext: '-IbDefault-' - Probed for default 'IDataSourceKeyResolver' and found no matching exports.
Trying programmatic configuration of EntityService
CompositionContext: '-IbDefault-' - Probed for any 'ServiceProxyEvents' and found no matching exports.
Object reference not set to an instance of an object.

Notice that the two probings fail.  And when it can't find a ServiceProxyEvent class to use, that immediately results in a NullReferenceException that effectively halts my application.

I've narrowed it down to just IdeaBlade.EntityModel.SL.dll.  With other IdeaBlade DLLs, I can get it to work but not this one.  But I guess that makes sense sense the classes it's probing for are in that DLL.

Am I doing something wrong or do I need to somehow tell MEF to probe outside of the XAP and include the externally loaded IdeaBlade DLLs?

Thanks,

-Stephen




Replies:
Posted By: kimj
Date Posted: 28-Jan-2011 at 6:12pm

Application library caching of the DevForce assemblies is intended primarily for use in multi-XAP applications.  If you're using DevForce in the main application XAP then all DevForce assemblies need to be part of that XAP for MEF initialization to succeed (actually, it's only EntityModel.SL and Core.SL which have exported parts at this time).   We don't currently support probing of the IdeaBlade assemblies after initialization, although that's something we can look into.



Posted By: stephenmcd1
Date Posted: 31-Jan-2011 at 11:37am
Okay, that makes sense.  So you should really only enable Application Library Caching on the "non-primary" XAPs.  I didn't realize that from what the documentation had to say.  Thanks for the clarification. 


Posted By: kimj
Date Posted: 31-Jan-2011 at 12:12pm
We haven't actually posted our documentation for this, it's coming soon :).  Supporting a "late" initialization of IdeaBlade defaults from our assemblies is a good idea, just not something we included in this release.



Print Page | Close Window