DB2 Run from Java and LotusScript


package com.dokoll.solutions.inc.db2.test;
/**
 * Created from Copy: 2012.11.03.9.57.PM
 * Run ConnectDB2LSClonePrint to read DB2 Data into Notes Documents
 * 
 */
import javax.faces.context.FacesContext;
import lotus.domino.NotesException;
import lotus.domino.local.Database;
/**
 * @author Dököll Solutions, Inc.
 * @version 2012.11.03.9.57.PM
 *
 */
//...
public class RunDB2LotusScriptBean {
	//...
	//Xpages button code
	public void doRunDB2ForNotesData() throws NotesException {
		
		//get the current database being used
		Database database= (Database) FacesContext.getCurrentInstance()
		.getApplication().getVariableResolver()
		.resolveVariable(FacesContext.getCurrentInstance(), "database");
		System.out.println("Database Obtained..." + database);
		
		//Run the LotusScript agent to Access DB2 Data
		database.getAgent("ConnectDB2LSClonePrint").runOnServer(); 
		System.out.println("ConnectDB2LSClonePrint process begins...");
      
	}
}
All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.
No comments yetLogin first to comment...