Monday, 20 July 2015

Getting started with XPages on IBM Bluemix - part II

I was able to setup my first XPages Demo Application on IBM Bluemix and prepare everything to start customizing the demo app in Domino Designer. Now I want to get my fingers on the database design

Before you get started with importing the database from Bluemix into Domino Designer, Designer has to be configured to work with Bluemix. In the preferences under "Domino Designer - IBM Bluemix" you can enter the Bluemix Server URL and your username and password (if that option is not available in Domino Designer you first have to install the correct version of the Extension Library).

The URL can be gathered from the "Start Coding" page on your Bluemix dashboard.



Click the "Test Connection" Button and see what happens.
Et Voila, I am connected :-)









Now switch to the IBM Bluemix ID previously downloaded. Otherwise your application will break once you deploy modifications signed with another ID file.

To open the downloaded database from the IBM Bluemix starter code into Domino Designer, click on Tools. There should be a new menue item "Import IBM Bluemix Starter Code".














Select the downloaded Starter code zip file and click next















 After that you have to specify a Bluemix Deployment directory. This will be used for storing the configuration of this app (manifest fle) as well as to store a deployment copy of your database (more on that t later).














Final step is the selection of the organisation and space in Bluemix (in my quick and dirty setup I didn$t setup the organisation properly).














Click Finish and the Bluemix database will be imported into Domino Designer - and can be modified from there.

So what I want to do now is to implement the first customization to my application. Let's create a new XPage and see if that works on the server...








After saving the page I deploy it to Bluemix using the new Bluemix Toolbar Icon











The deployment took a few minutes - as part of the deployment the application will be updated, stopped and started again. So I assume that most of the time is needed for restarting the app (in case of such a small change at least).
















Finally, the deployment was successful.










Now let's see if the new page can be accessed...








Works like a charm :-)

Saturday, 18 July 2015

Getting started with XPages on IBM Bluemix - part I





 Well, finally it is Friday. It's been a busy week with a nice flow of Domino related development work. And tonight I wanted to take the chance to get my fingers on XPages on IBM Bluemix. So this blog post is about the steps it took me to get started...


As I do not want this experimental stuff to interfere with my work related projects I first started to update my private laptop to the latest and greatest releases (Designer 9.0.1 FP4 and XPages Extension Library 901v00_13). After that I spent some time  messing around with my bluemix account and finally creating a new one (it seems my old one has become inactive since I haven't used for too long?). Finally I was able to log in to IBM Bluemix and found the .xsp runtime in the catalog.

Create your Bluemix app
  1. Login to IBM Bluemix at http://www.ibm.com/cloud-computing/bluemix/
  2. Open the Bluemix Catalog
  3. Scroll to the very end of the catalog to the "Bluemix Lab Catalog" (currently XPages on Bluemix are in experimental stage)
  4. I first created the sample todo app from the available boilerplate by selecting the option "XPages Web Starter" in the Boilerplate section. This is the same app as shown at IBM ConnectED 2015 in Orlando.
  5. Specify a name for the app and click create
  6. Wait until the app has been deployed automatically. This will take a couple of minutes (so I guess this is a good time to get a cold beer from the fridge)...
  7. Finally, the app should be up and running:

    And tatataaaa: it can be accessed at http://rum.mybluemix.net/ 

Connect Domino Designer to your IBM Bluemix app
So the next step is to get access to the app from Domino Designer.
  1. In the Dashboard menue click on "Start Coding"
  2. Click on the button "Download Starter Code". This will download a zip file containing the NSF with the application's design as well as an IBM Bluemix manifest file.
     

    BTW: The content of the manifest file can be displayed in Bluemix by clicking on the Environment Variables menue entry.
  3. Additionally you will need to download the ID file to use this NSF and to connect to theBluemix server. The ID File can be accessed from XPages NoSQL Data Service page. To open this page, open the dashboard and click on Services to access the Data Service page.

    and from there click on the "Launch" button on the top right corner.

  4. Download the ID file from the following page - and display the password (f you don't want to guess it... ;-))
Now you are ready for opening the database in Domino Designer - but this will be covered in my next blog post.

Wednesday, 18 March 2015

Your help needed: Jump-start guide to IBM Notes for Outlook users

At my workplace we are about to start with migrating a decent amount of users from Exchange/Outlook to Notes 9. Yes, this still happens and I am quite excited about that ;-)

After a user has been migrated we want to provide access to useful information. What we already have is explaining general things like FAQs about using Mail and Calendar, enable Out of Office, Signature etc...

On top of that, I thought it would be helpful if we provided a jump-start guide explaining a few key differences between Notes and Outlook.  I have to admit that in the 18 years of my Notes & Domino carreer I haven't really touched Outlook - neither at work not for personal reasons... In other words: I have no experience with Outlook and therefore I cannot be very helpful in depicting differencs between both systems.

So I would like to ask you to share your experience in what Outlook users struggle most with when switching over to Notes & Domino.
How do users work with Outlook and what adjustment problems do they have when using Notes?
What is missing in Notes and what can we offer as a substitute (public folders...)?


Looking forward to your feedback :-)

