Tag Archives: Uncategorized

Writing to Excel using java code

import java.io.FileOutputStream; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; /** * This is a sample to create an Excel Sheet using Jakarta POI API * * @author Nitin Aggarwal * @version 1.0 */ public class CreateXL { /** A place for the output Excel file to go */ public static String outputFile = “C:/Work/JPOI/excel_in_java.xls”; […]

read more

Reading contents of Excel using java code

There are two good choices for reading & writing Microsoft Excel Spreadsheet files from Java, in a platform independent way, – jexcelapi and Jakarta POI (HSSF). Both of them provide nice interface to access Excel data structure and even generate new spreadsheet. Comparison of JExcelAPI with Jakarta-POI (HSSF) 1. JExcelAPI is clearly not suitable for […]

read more

Maven Archtypes List

Each archetype page should enforce the following pattern : * Archetype name* Command line to call the archetype* If the archetype can be used in an existing projects directory* A tree view of the resulting files* Some additional information like the additional properties used by the plugin To use an archetype: mvn archetype:generate Generate gives […]

read more

Recession Action Plan-Preparing you for the recession

Yes, You can get prepared for the recession * As the economy tightens its belt you might have to make some changes – and it makes sense to start planning now. * Make sure a recession doesn’t hit you hard by clearing your debts, cutting your expenses and getting as much free stuff as you […]

read more

Java Persistence API – Getting Started

The Java persistence API (JPA) allows you to store data from POJO’s (Plain old Java Objects) into database tables. The persistence metadata is specified using Java annotations, XML mapping files or a combination of both. In case both are used then the XML information overwrites the annotations in the Java code. This persistence metadata defines […]

read more

Java Console and File Input/Output Cheat Sheet

Console OutputSystem.out.print(“Hello “);System.out.println(“world”);Console InputBufferedReader in = new BufferedReader(new InputStreamReader(System.in));String text = in.readLine();File OutputPrintWriter out = new PrintWriter(new FileWriter(“K:locationoutputfile.txt”)));out.print(“Hello “);out.println(“world”);out.close();File InputBufferedReader in = new BufferedReader(new FileReader(“K:locationinputfile.txt”));String text = in.readLine();in.close();Converting input dataString text = in.readLine();int x = Integer.parseInt(text);double y = Double.parseDouble(text);Reading until EOFwhile (in.ready()) { text = in.readLine(); System.out.println(text);}Pulling apart delimited items on a lineString text = […]

read more

Splitting the ALSB Logging

What it does Normally the AquaLogic Service Bus logs in the main Weblogic domain log. This sample code splits the ALSB logging to a separate log. How it Works A startup class is used to direct ALSB log entries to the new ALSB log. A log filter is used to stop the ALSB logs from […]

read more

Reverse Engineering using UML Graph

I have been on several teams where we studiously designed UML diagrams at the beginning of the project. As the project progressed, and deadlines approached, the UML diagrams were left somewhere behind, not to be updated in months. When a new developer joined the team, we showcased the old UML diagrams, and kept telling “Oh, […]

read more

Choosing between Routing and Orchestration in an ESB

Topics ESB, Orchestration Tags Routing, JBI, Enterprise Integration Patterns Introduction Enterprise Service Buses are nowadays indeed useful solutions that combine an array of tools allowing to solve practical problems in the field of application and service integration. However, they present the same mild inconvenience that a toolbox does to its user who knows that the […]

read more

Update to Vista SP1 Frequently Asked Questions

This document contains information on issues and solutions related to updating to the Windows Vista Service Pack 1. This document will be updated frequently as new concerns and information become available. Please check back for the latest information. Microsoft is the primary source of information on SP1 issues When updating a computer to the Windows […]

read more