New Posts New Posts RSS Feed: Custom DataSourceKeyResolver
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Custom DataSourceKeyResolver

 Post Reply Post Reply
brianlj View Drop Down

Joined: 03-Jul-2007
Location: United States
Posts: 8
Post Options Post Options   Quote brianlj Quote  Post ReplyReply Direct Link To This Post Topic: Custom DataSourceKeyResolver
    Posted: 12-Feb-2008 at 2:10pm
Hi -
I have been using embedded config information for deployment on IIS, but really need to work out a better solution.
I have read what I could find about creating my own DataSourceKeyResolver and the creation of the custom class doesn't seem to be much of a problem.
However, I haven't been able to get the default persistence manager to use the custom DataSourceKeyResolver.  Can someone help shed some light on how it becomes aware of and uses the custom resolver?  The documentation seems a little light there.
Thanks so much!
Back to Top
GregD View Drop Down

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 13-Feb-2008 at 6:07pm
Hi, Brian:
Copy below from Ch 4 of the Developer Guide. Did you add a probe assembly in IBConfig so DevForce knows where to look for your IDataSourceKeyResolver class?  Easiest if this is a top-level probe assembly so it will be found regardless of the data source you need to access at a given moment.

Custom DataSourceKeyResolver

Fortunately, it is easy to write a custom DataSourceKeyResolver that does exactly what you want it to do.

      Pick a project to hold your key resolver, e.g. AppHelper

      Add a top-level probe assembly tag to Ideablade.ibconfig so DevForce can find it.

<?xml version="1.0" encoding="utf-8"?>

<ideaBlade xmlns:xsi=


      Add the following references to that project:
// if creating RdbKeys
// if creating WsKeys

      Write a class that implements IDataSourceKeyResolver.

      Decorate the class with the SerializableAttribute ([Serializable] in C#, <Serializable()>_ in VB).

      Implement your version of GetKey(KeyName, KeyExtension) to handle the keys you want to manage.

      Return null (Nothing in VB) if you want the DefaultDataSourceKeyResolver to determine the key.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down