How do you work around the issue of long load time for initial load of an application - xpages

When no users have the any pages in an application open, it will unload the application from the server after a while.
When a user loads a page in the app after it's been unloaded, it can take quite a while to load.
The simplest way to work around the issue is to have an agent that polls a page in the application each morning before any users are online. Is there a better way to do this?

Starting with Notes and Domino 8.5.3, you can use the following ini parameters:
XPagesPreload=1
Preloads XPages java code at server startup so that they are already in memory when a user access an xpages app for the first time.
XPagesPreloadDB=servername!!path/mydb.nsf/myxpage.xsp,servername!!path/anotherdb.nsf
Preloads XPages engine for a specific XPage in a specific database or for all XPages in a database.
Both parameters can be used on the Domino Server and on the Notes client.
As far as I know, the application will be kept in memory even if no user doe access it.

Related

xPages don't work after design update

Load any xPage
Refresh db design
Reload the xPage by either F5 or Ctrl+F5.
then almost all functions stop working without any errors. E.g. nothing happen if you click buttons or menu items. After restarting web browser some functions come back but some still doesn't work. After cleaning browser's cache almost 90% UI start working but some still need to reload the page few times. Is there any xPage app properties or Domino properties to adjust to fix that problem and make xPage app work smooth even after design refresh
Design Refresh didn't reload custom Java classes when refreshing with 8.5.3 FP1. This was fixed, I believe, in FP2. But that doesn't sound like it's causing the problem here.
Design Refresh will not reload jar files. That requires issuing "restart task http" to the console. ("tell http restart" doesn't properly reload everything XPages needs.)
If your application is using a Single Copy XPage Design to hold its XPages design, that too will not update until you issue "restart task http" to the server. The design seems to be cached by the server for better performance, but refreshing the design of the SCXD database doesn't reload that design. It's unclear if that's your scenario here.
XPiNC may also not update immediately, but I've not tried that. The runtime there is basically in the Notes Client itself, so I could understand that it would not update.
Otherwise, I would echo Thomas's experience, I've not seen any other issues (and my applications heavily use Java). I haven't needed to clean the application following a design refresh. Existing browser sessions will have problems with partial refresh calls, I would expect that. But a refresh of the page make all functionality work.
There are two scenarios I would expect to have problems.
The first is if you are storing anything in sessionScope or applicationScope variables that are required by your application, but your code only loads those on a specific page. If you refresh the design, the scopes will get dumped and so not reloaded until you go to the specific page. Typically I put such initialisation code on my layout custom control, so a page reload will always initialise it if it's dumped by a design refresh.
The second is if another user accesses the application and has Build Automatically switched on, which could result in the application being rebuilt without you realising it. It doesn't sound like this is happening for you though.

Xpage in Client require extension library?

I use a link like notes://DOMINO/ELITE/contacts.nsf/persons.xsp?OpenXPage in Notes Client in classic Outline. It works on client that has extension library installed, but not on the client that it has not.
XPage is on server that has library installed and its working properly.
On the client without extension lib installed i get Error 404.
Resources need to be available within the XPages container, which is the Notes Client. So they need to be pushed round to all Notes Clients, either manually to the relevant folder or via a Widget Catalog and policy. For best practices, see XPages Extension Library book chapter 2, pages 40 onwards. It's also covered in a whitepaper I wrote, with a section specifically aimed at admins (the PDF is here).
XPage is on server
Unless the database has "Run server-based XPages apps directly on the server" ticked, remember that the database may be located on the server, but it's processed as if it were a local replica. Which is why #DbLookup with "" to look to current server is bad practice for XPiNC.

Accessing file system in an iOS device

I'm an absolute newbie to Xamarin world. I'm working on a web application where a user completes a long form (say some 100+ fields) and then submits the form which will write the information to a database. One of the requirement is user should be able to load the form, resume his work even when he is Offline( No internet connection). I have used HTML5 Application cache, Local Storage in Html5, KnockOut.JS, Java script so that for every 2 seconds all the user form information is saved to Local Storage of the browser. But lately, I noticed with few users that the forms are getting deleted sometimes due to an iOS update. Also I don't want to rely on browsers cookie/cache to store this information.
I want to find out what my options are with Xamarin. Can I use a component like 'UIWebview' in the Xamarin app to launch my web application and then access the file system of iOS of that Xamarin app from the browser launched ?
Sure you can!
One launch image plus one screen with UIWebView is what you need for your task. You can handle UIWebView's event to save and load it's state.
Good news is that such app could be small enought to build it using free (Starter) version of platform.

All xpages in DB sometimes never load

During development, I sometimes make a mistake in my code (yes I know that is had to believe :) ) and when the page attempted to be displayed in the browser, the browser just sits and spins trying to load the page but the page never loads.
After this occurs, no other pages in that db react the same and this is true for all users of the database. No other users can use the database during this "lockup" period.
Pages in the problem db will not work for any user. Xpages in other databases on that server continue to work fine. Http from traditional forms and view work fine in the problem db. It seems only xpages are affected.
It seems over a period of time, the pages for the problem db will work again.
What would be causing the lockup issue and is there and way to fix it immediately?
Bruce you know that you will roast in hell for developing on a production database on a production server :-)
The steps to remedy:
check all errors (in the error pane in designer) and fix them
do a clean build of your app
restart the http server
Optional action: Compact -c
Hope that helps
P.S.: We all will join you down there ;-)

Force a web page to open up in the Lotus Notes client web browser regardless of user preference

We need to force a particular web application to launch in the Notes browser regardless of the browser option the user has chosen. This also ideally needs to be launched from some LotusScript code.
I haven't been able to find a way of doing it so any suggestions would be appreciated.
There's unfortunately no way to force the Notes browser via LotusScript. However, you could look into using policies to restrict the user's default browser: http://www-10.lotus.com/ldd/dominowiki.nsf/dx/03062008102616AMWEBL4Y.htm
If it is possible, I suggest taking a different approach. This likely can't be solved via a technical solution (i.e. the user could always find a way to open the URL in a non-Notes browser if they are motivated to do so). Therefore I would make the recommendation to the user that the application only works via the Notes browser, and leave it up to them to do the right thing. Do that either by training, or putting a message on the web application, etc.
Another idea, if you have control over the web application, is that you could check the browser's User Agent for the keyword "Lotus Notes", and disallow anyone non-Notes browsers from using the application.
Oddly enough I have the issue you want to emulate happening on a Mac. I am not sure at this time if this is expected behavior though (still investigating).
I have a database rendering an XPage on the client. The link is in a rich text field. When the link is clicked it opens in the same tab in the Notes client, instead of the system browser (which is set in the Notes client).
Using Call notesUIWorkspace.URLOpen( Url$, reload%, urlList%, charset$, webusername$, webpassword$, proxywebusername$, proxywebpassword$, notesRetriever )
specifying true for notesRetriever, will open the browser page IN notes (whatever user config).
Don't expect too much of this since this will require the retriever process to run on the Domino server.
I bet your application won't work using a reriever.

Resources