<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Having code execute on BOS startup?</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Having code execute on BOS startup?</description>
  <pubDate>Tue, 14 Apr 2026 09:36:36 -700</pubDate>
  <lastBuildDate>Wed, 08 Aug 2007 12:28:40 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=360</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Having code execute on BOS startup? :  You should be able to implement...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=360&amp;PID=889#889</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=21" rel="nofollow">IdeaBlade</a><br /><strong>Subject:</strong> 360<br /><strong>Posted:</strong> 08-Aug-2007 at 12:28pm<br /><br /><FONT color=#000080 size=2><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT color=#000000><FONT face="Times New Roman">You should be able to implement a custom PersistenceServiceApplication class and override the OnServiceStartup method to do this. &nbsp;This code is called when the PersistenceService instance is constructed.&nbsp; Note you must include the assembly name containing your class in the &lt;probeAssemblyName&gt; list in the IdeaBlade.ibconfig for your implementation to be found.<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" color=#000000 size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT color=#000000><FONT face="Times New Roman">Here’s a sample class, but there’s more information in the Consolidated Help:<o:p></o:p></FONT></FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial"><o:p><FONT color=#000000 size=3>&nbsp;</FONT></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: 'Courier New'"><FONT size=3><FONT color=#000000>&nbsp; </FONT><SPAN style="COLOR: blue">public</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: blue">class</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: teal">CustomPersistenceServiceApplication</SPAN><FONT color=#000000> : </FONT><SPAN style="COLOR: teal">PersistenceServiceApplication</SPAN><FONT color=#000000> {<o:p></o:p></FONT></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: 'Courier New'"><o:p><FONT color=#000000 size=3>&nbsp;</FONT></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: 'Courier New'"><FONT size=3><FONT color=#000000>&nbsp;&nbsp;&nbsp; </FONT><SPAN style="COLOR: blue">public</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: blue">override</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: blue">void</SPAN><FONT color=#000000> OnServiceStartup(</FONT><SPAN style="COLOR: blue">object</SPAN><FONT color=#000000> sender, </FONT><SPAN style="COLOR: teal">ServiceStartupEventArgs</SPAN><FONT color=#000000> e) {<o:p></o:p></FONT></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: 'Courier New'"><FONT size=3><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT><SPAN style="COLOR: blue">base</SPAN><FONT color=#000000>.OnServiceStartup(sender, e);<o:p></o:p></FONT></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: 'Courier New'"><FONT size=3><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT><SPAN style="COLOR: green">// Custom initialization logic <o:p></o:p></SPAN></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: 'Courier New'"><FONT size=3><FONT color=#000000>&nbsp;&nbsp;&nbsp; }<o:p></o:p></FONT></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: 'Courier New'"><FONT size=3><FONT color=#000000>&nbsp; }<o:p></o:p></FONT></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial"><o:p><FONT color=#000000 size=3>&nbsp;</FONT></o:p></SPAN></P><P></FONT>&nbsp;</P>]]>
   </description>
   <pubDate>Wed, 08 Aug 2007 12:28:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=360&amp;PID=889#889</guid>
  </item> 
  <item>
   <title>Having code execute on BOS startup? : We&#8217;re working on having a memory...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=360&amp;PID=888#888</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=20" rel="nofollow">Customer</a><br /><strong>Subject:</strong> 360<br /><strong>Posted:</strong> 08-Aug-2007 at 12:25pm<br /><br /><P dir=ltr><SPAN lang=en-us><FONT face=Arial size=2>We</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Arial size=2>’</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Arial size=2>re 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.&nbsp; 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.&nbsp; 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?</FONT></SPAN></P>]]>
   </description>
   <pubDate>Wed, 08 Aug 2007 12:25:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=360&amp;PID=888#888</guid>
  </item> 
 </channel>
</rss>