New Posts New Posts RSS Feed: Implementing IEntityServerSaved not working for multiple ibedmx models
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Implementing IEntityServerSaved not working for multiple ibedmx models

 Post Reply Post Reply
Author
sanselmo View Drop Down
Newbie
Newbie
Avatar

Joined: 09-Nov-2007
Location: Canada
Posts: 7
Post Options Post Options   Quote sanselmo Quote  Post ReplyReply Direct Link To This Post Topic: Implementing IEntityServerSaved not working for multiple ibedmx models
    Posted: 21-Oct-2013 at 12:30pm
Furthermore, don't forget to put the assembly in the App.config file (for client side LAN EntityServer)
Back to Top
sanselmo View Drop Down
Newbie
Newbie
Avatar

Joined: 09-Nov-2007
Location: Canada
Posts: 7
Post Options Post Options   Quote sanselmo Quote  Post ReplyReply Direct Link To This Post Posted: 21-Oct-2013 at 9:26am
I found the source of my problems : LAN vs. WAN

Our platform uses preferably LAN mode, but if not available it will use WAN. 

In development, LAN is always used since the database is LAN reachable (if not even on the same computer!).

I have put my implementation code in a server assembly, but when in LAN, the server (clientside) cannot find the implementation. Now I moved my code in a "shared" assembly thats delivered both on the application AND server: its get called and it works!

I forgot about that DevForce part of LAN/WAN and corresponding EntityServer...

thanks kimj for your support
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: 21-Oct-2013 at 6:57am
If you're using data source key extensions an EntityServer is started for each. Each EntityServer will probe for IEntityServerSaving and other interface implementations.
Back to Top
sanselmo View Drop Down
Newbie
Newbie
Avatar

Joined: 09-Nov-2007
Location: Canada
Posts: 7
Post Options Post Options   Quote sanselmo Quote  Post ReplyReply Direct Link To This Post Posted: 20-Oct-2013 at 6:02pm
I only have one implementation and my implementation code is not key specific (it uses our injected base entity type), so no error thrown.

"Probing for an IEntityServerSaving implementation is done once only when an EntityServer starts"

Does that means that the "first and only" EntityServer initialization will use my implementation, or each "new" entity server init should use it ?

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: 18-Oct-2013 at 8:01am

Probing for an IEntityServerSaving implementation is done once only when an EntityServer starts, and an error is thrown if multiple implementations are found.  So your logic within the handler will need to be non-key specific.

For the record, we urge anyone still using DF2009 to upgrade to DF2010 or DF2012 to receive maintenance and feature updates.
Back to Top
sanselmo View Drop Down
Newbie
Newbie
Avatar

Joined: 09-Nov-2007
Location: Canada
Posts: 7
Post Options Post Options   Quote sanselmo Quote  Post ReplyReply Direct Link To This Post Posted: 17-Oct-2013 at 7:51am
Hi,

we have a software that always starts with a "base" ibedmx model. This one the "OnSaving" and "OnSaved" are invoked correctly.

We have other modules that each have their own ibedmx model, loaded on demand. 
Each of those ondemand have their own edmKey in our web.config file.
The "SaveChanges" made on those are not invoking  the "OnSaving" and "OnSaved" methods.

Any advices or things I could try?

Seb
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down