Tuesday, 28 July 2015

SingleTon Design Pattern


public class Runtime
{

    public static Runtime getRuntime()
    {
        return currentRuntime;
    }


    private Runtime()
    {
    }

    private static Runtime currentRuntime = new Runtime();

}

Friday, 24 July 2015

Generics

Generics in java were introduced as one of features in JDK 5.

generics sole purpose i.e. Type Safety.

Generic types are instantiated to form parameterized types by providing actual type arguments that replace the formal type parameters. A class like LinkedList<E> is a generic type, that has a type parameter E . Instantiations, such as LinkedList<Integer> or a LinkedList<String>, are called parameterized types, and String and Integer are the respective actual type arguments.

If you closely look at java collection framework classes then you will observe that most classes take parameter/argument of type Object and return values from methods as Object. Now, in this form, they can take any java type as argument and return the same. They are essentially heterogeneous i.e. not of a particular similar type.

In original collection framework, having homogeneous collections was not possible without adding extra checks before adding some checks in code. Generics were introduced to remove this limitation to be very specific. They add this type checking of parameters in your code at compile time, automatically. This saves us writing a lot of unnecessary code which actually does not add any value in run-time, if written correctly.

Without this type safety, your code could have infected by various bugs which get revealed only in runtime. Using generics, makes them highlighted in compile time itself and make you code robust even before you get the bytecode of your java source code files.

In the heart of generics is “type safety“. What exactly is type safety? It’s just a guarantee by compiler that if correct Types are used in correct places then there should not be any ClassCastException in runtime.

Another important term in java generics is “type erasure“. It essentially means that all the extra information added using generics into source code will be removed from bytecode generated from it. Inside bytecode, it will be old java syntax which you will get if you don’t use generics at all. This necessarily helps in generating and executing code written prior java 5 when generics were not added in language.

Class Declarations

public class Throwable
  implements Serializable

public class IdentityHashMap extends AbstractMap
    implements Map, Serializable, Cloneable

public class File
    implements Serializable, Comparable

public class RandomAccessFile
    implements DataOutput, DataInput, Closeable

System Class In Java



The purpose of the System class is to provide access to system resources.

Runtime Class in Java



What is the purpose of the Runtime class?
The purpose of the Runtime class is to provide access to the Java runtime system.

Thursday, 23 July 2015

Java Interview Questions - Section 1


How does Java handle integer overflows and underflows?
It uses those low order bytes of the result that can fit into the size of the type allowed by the operation.

What exception you get when you declare a class as private?
Illegal modifier for the class BaseClass; only public, abstract & final are permitted.

What is the List interface?
The List interface provides support for ordered collections of objects.

What is the Vector class?
The Vector class provides the capability to implement a growable array of objects

What modifiers may be used with an inner class that is a member of an outer class?
A (non-local) inner class may be declared as public, protected, private, static, final, or abstract.

What's new with the stop(), suspend() and resume() methods in JDK 1.2?
The stop(), suspend() and resume() methods have been deprecated in JDK 1.2.

What state does a thread enter when it terminates its processing?
When a thread terminates its processing, it enters the dead state.

If a method is declared as protected, where may the method be accessed?
A protected method may only be accessed by classes or interfaces of the same package or by subclasses of the class in which it is declared.

What is an Iterator interface?
The Iterator interface is used to step through the elements of a Collection.

How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters?
Unicode requires 16 bits and ASCII require 7 bits. Although the ASCII character set uses only 7 bits, it is usually represented as 8 bits. UTF-8 represents characters using 8, 16, and 18 bit patterns. UTF-16 uses 16-bit and larger bit patterns.

What are three ways in which a thread can enter the waiting state?
A thread can enter the waiting state by invoking its sleep() method, by blocking on I/O, by unsuccessfully attempting to acquire an object's lock, or by invoking an object's wait() method. It can also enter the waiting state by invoking its (deprecated) suspend() method.

Can a lock be acquired on a class?
Yes, a lock can be acquired on a class. This lock is acquired on the class's Class object.

What is the difference between yielding and sleeping?
When a task invokes its yield() method, it returns to the ready state. When a task invokes its sleep() method, it returns to the waiting state.

