Posts

Showing posts from April, 2010

Spring

   Today we all know that Spring is being widely used in enterprise applications because of its easy of development and layered architecture.  Which enable us to integrate its various layers with other technologies and API(s), like - JMS, MVC, Junit, EJB, Hibernate and so on.   This framework is very popular because of  its great feature of Dependency Injection (DI). Let us look a simple example to understand DI:- I have a class A (singleton class) that has some parameters that sets at start up time. Also. I have a class B (prototype) that needs the parameters in class A. Now, I am trying to figure out how to get the instance of A which is to be use in B later sometime. class A { //singleton class       String a; } class B {      //prototype class      A a;     String b;     public B createB() {  //for method lookup          return null; ...

XML Bean

XMLBeans is an XML parser developed by BEA for WebLogic 8.1 and recently released as an open source initiative. With XMLBeans, you can access and manipulate the data contained in an XML document using Java classes. XMLBeans is different from the typical XML parser because it is designed to build applications based on known, specific schemas. At its core is a schema compiler that parses an XSD file and creates a JAR. The JAR contains a bunch of Java classes that developers can use to manipulate instance documents as if they were normal Java types. XMLBeans gives you an object-based view of the underlying XML data, without losing access to the original XML structure. In addition, it gives you an XQuery parser and XMLCursor objects that allow you to query your documents with the flexibility of a SQL database. EXAMPLE : CASE Study STEP 1: - -Open a DOS command prompt and run the 'scomp' command. If it runs without error, then congratulations, you have successfully set up XMLBea...