New Posts New Posts RSS Feed: Having code execute on BOS startup?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Having code execute on BOS startup?

 Post Reply Post Reply
Author
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Topic: Having code execute on BOS startup?
    Posted: 08-Aug-2007 at 12:25pm

Were working on having a memory profiler taking snapshots of the BOS while our app is running to track down a possible memory leak on the server.  Our memory profiler (.NET Memory Profiler) has an API that would let us log snapshots, but we need to start the logging as the BOS is starting up.  Is there an API that would allow us to implement an interface in one of our classes or set some kind of configuration so that the BOS would call a method in one of our classes at startup?

Back to Top
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post Posted: 08-Aug-2007 at 12:28pm

You should be able to implement a custom PersistenceServiceApplication class and override the OnServiceStartup method to do this.  This code is called when the PersistenceService instance is constructed.  Note you must include the assembly name containing your class in the <probeAssemblyName> list in the IdeaBlade.ibconfig for your implementation to be found.

 

Here’s a sample class, but there’s more information in the Consolidated Help:

 

  public class CustomPersistenceServiceApplication : PersistenceServiceApplication {

 

    public override void OnServiceStartup(object sender, ServiceStartupEventArgs e) {

      base.OnServiceStartup(sender, e);

      // Custom initialization logic

    }

  }

 

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down