Though Domino makes working with build servers and CI/CD pipelines difficult, it is possible to do so even with complex applications. This session will discuss the specifics of using several OpenNTF projects - NSF ODP Tooling, the Jakarta XPages Runtime, and XPages Jakarta EE Support - as well as open-source technologies such as Docker to build, test, and deploy Java-based Domino applications for testing and staging. This builds on previous sessions about the NSF ODP Tooling and Maven generally.
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...Paul Withers
BP106 From XPages Hero To OSGi Guru: Taking The Scary Out Of Building Extension Libraries. From IBM ConnectED 2015, delivered jointly with Christian Guedemann
Domino applications, stored in NSFs, have been historically difficult to add to Continuous Integration tools like Jenkins and to have participate in Continous Delivery workflows. This session will discuss the NSF ODP Tooling project on OpenNTF, which allows you to take Domino-based projects - whether targetting the Notes client or web, XPages or not - and integrate them with modern tooling and flows. It will demonstrate use with projects ranging from a single NSF to a suite of a dozen OSGi plguins and two dozen NSFs, showing how they can be built and packaged automatically and consistently.
Take Your XPages Development to the Next Levelbalassaitis
Slide deck from IBM ConnectED 2015 session BP105: Take Your XPages Development to the Next Level
This intermediate-level session is for anyone who has a little bit of XPages experience. In the session, we dug deeper into a number of features that are built into XPages and can help improve application responsiveness, streamline design with code reuse, and take more control over the output that is generated by XPages controls.
There was way too much content to fit into a single session, but the slide deck includes all of the extra material that was prepared.
Topics:
Application Responsiveness
Server-Side JavaScript
Modifying Component Output
Java
Custom Controls
Debugging Tips
Event Handlers
Dojo
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...Paul Withers
BP106 From XPages Hero To OSGi Guru: Taking The Scary Out Of Building Extension Libraries. From IBM ConnectED 2015, delivered jointly with Christian Guedemann
Domino applications, stored in NSFs, have been historically difficult to add to Continuous Integration tools like Jenkins and to have participate in Continous Delivery workflows. This session will discuss the NSF ODP Tooling project on OpenNTF, which allows you to take Domino-based projects - whether targetting the Notes client or web, XPages or not - and integrate them with modern tooling and flows. It will demonstrate use with projects ranging from a single NSF to a suite of a dozen OSGi plguins and two dozen NSFs, showing how they can be built and packaged automatically and consistently.
Take Your XPages Development to the Next Levelbalassaitis
Slide deck from IBM ConnectED 2015 session BP105: Take Your XPages Development to the Next Level
This intermediate-level session is for anyone who has a little bit of XPages experience. In the session, we dug deeper into a number of features that are built into XPages and can help improve application responsiveness, streamline design with code reuse, and take more control over the output that is generated by XPages controls.
There was way too much content to fit into a single session, but the slide deck includes all of the extra material that was prepared.
Topics:
Application Responsiveness
Server-Side JavaScript
Modifying Component Output
Java
Custom Controls
Debugging Tips
Event Handlers
Dojo
BP204 It's Not Infernal: Dante's Nine Circles of XPages HeavenMichael McGarel
Do not abandon all hope, ye who enter here! Your very own Dante and Virgil will take you through a divine comedy of nine circles that show that XPages is more paradise than perdition. We'll show how XPages and related concepts like OSGi plugins make XPages a modern and vibrant development technology for web, mobile and rich client. On the way we'll guide you past some pitfalls to avoid becoming one of the lost souls. When we re-emerge, you'll see the sky's the limit with star-studded opportunities. (Presented at IBM Connect 2014)
Microsoft has traditionally been a laggard in the JavaScript space, making such developers question whether their war cries were being heard aloud. Fortunately, the situation is rapidly improving since the release of Visual Studio Code. Code is a free, lightweight, cross-platform code editor which is sure to change your perception of Microsoft.
This presentation will demonstrate how to utilize popular JavaScript tooling within the editor. The focus will be placed on the first-class support for debuggers, linters, transpilers, and task runners.
Given at TechMaine's Java Users Group on Feb 26 2008
Why do we need another build tool when we already have Ant? By focusing on convention over configuration, Maven allows you to declaratively define how your project is built, which reduces a lot of the procedural code that you'd need to implement in every build file if you were using Ant. This, along with Maven's built-in management of repositories for project dependencies, allows you to streamline your build process. Ultimately Maven can reduce the amount of time that would otherwise be wasted hunting down jar files and fiddling with boilerplate build scripts.
This presentation covers Maven's core concepts. It introduces the Plugin architecture, and explain how the most popular plugins are used. It also covers the POM concept and how it relates to dependency tracking and repositories.
My sldies from a talk including an intro to features, exportables, issues with features, state of features and how to implmenet the exportable and feature API
BP204 It's Not Infernal: Dante's Nine Circles of XPages HeavenMichael McGarel
Do not abandon all hope, ye who enter here! Your very own Dante and Virgil will take you through a divine comedy of nine circles that show that XPages is more paradise than perdition. We'll show how XPages and related concepts like OSGi plugins make XPages a modern and vibrant development technology for web, mobile and rich client. On the way we'll guide you past some pitfalls to avoid becoming one of the lost souls. When we re-emerge, you'll see the sky's the limit with star-studded opportunities. (Presented at IBM Connect 2014)
Microsoft has traditionally been a laggard in the JavaScript space, making such developers question whether their war cries were being heard aloud. Fortunately, the situation is rapidly improving since the release of Visual Studio Code. Code is a free, lightweight, cross-platform code editor which is sure to change your perception of Microsoft.
This presentation will demonstrate how to utilize popular JavaScript tooling within the editor. The focus will be placed on the first-class support for debuggers, linters, transpilers, and task runners.
Given at TechMaine's Java Users Group on Feb 26 2008
Why do we need another build tool when we already have Ant? By focusing on convention over configuration, Maven allows you to declaratively define how your project is built, which reduces a lot of the procedural code that you'd need to implement in every build file if you were using Ant. This, along with Maven's built-in management of repositories for project dependencies, allows you to streamline your build process. Ultimately Maven can reduce the amount of time that would otherwise be wasted hunting down jar files and fiddling with boilerplate build scripts.
This presentation covers Maven's core concepts. It introduces the Plugin architecture, and explain how the most popular plugins are used. It also covers the POM concept and how it relates to dependency tracking and repositories.
My sldies from a talk including an intro to features, exportables, issues with features, state of features and how to implmenet the exportable and feature API
Presentation on how Meetup tackles web performance. Given on:
- Nov 17th, 2009 for the NY Web Performance Group (http://www.meetup.com/Web-Performance-NY/)
- Jan 26th, 2010 for NYC Tech Talks Meetup Group (http://www.meetup.com/NYC-Tech-Talks/)
node.js 실무 - node js in practice by Jesang YoonJesang Yoon
Sharing 4 years of experience about node.js - A google chrome V8 engine javascript based web server technology. This slide covers about wide range of knowledge about node.js learned from 4 years of production, experiment, test & failures
4년 동안 node.js 서버 프로그래밍을 경험한 내용을 간략하게 정리해 보았습니다. node.js 를 접하시는 분들에게 도움이 되었으면 합니다.
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...London Microservices
Recorded at the London Microservices Meetup: https://www.meetup.com/London-Microservices/
- Date: 05/08/2020
- Event page: https://www.meetup.com/London-Microservices/events/272223163/
Follow us on Twitter! https://twitter.com/LondonMicrosvc
---
Services interpreted at runtime often suffer from slow startup times when components are intitialized at runtime. Ahead of time compilation allows condensing down an application by stripping down unused dependencies and pre-initializing components for a short time to first request served. This is explored by the example of GraalVM and native images.
Key takeaways:
- Be aware what your service contains
- Approaches to improve startup time of a service
- Reduction of resource requirements for a service
Tobias works at Loveholidays.com as a senior software engineer extending it's microservice architecture and turning it more event-driven.
A fairly short (26 slides) presentation covering the GlassFish community and product (v2 and upcoming modular v3) as well as Java EE 5 and upcoming Java EE 6.
5/13/13 presentation to Austin DevOps Meetup Group, describing our system for deploying 15 websites and supporting services in multiple languages to bare redhat 6 VMs. All system-wide software is installed using RPMs, and all application software is installed using GIT or Tarball.
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Ondřej Machulda
Annotated slides from Berlin PHP Usergroup Meetup, 4th April 2017.
---
Not only unit tests but also end-to-end tests in real browser are important part of test automation and test pyramid. So let's have a look how to easily write and run Selenium functional tests using PHPUnit and Steward.
This presentation was given at the Boston Django meetup on November 16, and surveyed several leading PaaS providers including Stackato, Dotcloud, OpenShift and Heroku.
For each PaaS provider, I documented the steps necessary to deploy Mezzanine, a popular Django-based CMS and blogging platform.
At the end of the presentation, I do a wrap-up of the different providers and provide a comparison matrix showing which providers have which features. This matrix is likely to go out-of-date quickly because these providers are adding new features all the time.
OpenNTF Webinar 2022-08 - XPages Jakarta EE Support in PracticeJesse Gallagher
The XPages Jakarta EE Support project on OpenNTF adds an array of modern capabilities to NSF-based Java development. These improvements can be used for wholly-new applications or added incrementally to existing ones.
In this webinar Jesse Gallagher will demonstrate how to use this project to perform common tasks in better ways, such as creating and consuming REST services, writing managed beans with CDI, and using new EL features in XPages. Though these examples will largely use Java, they do not require any knowledge of OSGi or extension library development, nor any tools other than Designer.
AD106: Expand Your Apps And Skills To The Wider World. This was a discussion of where we've been as Domino developers and how we can move on from here.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
4. The Moving Parts
Core set of OSGi plugins
XPages Library
JAX-RS–based REST services
A handful of compile-time tests
NPM-build–based JavaScript applications
Some delivered from OSGi
One delivered via NSF
A set of NSFs
Some XPages apps
Most Notes client apps
Most not properly run with source control
A set of JEE webapps
The main XPages app
One of the JS apps
Testcontainers-based tests
5. The Toolchain
Maven
maven-bundle-plugin (used to
use Tycho)
frontend-maven-plugin
NSF ODP Tooling
Eclipse (Usually)
NPM (via frontend-maven-
plugin)
XPages Jakarta EE Support
Open Liberty
XPages Runtime project
Testcontainers (Docker)
8. Brief Aside: Maven
It’s not (inherently) scary!
Just look how cute that owl is
Maven is a tool used for build automation
It’s primarily used for Java projects, but is
adaptable to many things via plugins
A “pom.xml” file is a clear giveaway of
Maven’s use
We use it here because it allows for cleanly-
reproducible builds across systems, without
environment-specific details
9. Tycho vs. MBP
Historically, we used Tycho to manage the OSGi build
It presents an OSGi environment very similar to Domino
It can strongly enforce expectations and dependencies
Good support for OSGi-based test suites with Notes environments
I switched to maven-bundle-plugin for added flexibility
It makes it much easier to use normal Maven dependencies
...but it requires a lot more knowledge of the "gotchas" of the Domino stack
I still hand-tweak OSGi options, and the compile step doesn't validate this
There are other options (bnd-maven-plugin), but I don't know them enough yet
https://frostillic.us/blog/posts/2019/8/22/converting-tycho-projects-to-maven-bundle-plugin-initial-phase
12. Runtime Independence
The core parts of the app target three
main environments:
XPages on Domino (OSGi)
Servlets on Domino (OSGi)
.war-based Jakarta EE (not OSGi)
Can't make a lot of assumptions!
13. RuntimeEnvironment Idiom
We use a RuntimeEnvironment type to handle differences
Contains methods like getSession(), getServletRequest(), etc.
Each target runtime has an implementation that does the dirty work
Core code calls RuntimeEnvironment.getSession() and works
anywhere
It gets fiddly! Error handling, detecting the right runtime, etc.
14. Balancing Dependencies
maven-bundle-plugin makes third-party dependencies easier
...but Domino still makes it hard
Some dependencies need to be re-packaged for Domino's OSGi
environment
Some are safest to avoid due to Domino's polluted classpath (Guava)
17. frontend-maven-plugin
frontend-maven-plugin allows you to run various frontend-dev tools
(npm, yarn, webpack, etc.) based on configuration in a Maven pom
We have the JS apps in a separate directory away from Java
The build config specifies node+npm versions and the target directory
One project copies the results into an OSGi plugin, another copies
them into an NSF during build
18. Example Use
Install Local Node + NPM `npm install` `npm run build`
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<phase>generate-resources</phase>
</execution>
<execution>
<id>actionItems install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<workingDirectory>${buildDir}</workingDir
ectory>
</configuration>
</execution>
<execution>
<id>actionItems build</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<workingDirectory>${buildDir}</workingDir
ectory>
<arguments>run build</arguments>
</configuration>
</execution>
21. NSF ODP Tooling
The glue for working with NSFs:
Compiles ODPs to NSF
Updates ODPs for server-side changes outside Git
Provides DXL and XSP autocomplete in Eclipse
22. Compilation
Compiles ODPs into NSFs
Uses fresh build of the OSGi plugins to
ensure compatibility
Runs in a local Equinox environment
similar to Domino
Sets $TemplateBuild fields
24. Updating Other-Developer ODPs
#!/usr/bin/env bash
set -e
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.."
find $REPO_DIR/osgi-plugin/nsfs/ -name pom.xml
-not -path */nsf-dashboard/pom.xml
-not -path */nsf-plans/pom.xml
-print0 | xargs -0 -n 1 sh -c 'mvn org.openntf.maven:nsfodp-maven-
plugin:3.5.0:generate-odp -X -f $0 || exit 255'
Update ODPs for projects other than those properly done in Git:
25. XML Autocomplete
Provides "good enough" XML
autocomplete for XSP
Covers core and custom controls, but
not third-party library controls
No preview pane, but eh...
DXL autocomplete uses the provided-
with-Domino schema files
28. XPages Jakarta EE Support
Acts as a "platform update" for the app
Brings in, in particular, EL 3 and JAX-RS 2.1, much newer than the
built-in variants
Also brings in CDI, which is used fully in the webapps and REST
services
Like managed beans, but much better
Not required for the rest of this, but it sure is nice
29. Example JAX-RS Resource
@Path("/serverInfo")
@PermitAll
public class ServerInfoResource {
@Inject
private ServerInfo serverInfo;
@GET
@Produces(MediaType.APPLICATION_JSON)
@Tag(name = TAG_EXTERNALPORTAL)
@Operation(summary = "Get information about server-specific resources", description = "...")
public ServerInfo get() {
return serverInfo;
}
}
30. XPages Jakarta EE Links
https://frostillic.us/blog/posts/2018/6/3/6AC99D0B866A92AA852582A
1006C2FA6
https://www.openntf.org/main.nsf/project.xsp?r=project/XPages%20Ja
karta%20EE%20Support
https://github.com/OpenNTF/org.openntf.xsp.jakartaee
32. XPages Runtime
Open-Source project that allows running XPages in a normal Servlet
container
I've only run it in Liberty, but others should work
Turns out all the stuff from pre-OSGi is still in there
Requires some tweaks with third-party libraries, and code has to not
assume it's in OSGi
This enables CI deployment servers and full automated tests
33. XPages Runtime
Some shim code handles bootstrapping
ODA, etc.
JAX-RS services use Liberty's built-in
support
The webapp projects use symlinks to
point to the ODP for XPages, Java, etc.
34. XPages Runtime - Tweaks
Make no assumptions about OSGi
The RuntimeEnvironment idiom goes a long way
The IBM Commons ExtensionManager accounts for this
Duplicate any plugin.xml extensions in META-INF/services
With a JEE server, no JAX-RS runtime (Wink, RestEasy, etc.) is
needed
On Liberty, don't enable JSF or JSP features (conflict with XPages)
35. XPages Runtime - Tweaks
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
NotesThread.sinitThread();
Set<Long> handles = new HashSet<>();
if(!Factory.isInitialized()) {
Factory.initThread(new Factory.ThreadConfig(new Fixes[0], AutoMime.WRAP_32K, true));
}
if(sessions.get() == null) {
sessions.set(createSession((HttpServletRequest)request, handles));
sessionsAsSigner.set(createNativeSession());
sessionsFull.set(createNativeSession());
if(StringUtil.isEmpty(expectedDbPath)) {
throw new IllegalStateException(ENV_DBPATH + " environment variable should be set to the Domino API path to the context database");
}
try {
databases.set(sessions.get().getDatabase(expectedDbPath));
} catch(Throwable e) {
}
if(!checkAccess(databases.get())) {
databases.set(null);
}
}
// ...
}
Use a @WebFilter to provide context sessions/database
(There's a lot more to this in practice)
36. XPages Runtime - Tweaks
@Override
public Object resolveVariable(FacesContext facesContext, String varName) throws EvaluationException
{
switch(StringUtil.toString(varName)) {
case "session":
case "sessionAsSigner":
case "sessionAsSignerFullAccess":
return ODAFilter.sessions.get();
case "database":
return ODAFilter.databases.get();
}
// ...
}
Use a VariableResolver to find custom session/database
39. Dockerized XPages Apps
We start with the open-liberty:full-java8-openj9 image
Then we bring in the Notes runtime parts of the official HCL Domino Docker
images
Then we bring in the built application WAR
It's already been adapted to read the context server/DB from the environment
Et voilà !
This is how I deploy CI servers with Jenkins nowadays
40. Dockerfile
# Configure the runtime image
FROM --platform=linux/amd64 open-liberty:full-java8-openj9
# Bring in the Liberty app and configuration
COPY --chown=default:users webapp.war /apps/
COPY config/* /config/
# Bring in the Domino runtime
COPY --from=domino-docker:V1101_03212020prod /opt/hcl/domino/notes/11000100/linux /opt/hcl/domino/notes/latest/linux
COPY --from=domino-docker:V1101_03212020prod /local/notesdata /local/notesdata
# Bring in our Domino config and assign the data directory to the default user
USER root
COPY --chown=default:users notesdata/* /local/notesdata/
RUN mkdir -p /local/notesdata/IBM_TECHNICAL_SUPPORT
RUN chown -R default:users /local/notesdata
USER default
ENV LD_LIBRARY_PATH "/opt/hcl/domino/notes/latest/linux"
ENV NotesINI "/local/notesdata/notes.ini"
ENV Notes_ExecDirectory "/opt/hcl/domino/notes/latest/linux"
ENV Directory "/local/notesdata"
ENV PATH="${PATH}:/opt/hcl/domino/notes/latest/linux:/opt/hcl/domino/notes/latest/linux/res/C"
ENV InitDominoRuntime="1"
# DB context env var is set when launching the container and read by the app
EXPOSE 8080 8443
43. Testcontainers
Testcontainers lets us run the full webapp (XPages + REST) with true
headless browsers
Requires Docker, a containerized app, and patience
I've only gone so far with it - with work, this could run full automated UI
tests of XPages and JavaScript apps
44. Testcontainers - Maven Process
Use maven-resources-plugin to copy a Dockerfile, built WAR, and Notes
runtime files to scratch space
Use dockerfile-maven-plugin to build the app image
`<pullNewerImage>false</pullNewerImage>` to avoid trying to resolve official
Domino images from Docker Hub
Use maven-failsafe-plugin to run all `it.*` classes
Set environment `TESTCONTAINERS_RYUK_DISABLED=true` to avoid
trouble I hit when running on Jenkins and instead manage lifecycles manually
45. Testcontainers - Example Code
driver.get(getContainerRootUrl() + "index.xsp");
assertEquals("Expected Page Title", driver.getTitle());
// Test all CSS and JS to make sure there's no 404s
URI rootUri = URI.create(getRootUrl());
driver.findElements(By.xpath("//link[@rel='stylesheet']"))
.stream()
.map(link -> link.getAttribute("href"))
.map(href -> rootUri.resolve(href))
.map(this::decontainerize) // etc.
.forEach(uri -> checkUrlWorks(uri, client));
driver.findElements(By.xpath("//script[@href]"))
// etc.