Setting up a sFTP server to be used with an existing Domino SSL certificate

With the new way of creating SSL certs for Domino a new opportunity occurred to me and actually it worked great. Because we create the certificates using OpenSSL the generated Key and certificate can actually be used on the same server to setup a FTPS server. Saidly because the Domino FTP server on OpenNTF.org doesn’t support FTPS I had to use the FileZilla server the setup was super simple.

Run the setup

go into settings and enable FTP over SSL select your .Key file and your certificate file that you got back from your certifier. Also check the other option to force all connections to the server to be FTPS.

FileZilla Server Settings

And now you have a FTPS server that can deliver external content to you Domino server. The last thing you need to setup is the users and groups that should be able to connect to the server.

Update: Paul Farris commented that this is an SSL based FTP server not an SSH based so the real name should be FTPS not sFTP.

Some performance tips for your Domino / XPages servers

When your applications has grown very big you might face a problem with performance in this case I had a customer with quite a large crm system that in some cases got very high disk io but the cpu didn’t spike.

neither did the memory almost 50% not used by the system.

So what I did was I increased the memory available for the XPage runtime JVM using HTTPJVMMaxHeapSize

and to get get better database performance I increased the database IO buffers using

NSF_BUFFER_POOL_SIZE_MB

also using cacheset tool I increased the amount of memory that Windows will cache files using, this can give you quite a lot of performance because Windows will keep more files in memory instead of reading everything from disk and if you have a newer server with more than 8GB of memory why not use the memory. You can change this when the server is running and find your optimal settings.

You need to trim this depending on how much free memory your server has and you don’t want to run out of memory.

If you have some more tips for the community feel free to comment.

How to get plugins working again after installing 9.0.1 FP2 IF2

The new IF2 for fickpack2 in the Client seams to mess up the locally installed plugin in the Designer client somehow. But there is an easy fix to that.

Close down the client and navigate to the workspace\applications\eclipse folder and delete everything in it (You should probably make a backup before ;-) )

restart the designer and go into File – Application – Install

App-Install

 

 

 

 

 

 

 

 

 

 

 

Select the “Search for new features to install” option and click next

App-Install-2

And when you get the next page all you previous plugins should be there and you just click “Finish”

Now the fun part begins by accepting all the licenses. But when that is done and your client is restarted all you plugins should be back.

Sorry Samsung, Apple you’re wrong

Samsung, Apple and the Peddle smart watch everybody seams to releasing watches now but how smart is these watches. They have displays, and different kinds of sensors, but smart, I don’t know. They are only an extension of the phone. because you need the phone for them to work.

Then I watched one of the keynotes from Dreamforce 14

And saw the new cuff phone smart watch PULS created by Will I AM this might not be the best product but the way is the correct one. Create the smart device and place it around your wrist always close to you, not the other way around. When you want a bigger screen send the image to a bigger screen like when you use airplay.

Will I Am has also created a charging jacket so when you jacket sleeve comes in contact with the Puls, it charges that’s really clever. And that isn’t all he has also more, glasses, shoes and other smart wareables.

I think this is the next gen of smart watches.

http://will.i.am/category/technology/

The new keylogger function in ios8

Yes, if you install a third party keyboard one of the new features in IOS8 and give it full access. You also agree to send everything you write to a third party. Not only do you agree that the developers of the keyword can read anything you write, they are also allowed to send the information to their own servers for processing and once what you have written is there. You have no chance of knowing what they will do with your written passwords, credit card numbers and all other personal information. And even if they don’t do anything bad with your information, you always have the risk of them being hacked.

Stealpassword

 

 

 

 

 

So if you care about not getting your passwords and credit card numbers spread across the globe I suggest not allowing any third party keyboards to have full access.

Apple say that they will switch to the native keyboard when you are about to write sensitive information but can they garantee that?

The difference between more or less

Building up expectations before you start using something must be one of the greatest feelings, opening up the box to a new “thing”, Jippi!!!

When you’re looking to buy something, you look at all the features of the “thing” and how that fit’s your list of needs. If the list of features comes from reading a spec or from a video presentation of the feature(s). The feeling when you find a “thing” that meet your list of needs is really great. It’s victory, but have you ever asked yourself the question is this a list of half finished functions or is this a list of functions that has been thought through and are added for a specific reason. Are they added to help you as a user to complete your tasks easier or just to sell the “thing”?

Design is how you treat your customers

 

 

 

 

 

 

After reading “Inside Apple“, I see the difference between adding lot’s of functions instead of adding some functions that really works and is added for a reason. I’ve been a Windows user since Windows 3 and always thought that this is the way everything must work. Why, well because no one has asked them self the question WHY. Why are we adding this function in Word, will this function increase user productivity? How much?

I think the reason why these questions isn’t asked is because the focus is on adding as many features as possible. As a measure of more functions equals more sales, does it?

