I wonder if with the new Java design element (in 8.5.3?) there is a possibility to share code between xPages (call from JavaScript) and normal Notes agents. Or something like that is planned for future.
My idea was more to able to have a common Java code base and reference it in LotusScript code via LS2J and call from server side JavaScript as well. Otherwise I need to maintain 2 code sets with the same functionality - say enforcement of some rules. The heavy lifting over multiple documents is done by a LS agent, but if I need to enforce the same rules when operating on a single document in xPage then I have to do this from SSJS. Hence painful maintenance of parallel code in two places.
Probably what could eventually become possible is the use of common Java code between server side JavaScript and Java agents. And the re-use from LS is nowhere on horizon...