New Posts New Posts RSS Feed: Application Library Caching problem
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Application Library Caching problem

 Post Reply Post Reply
Author
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Topic: Application Library Caching problem
    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.
Back to Top
stephenmcd1 View Drop Down
DevForce MVP
DevForce MVP


Joined: 27-Oct-2009
Location: Los Angeles, CA
Posts: 166
Post Options Post Options   Quote stephenmcd1 Quote  Post ReplyReply Direct Link To This Post 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. 
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
stephenmcd1 View Drop Down
DevForce MVP
DevForce MVP


Joined: 27-Oct-2009
Location: Los Angeles, CA
Posts: 166
Post Options Post Options   Quote stephenmcd1 Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down