What is the secret of Apples software and hardware success ?

Have they done this because they keep their teams locked up in airtight cells that is 100% focused on it’s task with no distractions?

Design is not just what it looks like and feels like. Design is how it works.

 

 

 

 

 

 

Or is it that the have got the key like the quote above. The combine looks, feels and how things works in a unique way. These things is often done by different teams inside a company. If this is what other companies need to adapt to move forward, then social business should be a perfect match because with a Social Business it will be easier to delivering a better product when working together and sharing experiences.

Start to adapt your development processes to become more Social, because I believe Social Developers delivers more and faster. Because all companies want to deliver better products/services, right ?

Maximum file upload size in Domino all the places to edit

If you ever wanted to increase the file upload size in Domino you have probably seen that there are several places to update depending on the configuration. I was increasing this on a server this week and missed one of the places and couldn’t understand where I missed, Per-Henrik Lausten pointed me what I missed. So I though I would write a post about this I might help someone else, or help me the next time I forget.

Open up the Server document and go to the “Internet Protocols” tab and the “HTTP” tab

FileUpload1

 

 

 

 

 

 

At the bottom right corner, to the “HTTP Protocol Limits” Section

FileUpload2

 

 

 

 

 

 

 

And change the “Maximum size of request” to the size you want to increase to

Now move to the basic tab and check if the server is using “Internet Sites”

FileUpload3

 

 

 

 

 

 

 

 

If your server doesn’t load from “Internet sites” you need to open the “Internet protocols” tab again

and follow the same instruction as in “Internet Site” document.

in other case close the server document and open up the view “Server\Internet Sites”

FileUpload4

 

 

 

 

 

 

 

 

 

Open up the corresponding Internet Sites that you want to change or open all of them and change if you want the same size on everybody. On the “Domino Web Engine” tab

FileUpload5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

On the “POST Data” section change the Max post size to the new maximum file size you want to have.

If you are using an old Domino application you are done now. After reloading the HTTP task on the server.

But if you application is an XPage application there is another place you need to control the file size, and that is in Application Configurations and xsp.properties file in you database and the File Upload Option.

Or if you want to add it globally add it to the xsp.properties file in the Domino\Data\Properties folder in xsp.properties.

FileUpload6

 

 

 

 

If you want to increase the size for iNotes there is a third place that you might need to increase and that is in the Servers\Configurations document for the server. Click on the “iNotes” tab and update the “Mamimum attachment size” and save the document. Restart the http task on the server to make the changes get affect.

FileUpload7

 

 

 

 

 

 

 

 

 

 

 

If you got any problems some Domino configuration or got help from this post, make a comment.

Long live Domino just give us SHA-2 and TLS 1.3 support NOW!!

What can we expect from Apple today and where can I watch the event?

  • IOS 8 with Release around the 15:th of September – Ultra high
  • a new IPhone with larger screen – Very high
  • NFC and iPay, apples take on mobile payments – High
  • iWatch, the only watch you ever need – Medium
  • iHealthband, a wristband that monitor you health – Medium
  • a new Corporate appstore with IBM – Low
  • New IPad – Low
  • New Apple TV, with appstore – Low
  • New iPod – Low
  • iGlasses, Apples take on the Google glasses – Low

You can watch the Apple Live event from this URL
but you need an IPhone, iPad or Mac OSX with Safari to watch.

What would you like to see Apple release today, write a comment.

Evolving the easy XPage keyword bean

The first part of the easy keyword bean can be found here

When working with keywords in XPages your application could greatly take advantage of the possibilities in the XPage Engine. Thru caching of data, What do I mean with caching?

Well today the keyword bean is located in viewScope and that means that it lives only on the current page that is opened. If you move the bean to applicationscope and add some caching functionality we only need to go into the database if the keyword never have been fetched before.

But there is a problem when moving things into applicationscope that is multi user access, and that can easily be solved using synchronization or threadsafe objects.

Another thing is that you need to maintain is keyword updates because they need to be maintained but that is also easy to solve because if you write the Keyword edit save using XPages that you can update the keyword when saving a keyword.

OK so how do we change the code so we get a common applicationscope keyword bean.

first we add a Global CacheObject and next we check against the GlobalCache Object before accessing the database. And we also need a recache option for a certain keyword to get it refreshed when you have saved a keyword.

Let’s Look at some code

we start by importing java.util.concurrent.ConcurrentHashMap and setting up the hasmap object as a cache object. I use the concurrenthashmap to get a threadsafe Cache object in my application scope bean.

import java.util.concurrent.ConcurrentHashMap;

public class FormHelpers implements Serializable {
 
    private static final long serialVersionUID = 2L;
    
    private ConcurrentHashMap <String,Vector> Cache=null;
    
