Wednesday, December 14, 2011

Thursday, November 10, 2011

Java API To Access Microsoft Excel Format

HSSF is the POI Project's pure Java implementation of the Excel '97(-2007) file format. XSSF is the POI Project's pure Java implementation of the Excel 2007 OOXML (.xlsx) file format. HSSF and XSSF provides ways to read spreadsheets create, modify, read and write XLS spreadsheets. They provide: low level structures for those with special needs an eventmodel api for efficient read-only access a full usermodel api for creating, reading and modifying XLS files Please Go to http://poi.apache.org/spreadsheet/index.html

Eclipse upgrading Subversion to 1.7

I found out this morning that the latest round of Eclipse upgrades includes an upgrade of the Subversion client (not sure if it’s Subclipse or Subversive) to use the Subversion 1.7 libraries. Installing this upgrade and using the new Subversion client on your working copy will render the working copy unable to be read by 1.6.x Subversion clients like the command-line svn or Tortoise. The symptom will be a popup, when trying to use e.g. Tortoise on your working copy, that “This working copy appears to have been created by a Subversion client version 1.7 or greater.” IF AND ONLY IF you are experiencing this issue, I have placed the Subversion 1.7.1 command-line and TortoiseSVN installers in J:\WOL\svn_1.7 . If you are a TortoiseSVN user, I suggest one precaution before installing the new version. In Windows Explorer, browse to a Subversion working copy, right-click on a folder and choose “TortoiseSVN -> About”. Check the first line of the Version Information in the popup; it should say something like “TortoiseSVN 1.6.12….”. If the current version is 1.6.9 or less, then after upgrading with the 1.7.1 Tortoise installer, you will need to run the installer again and choose “Repair Install”. If you are already at Tortoise version 1.6.10 or later you don’t need to worry about repairing. Note that IntelliJ IDEA will not support Subversion 1.7 until they release IDEA Version 11, so IDEA users definitely should NOT upgrade their Subversion clients at this time. Make sure You restart the system.

Thursday, November 3, 2011

Thursday, August 4, 2011

How To Ace Your Job Interview

You’ve finally got that job interview that you’ve been vying for.
How should you behave when you get there? What if you don’t have answers to all the questions? How do you make the right impression?
No matter how many years of work experience you have, it’s natural to have a million questions buzzing through your head. Here, some recruiters and managers share tips to help get you through that interview with flying colors.

1. Do Your Homework

The number one complaint that recruiters have is that people turn up for job interviews clueless about the company, its top officers, or the job. Even very senior people make this mistake.
“Understand the organization you are going to for an interview,” says Ramesh Vaswani, executive vice-chairman of computer accessory-maker Intex Technologies (India) Ltd.
Look up the names of the company’s top officers, like the chief executive and the chairman, and especially the person in charge of the department where you want to work. Study the company Web site. Google news articles on the company, and make a note of any recent acquisitions, new products launched, or new directions the company is taking. Where possible, read up on the company’s financial condition, and look at a recent annual report.
“If you can strategically drop some of these points [in conversation], that shows you’re very well read and clued in,” says E Balaji, head of Ma Foi Randstad, a human resource services company.

2. Rehearse

Ahead of the interview, think through the questions you might be asked about your current or past job, why you left your previous position, what you’re looking for in the new job, and what makes you so suitable for this position.
Don’t forget to prepare for this trick question that recruiters love to ask.
Write down your answers—that’ll help you remember them—and maybe even rehearse them aloud. You’ll be more confident at the actual interview.
If you don’t know the answer to a question, say so, politely. For instance, you can say: I’m afraid I don’t know, but I can get back to you on that. Trying to fake it usually doesn’t work because experienced interviewers can see through that.

3. Be Specific

When asked about a current or past job, interviewees “spend a lot of time talking about their organization,” says Mr. Vaswani. While it’s great if you have worked for a large or well-known company, what’s more important is what you did there.
“Talk about specific assignments you have handled,” he says. Instead of simply saying that you were the chief finance officer for your organization, talk about a target you helped achieve, such as raising millions of rupees of working capital.

4. Turn the Tables

Don’t be a passive interviewee. When you get the opportunity, ask questions. These can be about the company’s future plans, growth prospects, or about what is expected of you from the new job and what growth you can expect at the company.
These questions “convey that you’re seriously growth-oriented,” says Mr. Balaji.
Be careful, however, to not ask something that you could have found out on the company’s website.

5. Go Gentle on a Current or Past Employer

