ShowTable of Contents
The XPages2Eclipse feature described in this article works similar to a technique called "XAgents", covered by blog posts of Chris Toohey and Stephan Wissel:
http://www.dominoguru.com/pages/domino_rest_xpages_part1.html
http://www.wissel.net/blog/d6plinks/SHWL-7MGFBN
XAgents are an XPages version of classic web agents, a piece of code which is called via a URL from the web browser and which produces content by writing text or binary data into an output stream.
Such an agent is useful when there is a need to programmatically create web content, e.g. web pages in a Domino based Content Management System, Office documents and spreadsheets, captcha graphics for authentication or to implement your own REST service.
When working with those XPages based agents, we faced several issues that our implementation solves:
Call code in other database
Parallel execution of requests
Access to Notes Client APIs
Caching control for developers
-initial purpose: access to XPages2Eclipse API for users that do not use Dojo for the web UI
-extension to work on Domino server: no XPages2Eclipse API, but servlet and Domino APIs
Benefits
-build servlets and REST services in JavaScript instead of Java
-call code in other Notes databases, even in the local Lotus Notes client, clear separation of application code and a modular architecture
-performance gains compared to XAgent approach (XPage
Activation on Domino server
-Notes.ini variable for activation (global / per database)
mndX2ERPCEnabled_path_to_db_nsf=true
mndX2ERPCEnabled=true
-Highly optimized for performance
-same JavaScript engine for all all requests to one database
-SSJS library contents, Java class files and resources cached in memory
-OSGI commands to flush caches
x2ejs show
x2ejs drop all
x2ejs drop -n-
x2ecl show
x2ecl drop all
x2ecl drop -n-
Advanced features
-Include command
-code checks design element signature for all included libraries
restrictelevationmode=1
runelevated_C1257889004BEB96=true