What modifiers may be used with an inner class that is a member of an outer class?
A (non-local) inner class may be declared as public, protected, private, static, final, or abstract.

If a method is declared as protected, where may the method be accessed?
A protected method may only be accessed by classes or interfaces of the same package or by subclasses of the class in which it is declared.

What is an Iterator interface?
The Iterator interface is used to step through the elements of a Collection.

How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters?
Unicode requires 16 bits and ASCII require 7 bits. Although the ASCII character set uses only 7 bits, it is usually represented as 8 bits. UTF-8 represents characters using 8, 16, and 18 bit patterns. UTF-16 uses 16-bit and larger bit patterns.

What is the difference between yielding and sleeping?
When a task invokes its yield() method, it returns to the ready state. When a task invokes its sleep() method, it returns to the waiting state.

Is sizeof a keyword?
The sizeof operator is not a keyword.

What are wrapped classes?
Wrapped classes are classes that allow primitive types to be accessed as objects.

Does garbage collection guarantee that a program will not run out of memory?
No, it doesn't. It is possible for programs to use up memory resources faster than they are garbage collected. It is also possible for programs to create objects that are not subject to garbage collection

What is the difference between preemptive scheduling and time slicing?
Under preemptive scheduling, the highest priority task executes until it enters the waiting or dead states or a higher priority task comes into existence. Under time slicing, a task executes for a predefined slice of time and then reenters the pool of ready tasks. The scheduler then determines which task should execute next, based on priority and other factors.

What is a native method?
A native method is a method that is implemented in a language other than Java.

How can you write a loop indefinitely?
for(;;)--for loop; while(true)--always true, etc.

Can an anonymous class be declared as implementing an interface and extending a class?
An anonymous class may implement an interface or extend a superclass, but may not be declared to do both.

What is the purpose of finalization?
The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected.

What invokes a thread's run() method?
After a thread is started, via its start() method or that of the Thread class, the JVM invokes the thread's run() method when the thread is initially executed.

What invokes a thread's run() method?
After a thread is started, via its start() method or that of the Thread class, the JVM invokes the thread's run() method when the thread is initially executed.

What is the difference between the Boolean & operator and the && operator?
If an expression involving the Boolean & operator is evaluated, both operands are evaluated. Then the & operator is applied to the operand. When an expression involving the && operator is evaluated, the first operand is evaluated. If the first operand returns a value of true then the second operand is evaluated. The && operator is then applied to the first and second operands. If the first operand evaluates to false, the evaluation of the second operand is skipped. Operator & has no chance to skip both sides evaluation and && operator does. If asked why, give details as above.

What is the Properties class?
The properties class is a subclass of Hashtable that can be read from or written to a stream. It also provides the capability to specify a set of default values to be used.

What is the purpose of the finally clause of a try-catch-finally statement?
The finally clause is used to provide the capability to execute code no matter whether or not an exception is thrown or caught.

What is the purpose of the wait(), notify(), and notifyAll() methods?
The wait(),notify(), and notifyAll() methods are used to provide an efficient way for threads to communicate each other.

What is a static method?
A static method is a method that belongs to the class rather than any object of the class and doesn't apply to an object or even require that any objects of the class have been instantiated.

What is the difference between a static and a non-static inner class?
A non-static inner class may have object instances that are associated with instances of the class's outer class. A static inner class does not have any object instances.

What is an object's lock and which object's have locks?
An object's lock is a mechanism that is used by multiple threads to obtain synchronized access to the object. A thread may execute a synchronized method of an object only after it has acquired the object's lock. All objects and classes have locks. A class's lock is acquired on the class's Class object.

When can an object reference be cast to an interface reference?
An object reference be cast to an interface reference when the object implements the referenced interface.

What happens when a thread cannot acquire a lock on an object?
If a thread attempts to execute a synchronized method or synchronized statement and is unable to acquire an object's lock, it enters the waiting state until the lock becomes available.

What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?
The Reader/Writer class hierarchy is character-oriented, and the InputStream/OutputStream class hierarchy is byte-oriented.

What classes of exceptions may be caught by a catch clause?
A catch clause can catch any exception that may be assigned to the Throwable type. This includes the Error and Exception types.

What is the difference between throw and throws keywords?
The throw keyword denotes a statement that causes an exception to be initiated. It takes the Exception object to be thrown as argument. The exception will be caught by an immediately encompassing try-catch construction or propagated further up the calling hierarchy. The throws keyword is a modifier of a method that designates that exceptions may come out of the mehtod, either by virtue of the method throwing the exception itself or because it fails to catch such exceptions that a method it calls may throw.

If a class is declared without any access modifiers, where may the class be accessed?
A class that is declared without any access modifiers is said to have package or friendly access. This means that the class can only be accessed by other classes and interfaces that are defined within the same package.

Does a class inherit the constructors of its superclass?
A class does not inherit constructors from any of its superclasses.

Name primitive Java types.
The primitive types are byte, char, short, int, long, float, double, and boolean.

Which class should you use to obtain design information about an object?
The Class class is used to obtain information about an object's design.

What is the difference between static and non-static variables?
A static variable is associated with the class as a whole rather than with specific instances of a class. Non-static variables take on unique values with each object instance.

What is the purpose of the File class?
The File class is used to create objects that provide access to the files and directories of a local file system.

How does multithreading take place on a computer with a single CPU?
The operating system's task scheduler allocates execution time to multiple tasks. By quickly switching between executing tasks, it creates the impression that tasks execute sequentially.

What restrictions are placed on method overriding?
Overridden methods must have the same name, argument list, and return type. The overriding method may not limit the access of the method it overrides. The overriding method may not throw any exceptions that may not be thrown by the overridden method.

What is casting?
There are two types of casting, casting between primitive numeric types and casting between object references. Casting between numeric types is used to convert larger values, such as double values, to smaller values, such as byte values. Casting between object references is used to refer to an object by a compatible class, interface, or array type reference.

What class allows you to read objects directly from a stream?
The ObjectInputStream class supports the reading of objects from input streams.

How are this() and super() used with constructors? this() is used to invoke a constructor of the same class.
super() is used to invoke a superclass constructor.

How is it possible for two String objects with identical values not to be equal under the == operator?
The == operator compares two objects to determine if they are the same object in memory. It is possible for two String objects to have the same value, but located indifferent areas of memory.

What an I/O filter?
An I/O filter is an object that reads from one stream and writes to another, usually altering the data in some way as it is passed from one stream to another.

What is the difference between the File and RandomAccessFile classes?
The File class encapsulates the files and directories of the local file system. The RandomAccessFile class provides the methods needed to directly access data contained in any part of a file.

What interface must an object implement before it can be written to a stream as an object?
An object must implement the Serializable or Externalizable interface before it can be written to a stream as an object.

What is a Java package and how is it used?
A Java package is a naming context for classes and interfaces. A package is used to create a separate name space for groups of classes and interfaces. Packages are also used to organize related classes and interfaces into a single API unit and to control accessibility to these classes and interfaces.

What are the Object and Class classes used for?
The Object class is the highest-level class in the Java class hierarchy. The Class class is used to represent the classes and interfaces that are loaded by a Java program.

What is Serialization and deserialization?
Serialization is the process of writing the state of an object to a byte stream. Deserialization is the process of restoring these objects.

Does the code in finally block get executed if there is an exception and a return statement in a catch block?
If an exception occurs and there is a return statement in catch block, the finally block is still executed. The finally block will not be executed when the System.exit(1) statement is executed earlier or the system shut down earlier or the memory is used up earlier before the thread goes to finally block.

How the object oriented approach helps us keep complexity of software development under control?
We can discuss such issue from the following aspects: Objects allow procedures to be encapsulated with their data to reduce potential interference. Inheritance allows well-tested procedures to be reused and enables changes to make once and have effect in all relevant places. The well-defined separations of interface and implementation allows constraints to be imposed on inheriting classes while still allowing the flexibility of overriding and overloading.

What is polymorphism?
Polymorphism allows methods to be written that needn't be concerned about the specifics of the objects they will be applied to. That is, the method can be specified at a higher level of abstraction and can be counted on to work even on objects of yet unconceived classes.

What is design by contract?
The design by contract specifies the obligations of a method to any other methods that may use its services and also theirs to it. For example, the preconditions specify what the method required to be true when the method is called. Hence making sure that preconditions are. Similarly, postconditions specify what must be true when the method is finished, thus the called method has the responsibility of satisfying the post conditions. In Java, the exception handling facilities support the use of design by contract, especially in the case of checked exceptions. The assert keyword can be used to make such contracts

Synchronization in Java

What is synchronization and why is it important?
With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one thread to modify a shared object while another thread is in the process of using or updating that object's value. This often causes dirty data and leads to significant errors.

What are synchronized methods and synchronized statements?
Synchronized methods are methods that are used to control access to an object. A thread only executes a synchronized method after it has acquired the lock for the method's object or class. Synchronized statements are similar to synchronized methods. A synchronized statement can only be executed after a thread has acquired the lock for the object or class referenced in the synchronized statement.

Collections utility class in Java Collections


Utility/Polymorphic methods in class Collections




Serialization in java

public interface Externalizable
    extends Serializable
{

    public abstract void writeExternal(ObjectOutput objectoutput)
        throws IOException;

    public abstract void readExternal(ObjectInput objectinput)
        throws IOException, ClassNotFoundException;
}


How many methods in the Externalizable interface?
There are two methods in the Externalizable interface. You have to implement these two methods in order to make your class externalizable. These two methods are readExternal() and writeExternal().


What is the difference between Serializable and Externalizable interface?
When you use Serializable interface, your class is serialized automatically by default. But you can override writeObject() and readObject() two methods to control more complex object serailization process. When you use Externalizable interface, you have a complete control over your class's serialization process.


What is a transient variable?
A transient variable is a variable that may not be serialized. If you don't want some field not to be serialized, you can mark that field transient or static.

ConcurrentHashMap vs HashMap

 1.  Thread-Safe & fail-safe

     ConcurrentHashMap is thread-safe that is the code can be accessed by single thread at a time .
     while HashMap is not thread-safe.

 2.  Synchronization Method :

    HashMap can be synchronized by using synchronizedMap(HashMap)  method.
    By using this method we get a HashMap object which is equivalent to the HashTable object .               So every modification is performed on Map is locked on Map object.


  •   ConcurrentHashMap synchronizes or locks on the certain portion of the Map. To optimize           the performance of ConcurrentHashMap , Map is divided into different partitions depending     upon the Concurrency level. So that we do not need to synchronize the whole Map Object.


3.  Null Key

     ConcurrentHashMap does not allow NULL values . So the key can not be null in                                        ConcurrentHashMap .While In HashMap there can only be one null key.

4.  Performance

     In multiple threaded environment HashMap is usually faster than ConcurrentHashMap as  
     only single thread can access the certain portion of the Map and thus reducing the performance.
     While in HashMap any number of threads can access the code at the same time.

Arraylist vs Vector


1.  Synchronization and Thread-Safe

Vector is  synchronized while ArrayList is not synchronized  . Synchronization and thread safe means at a time only one thread can access the code .In Vector class all the methods are synchronized .That's why the Vector object is already synchronized when it is created .

2.  Performance

Vector is slow as it is thread safe . In comparison ArrayList is fast as it is non synchronized . Thus     in ArrayList two or more threads  can access the code at the same time  , while Vector is limited to one thread at a time.

3. Automatic Increase in Capacity

A Vector defaults to doubling size of its array . While when you insert an element into the ArrayList ,      it increases
its Array size by 50%  .


By default ArrayList size is 10 . It checks whether it reaches the last  element then it will create the new array ,copy the new data of last array to new array ,then old array is garbage collected by the Java Virtual Machine (JVM) . 

4. Set Increment Size

ArrayList does not define the increment size . Vector defines the increment size .

You can find the following method in Vector Class

