All
All
Projects
Snippets
Go
Explore
Home
About
Get Involved
IP
Legal
Interact With Us
Blog
Webinars
Discord
Twitter
YouTube
Facebook
OpenNTF GitHub
OpenNTF Connections GitHub
IBM Connections Downloads
DominoHelp (external)
Explore
Home
About
Get Involved
IP
Legal
Interact With Us
Blog
Webinars
Resources
Discord
Twitter
YouTube
Facebook
OpenNTF GitHub
OpenNTF Connections GitHub
IBM Connections Downloads
DominoHelp (external)
Resources
Discord
Twitter
YouTube
Facebook
OpenNTF GitHub
OpenNTF Connections GitHub
IBM Connections Downloads
DominoHelp (external)
Projects
Snippets
Collaboration Today
Sign In
Username
Password
Forgotten your login credentials?
Login
Register
All
All
Projects
Snippets
Go
Extensibility via OSGi and Java for IBM Lotus Domino
Posted by
David Taieb
on
March 22, 2010
The Notes/Domino C API toolkit allows you to extend the server by writing applications called server addin tasks to perform various jobs like archiving, billing, logging, etc... Although very powerful, using the C API to write your tasks presents many challenges:
- Must be written in C/C++ which requires a high cost of entry
- Low productivity
- Can be hard to debug
- Must be compiled for every platform
This prototype proposes a new way of writing server addin tasks by using the Java OSGi programming model. This would solve all of the problems described above, but also add new benefits like:
- Declarative task scheduling
- Built-in mechanism to access server task user arguments
- List of tell commands to query the OSGi framework
- Extensibility
- Easy deployment
- Better tooling with Eclipse IDE and its first class Java and plugins editors and Java debugger
- Leverage existing OSGi assets (within the company or open source)
Here is the
full documentation
, here the
project
and here the
direct download link
.
OSGi itself is a Java based framework for running unit of code called bundles. It is usually associated with Eclipse, so a lot people might be surprised that it is used as a server technology. However at its core, OSGi is only a thin runtime that governs how bundles are loaded, their dependencies, how their services are exposed, etc... You can find more information about OSGi
here
.
Using OSGi plugins, a domino server task is defined by an extension point and a Java class, therefore, one plugin can host one or more server addin tasks, which are registered declaratively by using extension points in the plugin.xml of the OSGi plugin. Typically, one would use the Notes Java API (notes.jar) to write the server addin task business logic. However users can use their own JNI code by bundling their native code with the plugin (OSGi defines an easy way to do that ).
One big benefit of using this prototype is the capability for developers to schedule their task declaratively in the extension point. For example, they can specify that a task be run every X seconds. X minutes or once a day e.g.
Depending on the scenario, OSGi server tasks can also be scheduled to run on startup (via the runOnStart attribute) and can also be run on demand via the "tell javaddin run <taskid>" command on the server console.
Administrator can query the OSGi framework for the list of available server tasks using the "tell javaddin list" command:
For a complete list of all the javaddin commands, please consult the
readme.pdf
located in the distribution zip file.
For demonstration purposes, the prototype includes 3 samples server tasks:
- com.ibm.sample.scheduled: demonstrates how scheduled tasks can log information in a Notes Database
- com.ibm.sample.listViews: run on demand task that take a file path and display the list of views for the specified database.
- com.ibm.sample.sendMail: run on demand task that sends a summary email for all the databases available on the server, to the address specified as argument.
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus