203 Lotus blogs updated hourly. Who will post next? Home | Blogs | Search | About 
 
Latest 7 Posts
Bleedyellow.com has a new home
Sat, Nov 11th 2017 11
Life sign / Major update for Domino JNA on Github
Fri, Nov 10th 2017 10
New APIs for Domino JNA project, now available for XPages development
Mon, Jan 16th 2017 3
New APIs for Domino JNA project, now available for XPages development
Mon, Jan 16th 2017 1
My latest wish list for the Domino Java API
Thu, Nov 3rd 2016 3
My latest wish list for the Domino Java API
Thu, Nov 3rd 2016 2
Big update for Domino JNA project on Github
Mon, Jul 11th 2016 2
Top 10
Bleedyellow.com has a new home
Sat, Nov 11th 2017 11
Life sign / Major update for Domino JNA on Github
Fri, Nov 10th 2017 10
Tools we use to build web apps
Sun, Sep 21st 2014 6
XSS security fix in Domino R9 HTTP server may break existing web applications
Mon, Jun 3rd 2013 6
Quick tip: Fixing Dojo drag and drop issues in a Windows 8 VMWare on the Mac
Thu, Mar 7th 2013 6
Fast Notes view reading via Java API:New ViewNavigator cache methods in 8.5.3
Thu, Jan 17th 2013 6
Download links for IBM Connect 2013 session slides
Thu, Jan 31st 2013 5
Notes 9.0.1 64 bit for Mac OS X 10.11 El Capitan now available - warning our customer NOT to update for 30+ days!
Tue, Sep 29th 2015 5
Big update for Domino JNA project on Github
Mon, Jul 11th 2016 5
New C API method NIFFindByKeyExtended2 in Domino 9.0 improves view lookups
Fri, Mar 6th 2015 4


New on Github: Domino JNA - Cross-platform access to IBM Notes/Domino C API methods from Java
Twitter Google+ Facebook LinkedIn Addthis Email Gmail Flipboard Reddit Tumblr WhatsApp StumbleUpon Yammer Evernote Delicious
Karsten Lehmann    

I would like to introduce you to a pet project that I have been working on for the last months:

Domino JNA -

Cross-platform access to IBM Notes/Domino C API methods from Java

As you might have already read in this blog in the past, we have been playing with the Domino C API for some time now and found out that you can speed up view reading dramatically when you talk directly to the C API instead of using IBM's Java classes.

The C API also provides lots of other functionality for which no Java or LotusScript methods exist yet.

It has always been possible to build your own DLL with C code calling Domino methods and use it via Java's Native Interface (JNI). We did this in applications developed for customers and partners, e.g. to render Richtext to HTML format, directly stream attachments (IBM's API first stores files temporarily to disk, not a good idea) or replicate databases with a progress callback.

But the problem has always been that the native code has to be compiled for each platform.

JNA to the rescue

Java Native Access is a project that gives Java developers access to native shared libraries without creating their own DLL or library file.
You simply call Java methods and make sure that your method arguments match those on the C side.

So I created my first small sample application months ago calling some Domino code, found out that it worked in Windows 32 bit, found out that I had to change something for Windows 64 bit to get more than just crashes, found out that the whole stuff did nothing than crashing in Linux systems, read lots of Domino C API documentation, build testcases, documented the API methods....

...and months later I uploaded the whole stuff to Github. :-)

Here it is:


An API is nothing without documentation and sample code. And I am working on that, but this takes time. There are already a few testcases available for the view functions.

Since talking to low level functions is not what everybody likes, I am also creating helper functions that make working with the API easier. I rename stuff, I add stuff and hide stuff. So please be aware that this project is definitely not finish and will change, but I want to share the code today because it already creates value and works quite well for us.

What does it do already?