public synchronized void setSize(int i) { //some code  }

There is no setSize() method or any other method in ArrayList which can manually set the increment size.

5. Enumerator

Other than Hashtable ,Vector is the only other class which uses both Enumeration and Iterator.While ArrayList can only use Iterator for traversing an ArrayList .

6.  Introduction in Java 

java.util.Vector  class was there in java since the very first version of the java development kit (jdk).
java.util.ArrayList  was introduced in java version 1.2 , as part of Java Collections framework . In java version 1.2 , Vector class has been refactored to implement the List Interface .

Marker Interfaces


java.util.RandomAccess
java.io.Serializable
java.lang.Cloneable
org.springframework.beans.factory.Aware  - Spring framework


TreeSet vs HashSet

Difference between HashSet and TreeSet

1. Ordering : HashSet stores the object in random order . There is no guarantee that the element we  inserted first in the HashSet  will be printed first in the output . For example  

Elements are sorted according to the natural ordering of its elements in TreeSet. If the objects can not
be sorted in natural order than use compareTo() method to sort the elements of TreeSet object .

2. Null value :   HashSet can store null object while TreeSet does not allow null object. If one try to store null object in TreeSet object , it will throw Null Pointer Exception.

3. Performance : HashSet take constant time performance for the basic operations like add, remove contains and  size.While TreeSet guarantees log(n) time cost for the basic operations (add,remove,contains).

4. Speed : HashSet is much faster than TreeSet,as performance time of HashSet is constant against the log time of TreeSet for most operations (add,remove ,contains and size) . Iteration performance of HashSet mainly depends on the load factor and initial capacity parameters.

5. Internal implementation :  As we have already discussed How hashset internally works in java thus, in one line HashSet are internally backed by hashmap. While TreeSet is backed by a  Navigable  TreeMap.

6. Functionality :    TreeSet is rich in functionality as compare to HashSet. Functions like pollFirst(),pollLast(),first(),last(),ceiling(),lower() etc. makes TreeSet easier to use than HashSet.

7. Comparison : HashSet uses equals() method for comparison in java while TreeSet uses compareTo() method for maintaining ordering .

To whom priority is given TreeSet comparator or Comparable.compareTo() .

Suppose there are elements in TreeSet which can be naturally sorted by the TreeSet , but we also added our own sorting method by implementing Comparable interface compareTo() method .
Then to whom priority is given.


Answer to the above question is that the Comparator passed into the TreeSet constructor has been given priority.
According to Oracle Java docs

public TreeSet(Comparator comparator)

Constructs a new, empty tree set, sorted according to the specified comparator.

   Parameters:
 
   comparator - the comparator that will be used to order this set. If null, the natural ordering of the elements will be used.




Similarities Between HashSet and TreeSet

1. Unique Elements :   Since HashSet and TreeSet both implements Set interface . Both are allowed to store only unique elements in their objects. Thus there can never be any duplicate elements inside the HashSet and TreeSet objects.

2. Not Thread Safe : HashSet and TreeSet both are not synchronized or not thread safe.HashSet and TreeSet, both implementations are not synchronized. If multiple threads access a hash set/ tree set concurrently, and at least one of the threads modifies the set, it must be synchronized externally.

3. Clone() method copy technique:  Both HashSet and TreeSet uses shallow copy technique to create a clone of  their objects .

4. Fail-fast Iterators :  The iterators returned by this class's  method are fail-fast: if the set is modified at any time after the iterator is  created, in any way except through the iterator's own  remove method, the iterator will throw a  ConcurrentModificationException.  Thus, in the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at   an undetermined time in the future.


When to prefer TreeSet over HashSet

1.  Sorted unique elements are required instead of unique elements.The sorted list given by TreeSet is always in ascending order.

2.   TreeSet has greater locality than HashSet.

If two entries  are near by in the order , then TreeSet places them near each other in data structure and hence in memory, while HashSet spreads the entries all over memory  regardless of the keys they are associated to.
   
As we know Data reads from the hard drive takes much more latency time than data read from the cache or memory. In case data needs to be read from hard drive than prefer TreeSet as it has greater locality than HashSet.

3. TreeSet uses Red- Black tree algorithm underneath to sort out the elements. When one need to perform read/write operations frequently , then TreeSet is a good choice.
 
Thats it for the difference between HashSet and TreeSet , if you have any doubts then please mention in the comments.

Wednesday, 22 July 2015

Java Collections









What is the Collections API?
The Collections API is a set of classes and interfaces that support operations on collections of objects.
  1. Collection extends Iterable
  2. An iterator is an object that enables t traverse through a collection and to remove elements from the collection selectively, if required.
  3. Set
  • Set is a Collection that cannot contain duplicate elements.
  • Set interface contains only methods from Collection.
  • Two Set instances are equal if they have same elements.
  • There are three Set implementations
      HashSet
  • Stores the elements in a hash table
  • Uses hashtable to store the elements.It extends AbstractSet class and implements Set interface.
  • Contains unique elements only.
      TreeSet – orders the elements based on their values

       List<String> li = new ArrayList<String>();
       TreeSet<String> myset = new TreeSet<String>(li);


  • Removing duplicates from array.

               String[] strArr = {"one","two","three","four","four","five"};
               List<String> tmpList = Arrays.asList(strArr);

               TreeSet<String> unique = new TreeSet<String>(tmpList);

      LinkedHashSet – orders the elements based on the order in which it is inserted
  • Bulk operations:
              If s1 and s2 are two sets:
              s1. containsAll(s2) – returns true if s2 is a subset of s1
              s1.addAll(s1) – transforms s1 into the union of s1 and s2
              s1.retainAll(s2) – transforms s1 into the intersection of s1 and s2
              s1.removeAll(s2) – transforms s1 into the set difference of s1 and s24


  1. Arrays,Collections are utility class available in java.util package.

Tuesday, 21 July 2015

Java Technology - Tools














Java API's
  • JAX-RS - (Oracle/Sun MicroSys) - Java API for RESTful Web Services - implementations - Jersey(Sun/Oracle),RESTeasy(jboss),Restlets - JAX RS API
  • JAX-WS - (Oracle/Sun MicroSys) - Java API for XML Web Services (The JAX-WS 2.2 specification JSR 224 defines a standard Java- to-WSDL mapping which determines how WSDL operations are bound to Java methods when a SOAP message invokes a WSDL operation. This Java-to-WSDL mapping determines which Java method gets invoked and how that SOAP message is mapped to the method’s parameters.This mapping also determines how the method’s return value gets mapped to the SOAP response.)
  • JAX-RPC - JAX-WS 2.0 replaced the JAX-RPC API in Java Platform, Enterprise Edition 5 which leans more towards document style Web Services
  • JAXB - Java Architecture for XML Binding - JAXB is particularly useful when the specification is complex and changing. In such a case, regularly changing the XML Schema definitions to keep them synchronised with the Java definitions can be time consuming and error-prone.
  • JAXP - Java API for XML parsing - DOM/SAX parsers

SAX and XSLT are both included in the JAXP (Java API for XML Processing) API, which has been a part of J2SE since version 1.4
  • JAX-M
  • JAX-R - Java API for XML Registries
  • REST - REpresentational State Transfer
  • Java Bean Validation (JSR 303) is a framework that has been approved by the JCP as of 16 November 2009 and is accepted as part of the Java EE 6 specification.
  • JSR 311 API
  • Bean Validation API - (Oracle/Sun MicroSys) - used for REST
  • EJB - EJB was developed by IBM in 1997.EJB was taken over by Sun Microsystems in 1999 (1.0-3.1)
  • J2EE - A collection of synchronized specifications and procedures, which enable solutions regarding deploying, developing supervising multi-tier server-centric applications, is called J2EE.
  • JSF - JavaServer Faces (JSF) is a user interface (UI) designing framework for Java web applications.
  • JPA(Java Persistence API) - Hibernate people developed/recommended - ORM tool
  • CDI - JAVA - spring activities - for replacing jews, spring - now no longer look like EJB
  • RHINO - OPENCLOUD

3rd Party API's for Java :
Apache Commons IO API - http://commons.apache.org/
XStream - Thoughtworks - xml to java ?


Frame Works  for Java: 
  • Spring MVC, AOP, IOC
  • JNETX - AMDOCS
  • JEWS MVC


ORM Tools :

  • Hibernate
  • IBATIS
  • MyBatis

 Servers :
  • Weblogic Application Server - Oracle
  • JBoss - Application Server
  • WebSphere - Application Server - IBM
  • Apache Tomcat - Apache
  • Rhino - Telecom Application Server - Opencloud
  • WildFly - Application Server - RedHat

Apache :

  • Apache Tomcat
  • Apache Axis/Axis2 WS
  • Apache Lucene Search Engine API
  • Apache Hadoop
  • Apache Continuum CIT tool
  • Apache Derby

Development methodologies :  

  • Agile SCRUM - Scrum is an iterative and incremental agile software development methodology for managing product development.
         VISIO, Rationalrose




Enlisted the technologies embraced in J2EE.
  • Enterprise JavaBeans TM (EJB TM)
  • JavaServer Pages TM (JSP TM)
  • Java Servlets
  • The Java Naming and Directory Interface TM (JNDI)
  • The Java Transaction API (JTA)
  • CORBA
  • The JDBC data access API.
Tools
  • SOAPUI 
  • JMeter - APACHE Jakarta
  • Putty
  • Putty Manager
  • WinSCP
  • Filezilla - ?
  • WIRESHARK - network protocol analyzer
  • JENKINS - Hudson - open source continuous integration/contineous testing/contineous deployment tool written in Java.
  • Nagios - open source System/Process analyser tool - Contineous monitoring tool
  • Cygwin - Unix emulation environment on Windows
  • Oracle Java Mission Control - JVM lister via MBean Browser
  • Puppet - Configuration Management 
  • Docker - Containerization

Defect tracking tools :
  • Jira
  • HP ALM (Application Lifecycle Management)


IBM tools
  • Lotus Notes - Mail box
  • SameTime - communicator
  • WebSphere App Server (WAS)
  • WTX Map tool
  • Mainframes - Operating System
  • DB2 - Data base
Microsoft tools
  • Communicator Lync
  • Outlook
Cisco

  • Cisco AnyConnect - secure mobility client
  • Cisco WebEx
  • Cisco Jabber


Operating Systems :

  • IBM AIX - AIX is IBM's Unix implementation, which it develops for a number of its products, notably the IBM SP series. Other manufacturers, such as Motorola, also produce hardware that runs AIX. AIX incorporates elements of System V, BSD, and OSF/1, but includes enough unique features to make using, and especially administering, AIX somewhat different from working with other Unix implementations. Nevertheless, recent versions are compliant with most Unix standards.

Linux flavours
  • Centos
  • Ubuntu
  • Fedora
  • RedHat

CIT tools
  • TeamCity
  • Hudson - Jenkins
  • Cruise Control
  • Continuum - Apache
  • AntHillPro - First Continuous Integration Tool 
                        - released in 2001 and maintained by UrbanCode
                        - (UrbanCode)bought by IBM in 2013

HP :

  • ALM - Application Lifecycle Management / HP Quality Center

Static analysis tools :
  • Find bugs
  • Fortify
Scripting languages
  • Shell
  • batch
  • Groovy - Java scripting language - Groovy supports dynamic typing, like JavaScript and Perl do
  • Scala
  • Python - Jython - Python for Java , weakly typed language.
  • Ruby - JRuby
  • Perl - Initial high level scripting language, weakly typed language.
  • Smalltalk
Build tools
  • ANT - APACHE
  • MAVEN - APACHE
  • Gradle
  • How to use non-server look up
Telecom
  • SipUnit - Offers Sip Stack to test(JUnit) Java based SIP Applications.

UI Technologies :

  • HTML5
  • CSS3
  • JAVA SCRIPT
  • JQUERY
  • JSON/XML
  • ANGULAR.JS
Centralized logging

  • Splunk
  • Elecronic Search ( Kibana , Logstash and FileBeat)

RDBMS :

  • Apache Derby
  • TimesTen
  • Oracle
  • MySql


Qualifications:




Strong knowledge and hands-on experience in Java6 , J2EE1. 5 , JSP, Servlets, JNDI, JDBC, JSON, XML, XSLT, Spring 3 , Spring JDBC, Spring Drools, Spring Batch.
3 years experience in MVC Frameworks like Spring MVC, Struts2, JSF etc
Very Strong experience in Test Driven Development/ Business Driven Development and 2 years of experience in using JUNIT and related tools / Cucumber / Selenium. Nice to have experience with automated code review tools like Crucible.
2 years experience in building and publishing SOAP/ REST web Services and implementing security on Web Services.
1 years of experience in java workflow engines like JBPM.
Good experience using Cache tools like EHCache, Spring Gemfire.
Strong experience in using Eclipse, Maven, Jenkins, SVN, JIRA, HP AML or equivalent tools.
Good knowledge and experience in ORM tools like Hibernate, MyBatis.
Good experience in Java open source frameworks like POI, ITEXT etc
Strong Experience in using Tomcat, Apache, Web sphere, Web logic, able to perform application deployments and configuration changes on these servers.
Good experience on application authentication/ authorization, Static and Dynamic code scans and remediating scan issues.
Good experience in java memory management, analyze logs, heap analysis, performance tuning.
Experience in HTML, CSS, JavaScript, JQuery, AJAX, and MVC frameworks like AngularJS, CanJS, BackBone. js and experience with SPA (Single Page Application )
Experience with Agile Scrum development methodology and related tools usage.
Should be able to document the High level / low level design documents and use related tools like VISIO, Rationalrose.
Experience with Oracle10g Database, SQL, PL/ SQL programming.
Nice to have experience in Search engines like Elastic, Apache SOLR.
Nice to have experience with Linux shell scripts.
Should be comfortable with Onsite/ Offshore development mode.

Friday, 17 July 2015

Maven - Javadoc plugin

<plugin>
         <inherited>true</inherited>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>

          <executions>
             <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
             </execution>
          </executions>
</plugin>

Maven-Source plugin

<plugin>
    <inherited>true</inherited>
       <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-source-plugin</artifactId>
           <executions>
             <execution>
              <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
           </executions>

</plugin>

<plugin>
      <artifactId>maven-source-plugin</artifactId>
      <executions>
        <execution>
          <id>attach-sources</id>
          <phase>deploy</phase>
          <goals><goal>jar-no-fork</goal></goals>
        </execution>
      </executions>
</plugin>
   

Maven - Dependency plugin

<plugin>
    <artifactId>maven-dependency-plugin</artifactId>
        <executions>
            <execution>
                <phase>process-sources</phase>
                   <goals>
                                <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                       <outputDirectory>lib</outputDirectory>
                        </configuration>
                 </execution>
             </executions>
</plugin>


<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-dependency-plugin</artifactId>

<executions>

<execution>

<id>copy-dependencies</id>

<phase>package</phase>

<goals>

<goal>copy-dependencies</goal>

</goals>

<configuration>

<outputDirectory>${project.build.directory}/alternateLocation</outputDirectory>

<overWriteReleases>false</overWriteReleases>

<overWriteSnapshots>false</overWriteSnapshots>

<overWriteIfNewer>true</overWriteIfNewer>

</configuration>

</execution>

</executions>

</plugin>

Maven-execute plugin

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <version>1.1.1</version>
    <executions>
    <execution>
      <phase>test</phase>
      <goals>
      <goal>java</goal>
      </goals>
      <configuration>
      <mainClass>com.bt.noas.sipt.release.ReleaseProfiles</mainClass>
      <arguments>
        <argument></argument>
      </arguments>
      </configuration>
    </execution>
    </executions>
</plugin>

Maven - Dependencies

<dependency>
            <groupId>com.timesten</groupId>
            <artifactId>ttjdbc6</artifactId>
            <version>11.2.x</version>
            <systemPath>${env.TIMESTEN_HOME}/lib/ttjdbc6.jar</systemPath>
            <scope>system</scope>
 </dependency>

Maven-Properties plugin

<plugin>
    <groupId>org.codehaus.mojo</groupId>
      <artifactId>properties-maven-plugin</artifactId>
                <version>1.0-alpha-2</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>write-project-properties</goal>
                        </goals>
                        <configuration>
                            <outputFile>
                                ${project.build.directory}/test-classes/mvn.properties
                            </outputFile>
                        </configuration>
                    </execution>
             </executions>
</plugin>