In general, you want to talk positively about your current or past employer. Badmouthing your previous employer could leave a bad impression on a potential new employer.
Find a neutral way to explain challenges you might have faced at the previous company, or reasons why your career growth required that you move on. If there was a disagreement with your previous manager, communicate it diplomatically. You could say “there were strategic differences in our approaches.” Don’t say you hated your manager.

6. The Salary Equation

Experts advise leaving the salary discussion to the very end of the interview process.
“As a rule, people shouldn’t portray that one is only driven by the money,” says Mr. Balaji.
Talk about salary only if the interviewer brings up the topic. Be truthful about what you earn currently, and be prepared to give some idea of what you expect in the new position.

7. Manners Count

Don’t overlook your basic etiquette.
“Arrive on time; not too early, not too late. Either way can send different kinds of signals,” says Nirmit Parekh, managing director and chief executive officer of international executive research firm 3P Consultants Pvt. Ltd. in Mumbai.
If you get there too early, it can show that you have a lot of time to kill.
Switch off your mobile phone before the interview. “Invariably, I’m standing for a minute because the person is completing a call,” says Mr. Parekh.

8. What to Wear

Dress appropriately—not too casual, but you needn’t be in a suit-and-tie either, especially if it’s hot outside. A clean shirt, tie and trousers are good enough for men. Women can wear a modest Indian outfit, or a collared shirt and pants.

9. Body Language

“Body posture, according to me, is extremely important when you are talking to and meeting a person,” says Mr. Parekh. It immediately gives away whether the person is confident—or overconfident.
If someone crosses their legs or leans back too casually, you know he’s not taking this meeting seriously, he adds.
A firm handshake leaves a good impression. Be sure you maintain eye contact during the interview. If there is more than one interviewer, don’t ignore anyone.
“A smile is always welcome,” he says.

10. Follow-up

Send a thank-you note or email to the person you met with. And ask when you should check back to find out the interview result.

How to change Tomcat default port ?

Please Refer

http://www.mkyong.com/tomcat/how-to-change-tomcat-default-port/

Wednesday, August 3, 2011

What is transient keyword in Java?

What is Serilization?

If you want to understand what is transient, then first learn what is serilization concept in Java if you are not familiar with that. Serilization is the process of making the object's state persistent. That means the state of the object is converted into stream of bytes and stored in a file. In the same way we can use the de-serilization concept to bring back the object's state from bytes. This is one of the important concept in Java programming because thisserilization is mostly used in the networking programming. The object's which are needs to be transmitted through network has to be converted as bytes, for that purpose ever class or interface must implements Serilizationinterface. It is a marker interface without any methods.

What is Transient?

By default all the variables in the object is converted into the persistent. In some cases, you may want to avoid persisting some variables because you don't have the necesscity to persist those varibale. So, you can declare those variables as transient. if the variable is declared as transient, then it will not be persisted. It is the main purpose of the transient keyword.

A Simple JavaServer Faces Application

Please refer this one for creating a sample web application by using JSF FrameWork.


http://exadel.com/web/portal/jsftutorial-kickstart

Thursday, July 21, 2011

Wednesday, February 9, 2011

Love n marriage...

A student asks a teacher, "What is love?"

The teacher said, "in order to answer your question, go to the wheat field and choose the biggest wheat and come back.

But the rule is: you can go through them only once and cannot turn back to pick."

The student went to the field, go thru first row, he saw one big wheat, but he wonders....maybe there is a bigger one later.

Then he saw another bigger one... But maybe there is an even bigger one waiting for him.

Later, when he finished more than half of the wheat field, he start to realize that the wheat is not as big as the previous one he saw, he know he has missed the biggest one, and he regretted.

So, he ended up went back to the teacher with empty hand.

The teacher told him, "...this is love... You keep looking for a better one, but when later you realize, you have already miss the person...."



"What is marriage then?" the student asked.

The teacher said, "in order to answer your question, go to the corn field and choose the biggest corn and come back. But the rule is: you can go through them only once and cannot turn back to pick."

The student went to the corn field, this time he is careful not to repeat the previous mistake, when he reach the middle of the field, he has picked one medium corn that he feel satisfy, and come back to the teacher.

The teacher told him, "this time you bring back a corn.... You look for one that is just nice, and you have faith and believe this is the best one you get.... This is marriage.

Wednesday, February 2, 2011

Commands in the MAVEN

