Wednesday, 19 September 2007

Some Iterms often as reading J2EE

1. Java Naming and Directory Interface (JNDI), it is used to build powerful and portable directory-enabled applications.

2. Java Message Service (JMS), it's a reliable Enterprrise Messaging standard. Enterprise messaging is also referred to as Messaging Oriented Middleware (MOM), is universally considered as an essential tool for building enterprise applications when needing the asynchronous exchange of critical business data. The JMS api provide framework to develop portable, message based application in the Java programming language.

Friday, 14 September 2007

Communication between distributed program via internet

IIOP is a critical part of a strategic indusctry standard, the Common Object Request Broker Architecture (CORBA). Using CORBA's IIOP and related protocols, a company can write programs that will be able to communicate with their own or other company's existing or future programs whereever they are located and without having to understand anything about the program other than its service and name.

SOAP was developed by Microsoft, DevelopMentor, and Userland Software, and has been proposed as a standard interface to the Internet Engieering Task Force (IETF). SOAP(Simple Object Access Protocol) is a way for a program running in one kind of operating system to communicate with a program in the same or another kind of an operating system such as Linux by using HTTP and its XML as the mechanisms for information exchange.

Wednesday, 12 September 2007

SOAP

SOAP, Simple Object Access Protocol, and lately also stood for Service Oriented Architecture Protocol, is a XML based protocol that allows a client application exchange information with a application within a remote server over HTTP protocol. SOAP was orignially designed in 1998, with backing from MS, as an object-access protocol. SOAP is currently maintained by the XML Protocol Working Group of the World Wide Web Consortium.

SOAP (Simple Object Access Protocol) is a way for a program running in one kind of operating system (such as Windows 2000) to communicate with a progam in the same or another kind of an operating system (such as Linux) by using the World Wide Web's Hypertext Transfer Protocol (HTTP)and its Extensible Markup Language (XML) as the mechanisms for information exchange. Since Web protocols are installed and available for use by all major operating system platforms, HTTP and XML provide an already at-hand solution to the problem of how programs running under different operating systems in a network can communicate with each other. SOAP specifies exactly how to encode an HTTP header and an XML file so that a program in one computer can call a program in another computer and pass it information. It also specifies how the called program can return a response.
SOAP was developed by Microsoft, DevelopMentor, and Userland Software and has been proposed as a standard interface to the Internet Engineering Task Force (IETF). It is somewhat similar to the Internet Inter-ORB Protocol (IIOP), a protocol that is part of the Common Object Request Broker Architecture (CORBA). Sun Microsystems' Remote Method Invocation (RMI) is a similar client/server interprogram protocol between programs written in Java.
An advantage of SOAP is that program calls are much more likely to get through firewall servers that screen out requests other than those for known applications (through the designated port mechanism). Since HTTP requests are usually allowed through firewalls, programs using SOAP to communicate can be sure that they can communicate with programs anywhere.


SOAP provides a way that allows communications between different programs located remotely running on different operating systems, with different technologies and programming languages.
SOAP makes use of HTTP, allowing more easier commnication behind proxy and firewall than pervious remote execution technology.

WSDL(Web Services Description Language) is an XML-based language for describing web services and how to access them. WSDL is a document written in XML. The document describes a web service. It specifies the location of the service and the operations (or methods) the service exposes.

Wednesday, 5 September 2007

Interface

Interface can also used to model common features like Abstract, but it used for a weak is-a relationship, also known as an is-kind-of relationship, indicates that an object possesses a certain property. Abstract can be used to describe a strong is-a relationship.
Interface has no contructor, variables, and concrete methods. It only contains constants and abstract methods. This is also point that interface differs from the Abstract class.
Interface may empty, referred to as a marker interface. It contains no constants or methods, used to denote that a class posses certain desirable properties. A class may implement several interface to circumvent the single-inheritance restriction in java.

Tuesday, 4 September 2007

Abstract Class, Nested Class

Abstract class 

An abstract class is a partially implemented class, so it can not be instantiated. The purpose of the abstract class is to set a place to put common attributes and method pulled out from a category of classes. 

As a creator, you may require some behaviours that derivatives must carry them out. An abstract method is a method signature without implementation, it enforces all non-abstract sub-classes to implement it in their own unique ways. Abstract methods are must be implemented by the sub-classes. If a subclass doesn't want to implement it, it must re-declare this abstract method again in its class body. Only an abstract class can declare abstract methods. Any class contains an abstract method should be declared as an abstract class. 

An abstract class can also have constructors, although an abstract class cannot be instantiated. The purpose of constructors enforces the non-abstract subclasses to initialize as creator designed. The decorator pattern is a good example to explain this, where an abstract decorator enforces the concreate decorator to initialize the association relationship with a decorated instance.  A non-abstract subclass must invoke at least one of a constructor from the abstract superclass.  Otherwise, it gives a compilation error.

An abstract class can implement interfaces, but it doesn't need to implement them. However, its subclasses have to implement them, if the abstract class doesn't implement them yet. 

An abstract class can be extended from a concrete class, for instance, object class is a concrete class, but any abstract must is an extension from it. 

A concrete method could be overridden to be abstract. 

All abstract methods defined in the Abstract classes are enforced to be carried out in the sub-classes. 

Although abstract class cannot be instantiated, it can be used as a data type. An abstract type reference variable can be assigned by all of its non-abstract subclass instances. 

What difference between an abstract class and a concrete class? 

abstract do almost all concrete class can do, but only two differences
  1. an abstract class cannot be instantiated, but a concrete class can.
  2. an abstract method can be defined in abstract class alone, but not in a concrete class. 

Nested Class

A class that is defined within another class, it is a nested class. 

A nested class defined as static is referred to as a static nested class. Nested classes that are not declared as static are referred to as inner classes. 

A nested class can also be defined within methods.  It is referred to as a method local inner class. 
Anonymous inner class is a local class without a name. 












Can Jackson Deserialize Java Time ZonedDateTime

Yes, but must include JSR310. Thus ZonedDateTime can be deserialized directly from JSON response to POJO field. <dependency> <g...