IBM hat das Fix Pack 3 für Notes/Domino Version 9.0.1 fertig gestellt.
IBM hat das Fix Pack 3 für Notes/Domino Version 9.0.1 fertig gestellt.
Im Grunde dominieren hier zwei Themen: IBM Verse + Cloud
IBM Verse sieht für mich persönlich wirklich sehr, sehr gut aus und ich kann es kaum erwarten endlich mein Mailfile migriert zu bekommen. Ich habe zwar einen Beta Zugang, aber ein paar Testmails zu verschicken vermittelt längst nicht den richtigen Eindruck als wenn man das Ganze wirklich live verwendet.
Ja, es wird eine Umstellung werden für viele User und Administratoren. Nicht ohne Grund bewirbt IBM das Ganze mit dem Slogan “a new way to work”. Ich finde den Schritt aber schon seit langem überfällig einfach mal einen Schnitt zu machen und (fast) völlig von vorne zu beginnen. Im Grunde bleibt das bestehen was gut und zuverlässig ist, nämlich der Domino Server und der NSF Container und die komplette “User Experience” wurde neu entwickelt und neu durchdacht.
Der Notes Client ist zukünftig nicht mehr notwendig und die Anwender können komplett mit dem Browser als Mail Client und den mobilen Apps arbeiten.
Allerdings ist Verse, also der Browser Client nur eine Alternative unter vielen. Es kann weiterhin ebenso mit dem Notes Client, dem klassischen iNotes, IMAP oder sogar Outlook gearbeitet werden, je nachdem was einem die eigene IT-Abteilung zur Verfügung stellt.
Und hier muss ich sagen, sehe ich auch das größte Problem. Oftmals herrscht gerade in den IT-Abteilungen der Unternehmen eine große Skepsis allem Neuen Gegenüber und man bleibt lieber bei dem alt bekannten, ob es nun besser ist oder nicht… Hier müssen so manche Bedenken zerstreut und alte, eingefahrene Meinungen über Bord geworfen werden um unvoreingenommen und offen mit dem neuen Konzept umzugehen. Um das zu erreichen, wird IBM Verse als Freemium Modell ähnlich wie GMX oder WEB.de veröffentlicht.
Für Unternehmen wird das Ganze zunächst ab Ende März nur in der Cloud zur Verfügung stehen. Hier bietet sich die Hybrid Konfiguration an, um vielleicht zumindest einige Key User in die Cloud und damit auf Verse zu migrieren. Ende 2015 soll aber dann auch eine komplett in der eigenen Infrastruktur zu installierende Variante zur Verfügung stehen.
Soweit erstmal ein paar meiner Eindrücke, weitere Details folgen…
Now, let’s access some Domino resources.
I have created a database named “VaadinResources.nsf“, containing a normal image resource, and an image added via package explorer to the “WEB-INF” folder:
Vaadin provides stream resources, which allows creating of dynamic resources. These resources handle “InputStream” objects, which we can grab from Domino via Java NAPI.
To do this, it is first required to add some plug-ins to the dependencies of the “HelloVaadin” plug-in:
Then we can import the “NAPIUtils” class to the project and add a new method “loadBinaryFile” to it:
/**
* loads given file from a database and returns the Inputsstream
*
* @param serverName
* the server to use
* @param dbPath
* the database path
* @param fileName
* the file to load
* @return the file data as InputStream
*
*/
static public InputStream loadBinaryFile(final String serverName, final String dbPath,
final String fileName) {
NotesSession nSession = null;
NotesDatabase nDatabase = null;
NotesNote nNote = null;
try {
nSession = new NotesSession();
// open database
try {
nDatabase = nSession.getDatabaseByPath(serverName + "!!" + dbPath);
} catch (NotesAPIException e) {
e.printStackTrace();
}
nDatabase.open();
// load existing data
nNote = FileAccess.getFileByPath(nDatabase, fileName);
// get Filedate and return String
InputStream is = FileAccess.readFileContentAsInputStream(nNote);
return is;
} catch (Exception e) {
e.printStackTrace();
} finally {
// recycle NAPI objects
recycleNAPIObject(nNote, nDatabase, nSession);
}
return null;
}
A new class “DominoImageSource” which implements the “StreamResource.StreamSource” interface uses this method to pipe the “InputStream” object returned from the Domino Java NAPI:
package ch.hasselba.vaadin;
import java.io.InputStream;
import ch.hasselba.napi.NAPIUtils;
import com.vaadin.server.StreamResource.StreamSource;
@SuppressWarnings("serial")
public class DominoImageSource implements StreamSource {
private String fileName;
private String serverName;
private String dbPath;
public DominoImageSource(final String serverName, final String dbPath,
final String fileName){
super();
this.serverName = serverName;
this.dbPath = dbPath;
this.fileName = fileName;
}
public InputStream getStream () {
return NAPIUtils.loadBinaryFile( this.serverName, this.dbPath, this.fileName );
}
}
Now, we can create a new Application named “ResourceUI” which displays these two resources:
package ch.hasselba.vaadin;
import com.vaadin.server.StreamResource;
import com.vaadin.server.StreamResource.StreamSource;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.Image;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
@SuppressWarnings("serial")
public class ResourcesUI extends UI {
@Override
protected void init(VaadinRequest request) {
VerticalLayout layout = new VerticalLayout();
setContent(layout);
layout.setSizeFull();
// Create an instance of our stream source.
StreamSource webinfResource = new DominoImageSource (
"Dev01", "VaadinResources.nsf" , "/WEB-INF/WEB-INFResource.png");
StreamSource imageResource = new DominoImageSource (
"Dev01", "VaadinResources.nsf" , "ImageResource.gif");
// Create an image component that gets its contents
// from the resource.
layout.addComponent(new Image("WEB-INF Resource",
new StreamResource(webinfResource, "image01.png")));
layout.addComponent(new Image("Image Resource",
new StreamResource(imageResource, "image02.gif")));
}
}
Again, no rocket science and self-explaining code. When we open the application, the resources are loaded from the database and displayed in the browser:
As soon we are changing the images in the database (and the cache is expired), the new image will appear in our Vaadin application.
IBM hat das Fix Pack 3 für Notes und Domino 9.0.1 veröffentlicht. Es enthält u.a.:
Notes/Domino Fix List – IBM Notes/Domino 9.0.1 Fix Pack 3 Release Notice
Let’s create another application, based on Vaadin’s AddressBook example. You can download the source code directly or grab the code from the repository; it is a single class file named “AddressbookUI” only.
After importing (or manually creating) the class in the HelloVaadin plug-in, the servlet configuration in “web.xml” must be updated:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>Addressbook</display-name>
<context-param>
<description>Vaadin production mode</description>
<param-name>productionMode</param-name>
<param-value>false</param-value>
</context-param>
<servlet>
<servlet-name>AdressbookServlet</servlet-name>
<servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
<init-param>
<param-name>UI</param-name>
<param-value>ch.hasselba.vaadin.AddressbookUI</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>AdressbookServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
The “<param-value>” must contain the complete class name, I have additionally changed the name of the servlet and updated the path in the “plugin.xml“:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="com.ibm.pvc.webcontainer.application">
<contextRoot>
/addressbook
</contextRoot>
<contentLocation>
WebContent
</contentLocation>
</extension>
</plugin>
To connect the example to a Domino environment, the “createDummyDatasource” method of the class must be replaced:
@SuppressWarnings("unchecked")
private static IndexedContainer createDummyDatasource() {
// Domino objects
Session session = null;
Database db = null;
View view = null;
Document doc = null;
Document tmpDoc = null;
// initialize IndexedContainer
IndexedContainer ic = new IndexedContainer();
// add fieldnames as properties
for (String p : fieldNames) {
ic.addContainerProperty(p, String.class, "");
}
// get all users from NAB
try{
// init Domino objects
session = ContextInfo.getUserSession();
db = session.getDatabase(session.getServerName(), "dummynames.nsf");
view = db.getView( "People" );
// process all documents in view
doc = view.getFirstDocument();
while (doc != null) {
// create a new item
Object id = ic.addItem();
// add field values to the item
ic.getContainerProperty(id, FNAME).
setValue(doc.getItemValueString("FirstName"));
ic.getContainerProperty(id, LNAME).
setValue(doc.getItemValueString("LastName"));
// grab next document
tmpDoc = doc;
doc = view.getNextDocument(tmpDoc);
recycle( tmpDoc );
}
}catch(Exception e){
e.printStackTrace();
}finally{
recycle( doc, tmpDoc, view, db, session );
}
return ic;
}
/**
* recycle Domino objects
*
* @param objs
* lotus.domino.Base objects to recylce
*/
private static void recycle(Base... objs){
try{
for( Base obj:objs ){
if( obj != null )
obj.recycle();
}
}catch(Exception e){}
}
Because this is not rocket science I won’t get into the details.
To prevent anonymous access, I have added a simple redirection in the “init” method:
protected void init(VaadinRequest request) {
if( ContextInfo.isAnonymous() ){
getPage().setLocation("/names.nsf?login=1&redirectto=" +
request.getContextPath() );
return;
}
initLayout();
initContactList();
initEditor();
initSearch();
initButtons();
}
When opening the application as an anonymous user you will be automatically redirected to the Login Screen:
After signing in, domino redirects back to the addressbook example, and the list of persons in your “names.nsf” is shown up:
“Statt auf die Potenziale ihrer Mitarbeiter zu setzen, verstecken sich die Excel-Führungskräfte hinter Berichtsorgien und Kennzahlen-Management.
…
Eine Organisation im Optimierungswahn über bürokratische Prozesse fördert die kollektive Dummheit in Unternehmen. Exzellenz, Aufbruchstimmung und visionäres Denken lässt sich nicht verwalten “oder in Listen und Tabellen organisieren – und schon gar nicht aus Vergangenheitsdaten extrahieren”, moniert Dueck. Bestleistungen erzeugt man nicht mit Kontrollen, sondern mit Freude und Leidenschaft.… Die Excel-Tabelle von heute bildet das Geschehen von gestern ab. Auf der Strecke bleibt die Gegenwart. In einer Excel-Ökonomie aus Ängsten, Planungsillusionen und sinnlosen Kontrollschleifen gedeiht weder Vertrauen noch wirtschaftliche Prosperität.”
Gunnar Sohn und mein ebenso geschätzter, ehemaliger Kollege Gunter Dueck sprechen bzw. schreiben mir aus der Seele. Natürlich ist die Problematik vielfältiger und nicht nur auf Deutschland begrenzt. Der Druck, jedes Quartal gute Ergebnisse zu liefern, führt ebenso zu Dauerdruck und irrsinnig rabattierten Geschäftsabschlüssen: “This Quarter is the most important one in the history of the company.”
Ein Middle Management, das oft seine Besitzstände mit allen Mitteln verteidigen will, oder eine Controlling/Finanzabteilung, die an der einen Stelle Sparkurs verordnet, auf der andere Seite Genehmigungen wider besseren Menschenverstands so verzögert, dass statt Kosteneinsparungen höhere Ausgaben verursacht werden, tragen zum Elend bei. Durch solche Verhaltensweisen und Machtgelüste werden wohlgemeinte Reforminitiativen schnell torpediert.
Von der Demotivation logisch denkender Mitarbeiter, die dem Unternehmen eigentlich zugetan sind, will ich nicht anfangen. Selbstbestimmung und eigenverantwortliches Verhalten werden in der Regel nicht gefördert. Stattdessen werden Kontroll- und Machterhaltungsprozesse implementiert, ja sogar ausgeweitet. Ein Schelm, wer böses dabei denkt … Wirkliche Reformen und eine Transformation gehen anders.
Und unbedingt den ganzen Beitrag von Gunnar lesen!
When running your own servlet, you eventually want to access the Domino environment. To do this, some changes has to be made to the HelloVaadin plug-in.
1. Open the “MANFIFEST.MF” and open the “Dependencies” tab
2. Add the plug-in “com.ibm.osgi.domino.core” to the list of required plug-ins
Save the “MANIFEST.MF”
3. Now we can use “com.ibm.domino.osgi.core.context.ContextInfo” to access the Domino environment in HelloVaadinUI
package ch.hasselba.vaadin;
import lotus.domino.Database;
import lotus.domino.NotesException;
import lotus.domino.Session;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet;
import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
import com.ibm.domino.osgi.core.context.ContextInfo;
@SuppressWarnings("serial")
public class HelloVaadinUI extends UI {
public static class Servlet extends VaadinServlet {
}
@Override
protected void init(VaadinRequest request) {
VerticalLayout layout = new VerticalLayout();
setContent(layout);
layout.setSizeFull();
String dbPath = "";
String userName = "";
String queryString = "";
try {
// get the current database
Database db = ContextInfo.getUserDatabase();
if( db != null )
dbPath = db.getFilePath();
// get the current session
Session session = ContextInfo.getUserSession();
if( session != null )
userName = session.getEffectiveUserName();
// get the query string
queryString = ContextInfo.getServerVariable("QUERY_STRING");
} catch (NotesException e) {
e.printStackTrace();
}
Label label = new Label();
label.setValue("<h1>Hello " + userName + "!</h1>");
label.setContentMode(ContentMode.HTML);
Label labelDB = new Label();
labelDB.setValue("<p>DB Path: " + dbPath + "</p>");
labelDB.setContentMode(ContentMode.HTML);
Label labelQuery = new Label();
labelQuery.setValue("<p>Query: " + queryString + "</p>");
labelQuery.setContentMode(ContentMode.HTML);
layout.addComponents(label, labelDB, labelQuery);
}
}
4. When opening the application inside the names.nsf, the result looks like this:
1. Create a new plug-in project and select “Equinox” as OSGi framework
2. Set the name of the activator class to “ch.hasselba.vaadin.Activator”
3. Open the MANIFEST.MF file
4. On Tab “Overview“, activate the option for lazy loading and the singleton property
5. Go to “Dependencies” tab and add the required plugin “com.ibm.pvc.webcontainer”
When entering “pvc“, you can easily find the plugin from the list:
6. Then, add “javax.servlet” and “javax.servlet.http” to the list of imported packages
7. Now, download the Jar files for Vaadin. The files can be found here (the All-in-One archive is the right one).
8. Import the Jars to the project
The required Jars are:
9. Do this with „jsoup“ and „org.json“ libaries too:
10. Now, go to the “Runtime” tab and add the classpathes (don’t forget to move the “.” to the top of the list)
The symbol of the filetypes have now changed:
11. On tab “Overview“, click on “Extensions” to open the Extension tab
Click on “Yes” to open the “Extension” tab:
12. Here, you have to add the extension point “com.ibm.pvc.webcontainer.application”
13. Open “plugin.xml”…
14. … and configure the extension point:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="com.ibm.pvc.webcontainer.application">
<contextRoot>
/helloVaadin
</contextRoot>
<contentLocation>
WebContent
</contentLocation>
</extension>
</plugin>
contextRoot defines the URL pattern where the Vaadin servlet is reachable. contentLocation is a folder where the required web.xml configuration file can be found.
Save the “plugin.xml” file.
15. Create the folder “WebContent“…
16. … and then a second folder “WEB-INF” inside of “WebContent”
17. Create the “web.xml” file in this folder, the tree should look like this:
18. The “web.xml” contains the configuration of the servlet:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>HelloVaadin</display-name>
<context-param>
<description>Vaadin production mode</description>
<param-name>productionMode</param-name>
<param-value>false</param-value>
</context-param>
<servlet>
<servlet-name>HelloVaadinServlet</servlet-name>
<servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
<init-param>
<param-name>UI</param-name>
<param-value>ch.hasselba.vaadin.HelloVaadinUI</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>HelloVaadinServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
The <init-param> tag inside <servlet> defines our UI class of our application. We will create this class later. The <servlet-mapping> defines a mapping inside the webapplication path.
This means, if you would add a url-pattern like “/helloVaadinServlet/*” to the Vaadin servlet, the URL to reach the application is
http://example.com/helloVaadin/helloVaadinServlet/
The “/helloVaadin/” part is the defined in the contextPath parameter in the web application. When using another pattern as “/*“, an additional mapping for the Vaadin resources is required:
<servlet-mapping>
<servlet-name>HelloVaadinServlet</servlet-name>
<url-pattern>/VAADIN/*</url-pattern>
</servlet-mapping>
19. Go to “Build” tab, and include the “Web-Content” folder:
The following line should now appear in the build.properties file which includes the folder in the final Jar.
20. Create the Vaadin servlet class “ch.hasselba.vaadin.HelloVaadinUI”
21. Add the following code to the class
package ch.hasselba.vaadin;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet;
import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI;
@SuppressWarnings("serial")
public class HelloVaadinUI extends UI {
public static class Servlet extends VaadinServlet {
}
@Override
protected void init(VaadinRequest request) {
HorizontalLayout layout = new HorizontalLayout();
setContent(layout);
layout.setSizeFull();
Label label = new Label();
label.setValue("<h1>Hello Vaadin!</h1>");
label.setContentMode(ContentMode.HTML);
layout.addComponent(label);
layout.setComponentAlignment(label, Alignment.TOP_CENTER);
}
}
22. At the end, organize the manifest. Open tab “Overview” and start the “Organize Manifest Wizard”
This updates the manifest and adds all resources for the Vaadin application.
Last but not least, save all project files.
25. Create a Feature Project named “HelloVaadinFeature” and click on “Next”
27. Select the “HelloVaadin” Plug-In
28. On the “Plugins” tab, check the option “Unpack the plug-in archive after the installation“:
Save the file and…
29. … create the Update Site “HelloVaadinUpdateSite”
Add the feature…
… and build the site:
30. Import it to the Update Site on the Domino server and restart the HTTP task
31. That’s it! Open the URL in the browser and enjoy.
Seit der Verfügbarkeit von Notes&Domino 9 geistert das Gerücht durch die Landschaft, dass Sametime limited use (chat/awareness) nicht mehr Bestandteil ist.
Woher dieses Gerücht kommt ist unbekannt, hier nun einmal ganz klar.