1. Maven is a intelligent project management, build and deployment tool provided by
Apache’s software foundation group. Maven deals with application development
lifecycle management.
2. Convention over configuration
3. Actually, for a long time there was a need to standardized project development
lifecycle management system and Maven has emerged as a perfect option that
meets the needs.
4. Project Object Model
A Project Object Model or POM is the fundamental unit of work in Maven. It is an
xml file that contains information about the
project and configuration details used by Maven to build the project. It contains
default values for most projects.
5. Repository
Another concept in Maven is that of a repository. The repository holds the artifacts
on which your project depends. There are two kinds of repository: local and remote.
6. Plugins Maven provides a plugin execution framework and all work is done by
plugins. Maven plugins are available to execute any specific task.
7. the build lifecycle
8. groupId It identifies your project as a whole (it will make more sense when you
start using multi-modules build) and should be unique. Maven enforces a naming
schema following the Java package name rules. Hence, the groupId has to start by
at least a domain name you control followed by any subgroups you want.
9. artifactId It identifies precisely the current project inside the group identified by
the groupId.
10. version: The version number allows you to distinguish your different project
releases. There are two kinds of versions depending of the release type it is
associated with:
◦ Official releases : 1.0, 2.2, ...
◦ Specific releases (nightly build or snapshots) : 1.0-SNAPSHOT,
2.1.2-SNAPSHOT
11. type: default jar
12. scope:
1. classpath management
2. Transitivity of a dependency
1. compile - this is the default scope and is transitive.
2. provided - jdk or container and is not transitive.
3. runtime - not required for compilation, but is for execution.
4. test -
5. system - The artifact is always available and is not looked up in a
repository.
13. Exclusions
1. The Standard Directory Layout
◦ For every new project, you need to learn a new way of structuring your files.
◦ You need to specify a lot of redundant configuration in order to make your
build tool work
2.
◦ src
▪ main
▪ java
▪ resources
▪ test
▪ java
▪ resources
◦ target
◦ pom.xml
3. The Build Lifecycle: Maven is based around the central concept of a build lifecycle.
What this means is that the process for building and distributing a particular artifact
is clearly defined.
4. Repositories: A repository in Maven is used to hold build artifacts and
dependencies of varying types. Repositories allow Maven to manage your project
dependencies and automatically share components between different projects.
5. local and remote.The local repository serves two purposes, it holds a cache of all
the different artifacts retrieved remotly and contains your installed projects. An
installed project is a project which has been built and that you want to be able to
use in some other local projects but you aren't ready to deploy it yet and makes it
available to other developers.
6. Remote repositories allow you to makes your project artifacts available to other
developers.
7. Maven can stores four kind of files associated to a project : the project artifact
archive, some project related content (javadoc archive, source archive), the
project pom file and key signature files so downloaded files integrity can be
verified.
8. Dependency Management: Dependency management is one of the features of
Maven that is best known to users and is one of the areas where Maven excels.
There is not much difficulty in managing dependencies for a single a project, but
when you start getting into dealing with multi-module projects and applications that
consist of tens or hundreds of modules this is where Maven can help you a great
deal in maintaining a high degree of control and stability.
9. transitive dependencies
10. mvn archetype:generate
mvn archetype: create
◦ the selection of the archetype,
◦ the configuration of that archetype,
◦ the effective creation of the project from the collected information.
11. Maven Eclipse Plugin
◦ eclipse:eclipse generates the Eclipse configuration files.(.project
and .classpath files,.setting)
◦ eclipse:clean is used to delete the files used by the Eclipse IDE.
• Maven Help Plugin
• help:active-profiles lists the profiles which are currently active for the
build.
• help:all-profiles lists the available profiles under the current project.
• help:describe describes the attributes of a Plugin and/or a Mojo (Maven
plain Old Java Object).
• help:effective-pom displays the effective POM as an XML for the current
build, with the active profiles factored in.
• help:effective-settings displays the calculated settings as an XML for the
project, given any profile enhancement and the inheritance of the global
settings into the user-level settings.
• help:system displays a list of the platform details like system properties
and environment variables.
• http://maven.apache.org/pom.html#What_is_the_POM
• versioning
• String are compared in lexicographical order, but wait, if one string starts with
and contains the other string, then the shorter string is returned as newer. So
where does this mess up? So 1.0-alpha1 > 1.0-alpha10

Thursday, January 6, 2011

Nice Tutorial On Spring AOP Example – Advice

This will help us to create the diff Advices.
Please Read it . Its very easy to created the Advices in Spring

http://www.mkyong.com/spring/spring-aop-examples-advice/

It is easier to criticize…