Here are some of the things you can do with the first version:
  • view lookups using different key formats (e.g. strings, numbers, dates, date ranges) and equality/inequality searches (e.g. find less or greater than a search key)
  • decodes all available types of view column data types (string, string list, number, number list, datetime, datetime list) and row data (e.g. just note id, UNID, counts, unread flag etc.)
  • read view data as another Notes user
  • separation of Notes views and their data into multiple databases (like programmatically creating private views and keeping them up-to-date incrementally)
  • special optimized functions for local databases (e.g. when API is running on the server and databases are on the server as well):
    • dynamic filtering of view rows based on a Note id list with paging support (this really rocks!)
    • reading categorized views with expanded/collapsed entries and min/max level
  • read design collection with design elements in a database
  • support for view resorting (changing the collation in C API terms)
  • fulltext index creation with all available options
  • supports incremental synchronization of Domino databases
    by reading noteid lists of modified and deleted documents (IBM's Java API does not return ids of deleted docs)
  • clearing the replication history
  • compute @Usernameslist values for any Notes user

License

The Github repository contains a Maven project with the API code and setup instructions. All is available under Apache 2.0 license.

As next step, I want to add the code to an XPages Extension Library plugin to make it easier to use from XPages code.


Please provide feedback if the project is working for you.


---------------------
http://www.mindoo.com/web/blog.nsf/dx/08.04.2016191137KLEN6U.htm
Apr 08, 2016
5 hits



Recent Blog Posts
11
Bleedyellow.com has a new home
Sat, Nov 11th 2017 11:16a   Karsten Lehmann
It took some time and the domain transfer is not 100% complete, but bleedyellow.com is on it's way from René Winkelmeyer to Mindoo. Our blog is currently configured to be the default website on www.bleedyellow.com We do not have any plans yet for the domain, but did not want to let it expire. If you have any suggestions, feel free to comment.
10
Life sign / Major update for Domino JNA on Github
Fri, Nov 10th 2017 4:25p   Karsten Lehmann
Wow - I haven't written a blog post in the last 9 months! It's just so much easier to write a Tweet than to produce long articles, when I split the week between three customers and my family with two children. Just wanted to let you know that we are alive and kicking and still doing very much Domino related work! :-) Technologies have as always shifted a bit. Most of the time we create pure JavaEE projects now for our customer web apps, developed in Eclipse and not Domino Designer (ok, u
3
New APIs for Domino JNA project, now available for XPages development
Mon, Jan 16th 2017 8:21a   Karsten Lehmann
It took some time (mainly because I was very busy and my main use case for the project is not XPages), but now the Domino JNA project is available for XPages development. That means that there is an XPages Extensibility API plugin available in the project's release section on Github that can be installed both in Domino Designer and on the Domino R9 server to use the API in your own applications. After installation, the API classes are available in SSJS and Java code including API source c
1
New APIs for Domino JNA project, now available for XPages development
Mon, Jan 16th 2017 6:21a   Karsten Lehmann
It took some time (mainly because I was very busy and my main use case for the project is not XPages), but now the Domino JNA project is available for XPages development. That means that there is an XPages Extensibility API plugin available in the project's release section on Github that can be installed both in Domino Designer and on the Domino R9 server to use the API in your own applications. After installation, the API classes are available in SSJS and Java code including API source c
2
My latest wish list for the Domino Java API
Thu, Nov 3rd 2016 9:10a   Karsten Lehmann
Last week I sent an email with enhancement ideas for the Domino Java API to IBM development. Most of the stuff listed here (except new @-functions) can be implemented by wrapping existing C API functions or simple copy&paste of already existing code. We already did this using our Domino JNA project, but I thought it would be a good idea to add this functionality to the standard API and provide full platform support. I don't really have unrealistic expectations whether this will ever be
2
Big update for Domino JNA project on Github
Mon, Jul 11th 2016 9:33p   Karsten Lehmann
Last weekend, I committed a big update for the Domino JNA project on Github. Here is what's new: Note (Document) APIs The last weeks since creating the project, I added basic APIs to work with database notes (documents). The main focus was to be able to read the classic note item value types, e.g. String, Number and Date/Time with single or multiple values per item, handle a few rarely known edge cases (e.g. multiline text values that Domino stores with delimiter between the lines
0
New on Github: Domino JNA - Cross-platform access to IBM Notes/Domino C API methods from Java
Fri, Apr 8th 2016 5:11p   Karsten Lehmann
I would like to introduce you to a pet project that I have been working on for the last months: Domino JNA - Cross-platform access to IBM Notes/Domino C API methods from Java As you might have already read in this blog in the past, we have been playing with the Domino C API for some time now and found out that you can speed up view reading dramatically when you talk directly to the C API instead of using IBM's Java classes. The C API also provides lots of other functionality for whic
1
Updated on OpenNTF: Release 1.1 of Open Eclipse Update Site with Mac 64 Bit Client support and other cool stuff
Thu, Mar 3rd 2016 11:23p   Karsten Lehmann
I have updated the OpenNTF project "Open Eclipse Update Site" with release version 1.1 and added the following useful features: added support for the Mac Notes Client with 64 bit new view action to extract selected features as an update site to disk (also available in headless mode via Java agents “(API)” and “(Java-API)“) new view actions to install/uninstall selected features via rcplauncher based deployment, which is used by software distribution systems and should
2
Notes 9.0.1 64 bit for Mac OS X 10.11 El Capitan now available - warning our customers NOT to update for 30+ days!
Tue, Sep 29th 2015 8:30a   Karsten Lehmann
One day before the general availability of Mac OS X 10.11 (El Capitan), IBM released an update for their IBM Notes Client 9.0.1 with 64 bit support: http://www-01.ibm.com/common/ssi/cgi-bin/ssialias?subtype=ca&infotype=an&appname=iSource&supplier=877&letternum=ENUSZP15-0483 Previous versions were using Java 1.6 32 Bit under the hood, which was maintained by Apple for the last 7 years. Since Apple dropped support for Java 1.6 in OS X 10.11, IBM had to update their IBM Mac No
1
New C API method NIFFindByKeyExtended2 in Domino 9.0 improves view lookups
Fri, Mar 6th 2015 12:48p   Karsten Lehmann
Once again I am digging into the Notes/Domino C API to implement fast and powerful view lookups. What caused it this time was a customer requirement for "Notes Client style keyboard navigation" in web views, meaning that you type a character, press enter and the cursor position should be moved to the relevant area of the view (e.g. where the content in the first sorted view column is greater or equal letter "L"). Using standard Java APIs for this purpose (ViewNavigator.getNextSibling(), unt




Created and Maintained by Yancy Lent - About - Planet Lotus Blog - Advertising - Mobile Edition