• Anonymous
  • Login
  • Register
Startup and Shutdown Script Hooks for Lotus Notes

Owners Richard Wilson, Niklas Heidloff Category
Software Development Tools
Contributors - Platform
R 8.5.1
Downloads 296Download latest release Last Release Jul 5, 2010
Rating
(0 ratings)
Project Creation Jul 5, 2010
Status Not active Short URL Not defined
Description Startup and Shutdown Script Hooks for Lotus Notes In Catalog
No


The following two samples demonstrate how to add Notes early startup and late shutdown custom processing.  It is expected that the custom code runs quickly as it will have an overall effect on the client startup and shutdown performance.  When the startup and shutdown hooks are triggered, the NSF services are not running and the end-user is not authenticated.  Example uses for adding custom processing include but are not limited to configuring notes, performing a migration step, such as cleanup of outdated settings, and simple roaming for custom settings.

The Notes lifecycle on Windows begins with notes.exe and nlnotes.exe; the lifecycle ends with the termination of the Java runtime.  The following samples include code for both the front-end and back-end of the lifecycle.  This code will interest those that are interested in knowing how to hook-in to the Notes lifecycle at a low level.  For those that are not interested in the low-level hooks, but that are nonetheless interested in adding custom startup and shutdown processing, the sample also includes a way to run custom script.

The startup code sample demonstrates how to hook-in early to the notes startup process at the point where the Notes operating system layer is initialized, no databases are open, and the end-user has not yet authenticated.  It is at this point where updating Notes data directory files can occur.  Early startup relies on the Notes Extension Manager triggering custom code.  The hook-in code is executed synchronously.  Best practices indicate that your hook code runs as quickly as possible and pass execution back Notes to continue startup initialization.  The sample is written in C and uses the Notes extension manager.  It is guaranteed to run only once during startup.

A second example is included that demonstrates how to hook into the shutdown sequence at the point where the nlnotes process has exited and the Java process is about to exit.  This sample is written as an Eclipse plug-in and relies on Eclipse early startup registration for registering a JVM shutdown hook that is triggered during the very last part of the shutdown sequence.

For development and testing, the shutdown plug-in can be installed into Notes through the file/application/install menu.  When deploying your tested plug-in it is recommended to add it into the Notes kit.  See 'Customizing the Notes install manifest for supplied Eclipse features' in the Domino 8.5 Administrator's Guide for more detail.

http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp?topic=/com.ibm.help.domino.admin85.doc/DOC/H_CUSTOMIZING_THE_NOTES_8_INSTALL_MANIFEST_FOR_SUPPLIED_ECLIPSE_FEATURES_1294_OVER.html

To run the samples, copy the startup.dll and startup.js to the notes directory and add the ExtMgr_AddIns=startp.dll setting to the notes.ini file.  Next, start Notes and install the shutdown plugin from Notes using the file/applications/install menu and the following steps: (1) Search for new features to install; (2) add zip/jar location; (3) choose the shutdown_site.jar; (4) choose the shutdown feature; (5) follow additional prompts; (6) restart notes.  When Notes is run, a start dialog message box will appear before any database is opened, and on shutdown a message box will appear after all dbs are closed.

In this sample, the default location for the startup.js script is in the Notes home directory.  It is also possible to configure the startup and shutdown processing to use scripts in custom locations as shown in the settings below.

Notes.ini
StartupScript=C:\notesext\custom\startup.js

Plugin_customization.ini
com.ibm.sample.shutdown/script=c:\\notesext2\\custom\\shutdown.js
or
com.ibm.sample.shutdown/script=c:/notesext2/custom/shutdown.js

File list
----------
build.bat           - build startup sample
initenv.bat           - initialize build environment
readme.txt             - this file
shutdown_project.jar - source for the shutdown plugin
shutdown_site.jar    - update site for the shutdown plugin
startup.c           - source to startup sample
startup.def           - def file for startup sample
startup.dll           - dll to test startup sample
startup.js           - js to test startup sample
startup.mak           - make file for startup sample
 
 
Richard Wilson is the author, Niklas Heidloff only committer.


Projects can have short and readable URLs, e.g. http://mobilecontrols.openntf.org.

You can request a short URL to your project by sending a mail to support at openntf dot org. Put the word 'OpenNTF' somewhere in the subject.
Owners are the people with maximal rights. For example they can create releases and add more contributors.

In order to define multiple owners use "," (comma) as separator.

Because of data privacy you cannot lookup other people's names but you have to type them in.
Enter the contributors or owners here who you want to receive notifications and questions by email.

In order to define multiple owners use "," (comma) as separator.

Because of data privacy you cannot lookup other people's names but you have to type them in.
In addition to the owners additional OpenNTF contributors have to be listed here. Contributors don't have the same access rights as owners, e.g. they cannot create releases.

In order to define multiple owners use "," (comma) as separator.

Because of data privacy you cannot lookup other people's names but you have to type them in.
Enter a short description of the project here (up to 100 characters).

The short description shows up in the project UI and in some of the views.
In this field you should enter a more detailed description of your project.

You can use the rich text editor for rich text formating. You can also enter HTML to embed objects, e.g. to embed a YouTube video or a screenshot of the project. In this case use '[' and ']' to mark the passthrough HTML as such.

Please note that the first time you use the new UI your description is converted from rich text to MIME. You might want to copy and paste the raw plain text from the old UI in the new UI so that you don't loose information.
A Catalog Release is for projects that are production ready and that are end-user "install friendly".

This property describes whether any release of this project has been added to the catalog.

Learn more about the catalog.