Nice story Please read it completely..


Once upon a time there was a painter who had just completed his course under disciple hood of a great painter. This young artist decided to assess his skills. He decided to give his best strokes on the canvass. He took 3 days and painted beautiful scenery.
He wanted people's opinion about his caliber and painting skills.

He put his creation at a busy street-crossing. And just down below a board which read-"Gentlemen, I have painted this piece. Since I'm new to this profession I might have committed some mistakes in my strokes etc. Please put a cross wherever you see a mistake."

While he came back in the evening to collect his painting he was completely shattered to see that whole canvass was filled with Xs (crosses) and some people had even written their comments on the painting.

Disheartened and broken completely he ran to his master's place and burst into tears. Sobbing and crying he told his master about what happened and showed the pathetic state of his creation which was filled with crosses and correction remarks.

This young artist was breathing heavily and master heard him saying "I'm useless and if this is what I have learnt to paint I'm not worth becoming a painter. People have rejected me completely. I feel like dying"

Master smiled and suggested "My Son, I will prove that you are a great artist and have learnt a flawless painting." Young disciple couldn't believe it and said "I have lost faith in me and I don't think I am good enough. Don't make false hopes..

"Do as I say without questioning it. It WILL work." Master interrupted him.

Young artist reluctantly agreed and two days later early morning he presented a replica of his earlier painting to his master. Master took that gracefully and smiled.

"Come with me." master said.

They reached the same street-square early morning and displayed the same painting exactly at the same place. Now master took out another board which read -"Gentlemen, I have painted this piece. Since I'm new to this profession I might have committed some mistakes in my strokes etc. I have put a box with colors and brushes just below. Please do a favor. If you see a mistake, kindly pick up the brush and correct it." Master and disciple walked back home.

They both visited the place same evening. Young painter was surprised to see that actually there was not a single correction done so far. Next day again they visited and found painting remained untouched. They say the painting was kept there for a month for no correction came in!

It is easier to criticize, but difficult to improve. If you want to help people improve their behavior it is worth investing your effort in learning how to help people change their behaviors, attitudes and skills. Also, always remember not to get carried away or judge yourself by someone else’s criticism and feel depressed. Take criticism in your stride; consider that which are genuine and implement those which you think is the best to improve you as a person!!

Wednesday, January 5, 2011

Creating a connection pools in weblogic 8.1

Follow the below steps for doing manually

Go to C:\software\bea\weblogic\8.1\sp4\user_projects\domains\uprr_desktop\ config.xml

Entry in the file:-

Name="iee_TeraPoolDS" PoolName="iee_TeraPool" Targets="desktop_server"/>

MaxCapacity="1" Name="iee_TeraPool" Password="?" Properties="user=? " Targets="desktop_server" URL="jdbc:teradata://edwprdi0.edw.tla.uprr.com"/>

Note: - Password="?" Properties="user=? " still we don’t know the username and password for teradata connection.

Name="iee_PoolTXDS" PoolName="IEE Connection Pool" Targets="desktop_server"/>

ConnProfilingEnabled="true" DriverName="oracle.jdbc.driver.OracleDriver" MaxCapacity="2" Name="IEE Connection Pool" Password=" iee123 " Properties="user=DIEE999" Targets="desktop_server" TestConnectionsOnCreate="true" TestConnectionsOnRelease="true" TestConnectionsOnReserve="true" TestFrequencySeconds="5" TestTableName="SQL SELECT 1 FROM DUAL" URL="jdbc:oracle:thin:@dev184.oracle.uprr.com:1521:dev184"/>

Also make sure that teradata home is present in the startWeblogic.cmd file if not follow the below steps

Along with the above configuration we have to set the teradata home in startWeblogic.cmd file

set TERADATA_HOME=%WL_HOME%\common\eval\teradata

set TERADATA_CLASSPATH=%TERADATA_HOME%;%TERADATA_HOME%\lib\terajdbc4.jar;%TERADATA_HOME%\lib\tdgssjava.jar;%TERADATA_HOME%\TdgssUserConfigFile.xml

Good reference for spring examples

http://www.springbyexample.org/

Command to see the effective pom of your project

Lets say our project has no of master poms which we may not know or internal plug ins which we don't come across.

Use this command to see all the details of your project

mvn clean help:effective-pom > effpom.xml

Example:-

C:\InterModel-work\messaging-equipment>mvn clean help:effective-pom > effpom.xml

So my project name is messaging-equipment which is at InterModel-work of c directory.

Go to your project directory and run the command.