At ICON UK I presented about the OpenNTF Domino API and mentioned a modified Update Site template for dropping the org.openntf.domino jar into a server / Designer install. I was reminded recently that I had not included that in my session material. So here it is.
Firstly, a few caveats:
- This is provided as is. I’ve tested it to drop the jar into Windows. I don’t have the capacity to test on other platforms.
- It will work fine for dropping the files onto the server. It doesn’t work for replacing or removing. That’s because Domino locks the jar as soon as it’s used. You can’t then do anything with it via LotusScript while Notes / Domino is running, and an agent can’t run when the target platform the code runs on isn’t active! Anyone who wants to extend the code to get around that, I’m happy to take amendments.
So this is a workaround for initial delivery, but I would still strongly getting access to the server, whether via an admin or whatever. Whether used for this project or not, adding files to jvmlibext is the only method I’m aware of to avoid having the same jars in multiple places, just so you can access them from Java agents as well as XPages. From Windows Explorer you can replace the jar file while the server is up, but you do need to restart the server to “reload” it.
You can use the application as any other Update Site (it’s based on the R9 template), but bear in mind that the “Delete All Content” action will also delete the jars and server deployments. So you might want to keep it separate or just use it for a specific jar / plugin.
The first step is to go to the All JARs view and use the Import Local JAR… button to import the relevant jar file. Then go to the ServerDeployments view and use the Create Jar Server deployment… button.
Select the server(s), jar(s) and select the destination. At least one server name is required, but it can be any value, if you just want to use for local deployment. Once saved and re-opened, you’ll have buttons to Deploy to Server Now and Deploy to Client Now. When the button is clicked, it deploys to the relevant environment. You may need to restart the server for it to pick up the jar. That certainly needs to be done when replacing the jar.
Enjoy!