    public FormHelpers (){
    	this.Cache=new ConcurrentHashMap();
    }

We also need to change the object from static to be an ordinary Java object because it will live in the applicationscope. Another thing we also need to implement is serializable if the server want to store the object on disk for any reason.

Let’s move over to the getKeyword function. What we need to do is to check if the keyword is in cache and if it is, return the cached data. If it isn’t found get the data like before and store it in cache and return the data.

public Vector <String> getKeyword(String Name){
	 Vector keyword= new Vector();
	 try {
	 //Check if Data is in Cache and return the cached data
	if(this.Cache.containsKey(Name)){
		return this.Cache.get(Name);
	}else{
	 Database db=DominoUtils.getCurrentDatabase();
	 View view = db.getView("byKeyword");
	 Document Doc=view.getDocumentByKey(Name,true);
	 if(Doc!=null){
	 keyword=Doc.getItemValue("Data");
	 }
	 Doc.recycle();Doc=null;
	 view.recycle();view=null;
	 db.recycle();db=null;
         //Add the newly fetched data into cache
	 Cache.put(Name, keyword);
	}
	 } catch (NotesException e) {
		 System.out.println("Error1");
		}
	 return keyword;	 
 } 

And because I call getKeword from the function getKeywordString I only need to change getKeyword when implementing this new functionality.

The last thing we need to add is the recache function, and that one will be a function that clears the data in cache so the next request to get the data will do it from the database.

public void recacheKeyword(String Name){
	 if(this.Cache.containsKey(Name)){
		 this.Cache.remove(Name);
	 }
 }

I almost forgot, we need to change our managebean also and move if from viewScope to Application Scope in the faces-configt.xml file

 <managed-bean>
    <managed-bean-name>FormHelpers</managed-bean-name>
    <managed-bean-class>com.xpagedeveloper.FormHelpers</managed-bean-class>
    <managed-bean-scope>application</managed-bean-scope>
  </managed-bean>

If you want the full code for this check out this xSnippet on openntf.org

Creating an easy XPage keyword bean

Flexibility in applications is always a great thing, to adapt the application to the business needs without recoding things. And if adding this flexibility can be done without lots of code, you will probably use it.

This is one way of creating a keyword data bean for you XPages.

Start by creating a form named Keyword, in this form add the fields Name and Data, add the multivalue checkbox in the datafield question079

 

 

 

Save the form

Now you need to create the lookup view, create a view called byKeyword

question080

 

 

 

 

Add 2 columns name and data. The name column should display the name of the Namefield and it must be sorted and the second view should show the data field, Save the new view.

Let move over to the interesting code, create a new java class named FormHelper and place it in a package, I call mine com.xpagedeveloper.

question081

 

 

 

 

 

 

 

 

I create two functions, the first one will return return a vector with the data from the keyword.

public static Vector <String> getKeyword(String Name){
Vector keyword= new Vector();
try {
Session session = DominoUtils.getCurrentSession(FacesContext.getCurrentInstance());
Database db=DominoUtils.getCurrentDatabase();
View view = db.getView("byKeyword");
Document Doc=view.getDocumentByKey(Name,true);
if(Doc!=null){
keyword=Doc.getItemValue("Data");
}
Doc.recycle();Doc=null;
view.recycle();view=null;
db.recycle();db=null;
} catch (NotesException e) {
System.out.println("Error1");
}
return keyword;
}

And my Second function returns string from the array separated with a string of your choice

public static String getKeywordString(String Name,String Separator){
	 String Data="";
	 try{
	 Vector <String> keyword=getKeyword(Name);
	 if(!keyword.isEmpty()){
		 Iterator <String> i=keyword.iterator();
		 
		 while(i.hasNext()) {
		          String entry = i.next();
		          if("".equals(Data)){
		        	  Data=entry;
		          }else{
		        	  Data+=Separator;
		        	  Data+=+entry;
		          }
		  }
	 }
 }catch(Exception e){
	 System.out.println("Error 2");
 }
	 return Data; 
 }

After I add the bean init setup in the faces-context.xml in the WebContent\WEB-INF folder from the package explorer.

<managed-bean>
    <managed-bean-name>FormHelper</managed-bean-name>
    <managed-bean-class>com.xpagedeveloper.FormHelpers</managed-bean-class>
    <managed-bean-scope>view</managed-bean-scope>
  </managed-bean>

Now it’s very simple to get keyword values to you fields and functions inside your XPages.

Create a Keyword using the Keyword form, in this case I’ve created a Keyword named Category and added some values to it.

Snap2

 

 

 

And in my XPage I have added an Combobox

question094

 

 

 

 

 

 

 

 

And in the values tab click on the “Add Formula Item” button

question095

 

 

 

 

 

 

 

And write the following code

question096

question097

 

 

 

 

 

 

 

 
If you want the full code for the bean, it can be found here as an xSnippet

Now your XPage application is more flexible without lots of code.