Tuesday, 17 March 2015

Apply Java Permissions to Domino Agents at runtime - again ;-)

This post is supposed to be read by developers only. Admins, please move on ;-)

I have an agent which is used to make SFTP file transfers from Domino to our corporate SAP system. It's an interesting project and I am exploring new stuff on a daily basis :-)

One technical issue I had to solve was this:
The agent opens an SFTP session on a remote host. Unfortunately this is forbidden by Java Policies specified in the java.policy file of the JVM of the Domino server.
The error is
java.lang.SecurityException: not allowed to make a socket connection to MYHOST.MYDOMAIN.COM,-1

So I started to dig into java.policy and java.pol files. And to be honest I was not that much pleased about the whole thing. At first I started to grant ANY permissions in the global section of my policy file:


 grant {   
  ...  
  permission java.security.AllPermission;  
  ...  
 };   

This works but it goes a bit over the top for a productive environment... Therefore I started to tweak the policies to only allow one specific application the network operations required to do the job. Honestly, it's been painful... I think I got it more or less configured properly. But given the fact that we run the application in three different environments (DEV/TEST/PROD) on multiple servers I hardly could imagine a proper rollout scenario. I always thought one of the major strengths of domino and NSF was that usually the design and resides in a single database - and the configuration usually resides in the application, a few system databases (+ notes.ini).

There must be an easier way to grant my code the execution rights it needs.
I finally found a solution to grant my code the needed execution rights at runtime of the agent. There is a whole Java package for handling the permissions - and in my particular case I was looking for SocketPermissions. The code to grant a socket permission is pretty straight forward:

 String hostAndPort = "myhost.mydomain.com:22";   
 SocketPermission p = new SocketPermission(hostAndPort,  
       "accept,connect,resolve");  


This will allow my code to make a network connection to the specified host on the specified port. There might be neater solutions to that problem and not every admin would be happy about that. In my opinion it is not very consistent for what you need to grant permissions in policy files (like network connects) but on the other hand file handling can be allowed on the agent security (Allow restricted operations).


Thursday, 5 June 2014

How to overcome Domino Webservice Timeout issues

Many of you might be aware of the restriction described here. I was not, and it caused me and my colleague quite some time to investigate, and fix this. Additionally, it caused us a lot of pain, because this issue increased the pressure on our project. So this might be relevant to some of you too...

So this is the story: We had a very annoying issue with a Domino WebService Consumer which was running in a timeout (almost all the time). As with many other projects the WebService was running fine in our Development environment. In both, our Integration as well as our Production Environment, the WebService always ran into the following error:

Error while reading data from server, Network operation did not complete 
in a reasonable amount of time; please retry

You have experienced this yourself too, don't you? Obviously, the amount of data in our development system was a lot smaller than in the integration and production environment. This is why the issue did not occur in our DEV system. But why the heck does the WebService stop at all??

After quite some research and opening a PMR we were pointed into te right direction:
The default Web Service Timeout is set to 60 seconds. It is a hard coded limitation, IBM seems not to be willing to fix this. To overcome the issue you have to be smarter than me and set the timeout on each WebService consumer individually at runtime. You can do this by calling the setTimeout() function of the WebService and pass the number of miliseconds.

More details can be  found in APAR LO48272: WEBSERIVCE CONSUMER BREAKS THE CONNECTION AFTER 60 SECONDS