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.
Wednesday, August 3, 2011
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
http://exadel.com/web/portal/jsftutorial-kickstart
Thursday, July 21, 2011
Create Web Service in Java Using Apache Axis2 and Eclipse
http://blog.sencide.com/2011/06/create-web-service-using-apache-axis2.html
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.
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
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/
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!!
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!!
Subscribe to:
Posts (Atom)