+ All Categories
Home > Technology > Introduction to spring web framework

Introduction to spring web framework

Date post: 25-Jan-2015
Category:
Upload: raja-kumar
View: 287 times
Download: 3 times
Share this document with a friend
Description:
 

If you can't read please download the document

Transcript
  • 1. ######O@###P##T##%Z@#O@#####`######`U####m#0######EO@### ### #Uq##Uq###`*############x##Introduction to Spring Web Framework.doc#15.36.zip##,Hibernate MySQL Tomcat.mht#e Statement.mht#ht#s.mht# Interview Questions_files#les#SUYGCA5ZR2HF.jpg################@######################### #######K#############################p###3###### ######a##INTROD~1.DOC####################################################### ###################################.text###m######################### ##`.rdata############################@##@.data###l### ######################@##.CRT###############################@##@.rsrc###### ####################@######################################################## ################################################################################ ################################################################################ ################################################################################ ##################################################@s# s##- ###D$#L$##L$

2. u D$###SD$#d$##D$##[##WVS3D$##}#GT$##D$#T$# D$##}#GT$##D$#T$##u#L$#D$#3D$#AL$#T$#D$## ud$#D$##r#;T$#w#r#;D$#v#N3Ou##[^_##WVU33D$##}#GE T$##D$#T$#D$##}#GT$##D$#T$##u(L$#D$#3D$#d$# d$##GL$#T$#D$##ud$#D$##r#;T$#w#r#;D$#v N+D$##T$#3+D$##T$#My##Ou##]^_##QL$#+## %#;r Y##$-#####T$#2:Ru+z#au%z#ru#z#!u#z##u#z##u 8B#u#f####j#f##f##7##VW|$ 3. #?P4t###u#t |,A#f###~#F#########x##W#t### ####v###F#########(##5Iw8###4LwgFw##########P###|# ;v#P###P6#### v####A#P########t$####w######M###M##### rTw##ALw rTwMLw#mFw##M#######M#####pLw####M#t they will facilitate easy Unit Testing in the Application.For example, consider the following Non-POJO class, MyServlet.java class MyServlet extends HttpServlet{ } The problem with the above class definition is that it is not a POJO, because it is extending the HttpServlet class. When this class wants to undergo Unit Testing, someone has to start the Web/Application Server where it is actually deployed to ascertain the functionality of this class, because of the extension of the HttpServlet class which makes sense in the context of a running Server only. Since Spring Framework doesn't provide tight coupling between the Business Objects, it is fast to do Unit Testing so that TDD (Test Driven Development) can be made easily possible.3) Spring ModulesThe Spring Project is not a single project but it comes in flavor of Several Modules. A module can be defined or thought of a functionality that is very specific to an area. Spring Distribution comes in several such modules. The name of the Spring module along with the jar file name (which is available in the SPRING_HOMEdistmodules) is listed below.Spring Web MVC (spring-webmvc.jar) Spring Aop (spring-aop.jar)Spring Beans (spring-beans.jar)Spring Context (spring-context.jar)Spring Core (spring-core.jar)Spring Dao (spring-dao.jar) Spring Hibernate (spring-hibernate3.jar)Spring Ibatis (spring-ibatis.jar)Spring Jca (spring-jca.jar)Spring Jdbc (spring-jdbc.jar)Spring Jdo (spring-jdo.jar) Spring Jms (spring-jms.jar)Spring Jms (spring-jpa.jar)Spring Jmx (spring- jmx.jar)Spring Portlet (spring-portlet.jar)Spring Remoting (spring-remoting.jar) Spring Struts (spring-struts.jar)Spring Support (spring-support.jar)Spring Toplink (spring-toplink.jar)Spring Web (spring-web.jar)Spring Aspects (spring- aspects.jar)Every module in the above list has their own functionality as identified by the name of the Jar File. For example,Spring Jmx (spring- jmx.jar) provides Instrumentation and Management Support to Spring Bean components. Similarly, Spring Web provides developing Web Application Infrastructure for the Server side. Since all the pieces of functionality are made well modular and they come as a separate functionality (via a Jar File), say, if an Application wants to take functionality of Aspect Oriented programming (spring- aspects.jar) and Database Access (spring-jdbc.jar), it can include any two of these jar Files in its classpath. But, what will happen if an Application is in need of the functionality provided by all the various modules. Should it define entries for all the Jar Files in its class-path? Spring provides a smart solution for this need, as it comes with a Jar File called spring.jar which is a combination of all the modules.4) Inversion of ControlIt is very important to understand the underlying principle of the Spring Framework which is nothing but theInversion of Control. Let us detail the section of this principle with the help of some sample code. Consider the following sample code containing Java classes.TaskService.java public class TaskService{public Task createTask(){} public boolean deleteTask(){} public Set listTasks() {} public void update(Task task){}} Task.java class Task{private TaskService taskService; public Task(TaskService taskService){this.taskService = taskService; } public void setTaskService(TaskService taskService){this.taskService = taskService; } public TaskService getTaskService(){return taskService; } public void update(){taskService.update(); }} The above classes represent Task objects in an Application that represent some work to done by various components. The TaskService class is a Service Component, meaning that it is used to some other Components, providing functionality for creating (createTask()), deleting (deleteTask()) and listing all the Task object (listTasks()). The original Task model is represented by the Task class and has some set of methods which are dependent on the TaskService object.If Client Applications want to update a Task object by calling Task.update(), then the following might have been the code written by them,TaskClient.java class TaskClient{ 6. public static void main(String args[]){TaskService service = new TaskService(); Task task = new Task(service); //Or, task.setTaskService(task); task.update(); }} Back to Dependency injection, we have two components here namely Task and TaskService. Task is depending onTaskService Component to get the various functionalities. So there is a dependency association between Task andTaskService Component. In our case, the association or the relation between these Components are set by the Client who is using it. Also note that Task Component is tightly dependent on TaskService component. If sometimes in the near future, if the requirement changes telling that Task objects should now depend on the TimerServiceinstead of TaskService, then will be major change in the Application Code which is generally considered as a poorer Design. So, how to get rid off this?The Inversion of Control provides a solution for this. The first thing to do is that there should be loose coupling between components. That is all the relationships or association between components should have to be made abstract to the extent possible. It means that the class Task should not depend on the class TaskService. Since abstractions in Java are captured in the form of Interfaces or Abstract Classes, one can prefer using any of them. But preferring interfaces for capturing abstractions is highly encouraged. It means that let not the Task class depends directly on the TaskService class. Let it define on a Service class, which could be either TaskService orTimerService. It means that now we have Class/Interface structures similar to the following, public interface Service{ }public interface TaskService extends Service{ }public interface TimerService extends Service{ } And now the code in the Task class that code that previously referred TaskService can now be changed something like the following,Task.java class Task{private Service service; public Task(Service service){this. service = service; } public void setService(Service service){this. service = service; } public Service getService(){return service; }} Now, in the run-time, whether Task should depend on TaskService or TimerService can be easily plugged into with minimal set of changes, Service service = new TaskService();// Or, service = new TimerService();Task task = new Task(service); The second thing in Inversion of Control is that, never the Client Applications should involve in making associations between the Components through code. Instead, someone called Container or Framework should do these kinds ofComponent-wiring Activities. Component Wiring is a fancy term given to make associations between various Components. Let us look back into the Application who does the job of Component wiring. Now, Task is dependent ofService object and it is the Client code which establishes relations between Task and the Service object through the following price of code, Service service = Task task = new Task();task.setService(service); The Framework insists that Associations between Business objects should be externalized and never the Client Applications should be involved in doing these kinds of activities. Ideally it tells the method setService() method should be called by the Framework. Here, we see that the Application Control is reversed. Instead of Clients having the control to establish relationship between Components, now the Framework carries this job, which means that the Control is revered from the Clients to the Framework and that's why this principle is rightly termed as Inversion of Control.5) Spring Core APIThe Core API in Spring is very limited and it generally involves in Configuring, Creating and Making Associationsbetween various Business Components. Spring refers to these Business Components as Beans. The following are the Core Classes or the Interfaces that are available in the Spring for achieving the goal.ResourceBeanFactoryLet us look into the above entities in brief.5.1) ResourceA Resource in Spring represents any kind of Information that comes from a File or from a Stream. For example, resources could represent an Xml File containing the various Configuration Information needed for a Spring Application. Or it could represent a Java Class File representing a Bean object. Whatever be the case, it can be represented as aResource object with the transparent nature of its implementation.Suppose, we wish a load a Resource that represents the Java Class called MyJavaClass, then we can have, Resource classRes = 7. new ClassPathResource("PathToClassFile", MyJavaClass.class); Note that ClassPathResource is the concrete implementation class for loading a Java Class file. The following code loads an Xml File from the local File System. String xmlFile = "./resources/myXml.xml"); Resource xmlResource = new FileSystemResource(xmlFile); Note that FileSystemResource can be used to load any kind of files to make themselves available to the Spring Application, it is not restricted to only Xml Files. Other commonly used Resource in the InputStreamResource that loads content from an Input Stream. Apart from this, there are so many concrete implementations of various Resources are available in the Spring Framework.5.2) BeanFactoryAs mentioned, in Spring terminology a Bean refers to a Business Component in consideration. As such, BeanFactory is the factory class for creating Bean objects. The interesting thing is that how to configure the BeanFactory forcreating Business Components. In other words, where the BeanFactory class should look for the Bean definition forcreating Bean instances? One important thing to note that all Beans that reside in the Context of Spring Containerare highly configurable through external files. It means that your Bean definitions can reside in an Xml File, a Java Property File or even in a database. Although, Bean definitions are not tightly coupled to any format, most developers prefer having their Bean definitions in Xml Format.Following is the code that will load all Bean definition from an Xml File, Resource xmlResource = new FileSystemResource("beans.xml");BeanFactory factory = new XmlBeanFactory(xmlResource); Note the XmlBeanFactory class which is one of the concrete implementations of BeanFactory class.5.3) Sample ApplicationIt is wise to look into a Sample Application before getting into the other details like the various functionalities and features that can be configured through the Xml File. Let us keep the functionality of the Business Object to a minimal extent.5.3.1) Business ObjectFollowing is the code for the sample Business Component Namer which is just used to store the given name. Namer.java package net.javabeat.articles.spring.introduction; public class Namer {private String name; public Namer() {} public String getName() {return name; } public void setName(String name) {this.name = name; }} Note that this class has a single property called 'name' along with its appropriate getter and setter methods.5.3.2) Xml Configuration FileNow, let us look into the Xml Configuration File where we are going to define and configure the Bean class along with its properties. Following is the Xml code,namer.xml Javabeat The very first thing to note that is this Xml follows the standard schema as defined in the url# HYPERLINK "http://www.springframework.org/schema/beans/spring-beans-2.0.xsd" #http://www.springframework.org/schema/beans/spring-beans-2.0.xsd#. The root element of the Xml file is the 'beans'element which represents the collection of Business objects to be defined. Every Business Object is identified by the'bean' element which has two attributes name 'id' and 'class'. The 'id' attributes should be unique in the Xml File and it can be used in code to refer the Bean class whereas the attribute 'class' represents the fully qualified class name of the Bean definition. Also note the property element which represents a singe value 'Javabeat'.5.3.3) Client ApplicationFollowing is the Client code which makes reference to the Xml File using the Resource object and then the contents of the Xml File (which contains the various Bean definitions) are read using the XmlBeanFactory class. An instance of the object of type Namer is then retrieved by calling the BeanFactory.getBean(id) method. Remember that, this id argument value corresponds to the 'id' attribute of the bean element defined in the Xml File.SimpleSpringApp.java package net.javabeat.articles.spring.introduction;import 8. org.springframework.beans.factory.*;import org.springframework.beans.factory.xml.*;import org.springframework.core.io.*; public class SimpleSpringApp {public static void main(String args[]){Resource namerXmlFile = new FileSystemResource("src/resources/namer.xml"); BeanFactory factory = new XmlBeanFactory(namerXmlFile); Namer namer = (Namer)factory.getBean("namerId"); System.out.println(namer.getName()); }}6) Exploring the Bean Definition Configuration FileAll the basic definition of the Bean classes along with the Configuration Information, their relationships with other Beanobjects can be defined in the Xml Configuration File. The Schema Definition of the Bean Xml Configuration file is very vast in terms of Definitions and Functionalities and the subsequent sections aims in covering only the major configuration features.6.1) Making Associations between Bean ObjectsIt is a common thing in an Application where we can see so many components interacting within each other thereby full-filling the Client needs. For that, they should Establish Relation-ship between them which can be done easily in the Configuration file. Assume that we have two Components Player and Team, whose class structures are given below,Player.java public class Player {private String name; private Team team;} Team.java public class Team {private String name;} In the above case we have two Bean Components namely Player and Team. Since a Player is dedicated to oneTeam, we have a reference to the Team object inside the Player class. Now Team becomes a property for the Playerclass. However, it is not a simple property that holds string or integer; instead it is a complex holds whose data-type is of Type Team.Following is the sample xml snippet for making association between Player and Team objects.team-player.xml IndiaSachin Tendulkar Note that the Team (india) is referenced into the Player object using the 'ref' element through the property beanwhose value corresponds to the 'id' attribute of the previously defined Team object.6.2) Mapping Collection PropertiesIn this section, let us strengthen the relation-ship between Team and Player classes to include various Collection Properties. Following is the class structure of the Team Class.Team.java package net.javabeat.articles.spring.complex;import java.util.*;public class Team {private String name; private Set players; public Team() {} public Team(String name){this.name = name; } public String getName() {return name; } public void setName(String name) {this.name = name; } public Set getPlayers() {return players; } public void setPlayers(Set players) {this.players = players; } @Override public String toString(){return "[Name = " + name + ", Players = " + playersAsString(players) + "]"; } private String playersAsString(CollectionIndiaAustraliaSouth AfricaSachin Tendulkar56386383Rahul Dravid36383981Saurov Ganguly46882343 Take a careful look into the Xml File. Since a Team represents a set of players, this information is configured in theXml File thorough the help of 'set' element. And since the elements in the set itself are bean objects, they are mentioned using the 'ref' element. Following is the snippet code for that, 10. And coming to the Player object, since the property 'runsScored' is represented as a Map whose key is the Teamobject valued with the number of runs scored which is an integer, the whole structure is represented using the mapelement with key and value elements. Following is the xml snippet for the same, 56386383 Following is the code snippet of the Client along with the output information, which loads and print values of several of the bean objectsClient Application Resource resource = new FileSystemResource("./src/resources/player-team.xml");BeanFactory factory = new XmlBeanFactory(resource);Team india = (Team)factory.getBean("india");System.out.println(india);Player tendulkar = (Player)factory.getBean("tendulkar");System.out.println(tendulkar);Player dravid = (Player)factory.getBean("dravid");System.out.println(dravid);Player ganguly = (Player)factory.getBean("ganguly");System.out.println(ganguly); Output of the program [Name = India, Players = [{ Sachin Tendulkar}{ Rahul Dravid}{ Saurov Ganguly}]][Name = Sachin Tendulkar , Team Name = India, RunsScored = [{ Australia,5638}{ South Africa,6383}]][Name = Rahul Dravid , Team Name = India, RunsScored = [{ Australia,3638}{ South Africa,3981}]][Name = Saurov Ganguly , Team Name = India, RunsScored = [{ Australia,4688}{ South Africa,2343}]] 6.3) Importing Configuration FilesHaving some much Bean Definition Information in one Configuration File wont look nice especially if the size of the File grows large. Spring provides a modular solution for this problem wherein Bean Definition Objects for one type can be defined in a separate file and the same can be included in the main configuration file. Considering the previous example, we can define all the Player objects in player.xml, Team objects in team.xml and can have a main.xmlfile which includes both player.xml and team.xml files.Following is the xml snippet for the same, main.xml ####6.4) Bean LifecyleThe entire Bean objects defined in the Xml Configuration File undergoes a Standard Lifecycle Mechanism. Lifecycleinterfaces like InitializingBean and DisposableBean are available. Care should be taken while using these Interfaces. Since these are Spring specific Interfaces, your application code will tightly be Coupled with the Spring Implementation. So define and use these interfaces when there is really a need.The InitializingBean interface has a single method called afterPropertiesSet() which will called immediately after all the property values that have been defined in the Xml Configuration file is set. Any customized initiation logic or mandatory checking can be done here. Similarly, the DisposableBean has a single method called destroy() which will be called during the shut down of the Bean Container.Following is the code snippet illustrating the usage of these interfaces,Employee.java package net.javabeat.articles.spring.complex;import org.springframework.beans.factory.*;public class Employee implements InitializingBean, DisposableBean{private String name; private String id; public void afterPropertiesSet() throws Exception {System.out.println("Employee->afterPropertiesSet() method called"); } public void destroy() throws Exception {System.out.println("Employee- >destroy() method called"); } } 6.5) Controlling the Order of Creation of BeansSometimes we may end up in a situation that Component A must be created before Component B. In such a case we can use the depends- on attribute which takes a list of previously defined Bean Definition identifiers. For example, consider that we have three Bean Classes namely Employee, Department and Organization. And the situation is that we want the Creation of Bean objects to be followed in this order, Organization followed by Department and then Employee.Following is the Xml snippet code that achieves the same, 6.6) Creating Bean Instances through Factory classesSuppose say that we already have a Factory class for creating a Bean object and we want to make use of this factory class. Then the usage of 'factory-method' and 'factory-bean' attributes will come into picture. Let us have the following sample code to make things clearer.Team.java public class Team{private String name;} TeamFactory.java public class TeamFactory {public static Team getTeamUsingStaticMethod(){System.out.println("Static Method Called"); return new Team(); } public Team getTeamNormalMethod(){System.out.println("Instance Method Called"); return new Team(); }} The above Factory class has two methods that will return Team objects. One is the static factory method and the other one is the regular instance method. If we want make use of the static methodTeamFactory.getTeamUsingStaticMethod(), then we should change the bean definition in the Configuration Fileto something like the following, India In the above case, the class attribute must point to the name of the Factory class and the factory-method attribute must be the name of the static method which will return the instance. And as usual, the property element is used to pass values to the Team object while creating the instance.If instead, we want to make use of the normal instance method, i.e. TeamFactory.getTeamNormalMethod(), then we should define the factory class itself as a bean and then have to make references to the instance method in the Beandefinition. Consider the following changes in the Xml File, Australia The first thing to note is a Bean definition is made for the Factory class TeamFactory and then in the definition of the bean itself, the 'factory-bean' attribute points to the identifier that was previously defined with the factory-method attribute pointing to the name of the instance method that will create Team objects.6.7) Bean InheritanceMinimal support of Inheritance is given between the Bean Components in the form of the attribute 'parent' within the 'bean' tag. For example, consider the following classes Planet and Earth. The Class Planet has two properties namely 'name' and 'shape'. The values for these properties might be 'Planet' and 'Elliptical'. The other class Earth(which is a Planet too) extends the Planet class, but we wish that for the Class Earth the property values should be 'Earth' and 'Elliptical'.So, we are doing two things here. One is, the class Earth is extending from the class Planet. And the other thing is the values for the Planet object ('Planet, 'Elliptical') is overridden for the Earth object with values ('Earth' and 'Elliptical'). Following is the code snippet for the classes Planet and Earth.Planet.java public class Planet {private String name; private String shape;} Earth.java public class Earth extends Planet {} And the changes in the Xml Configuration File are the inclusion of the attribute 'parent' in the bean definition for the Earth object. Also note that since we want the value 'Earth' for the name property we have overridden the value just by redefining it.planet-earth.xml PlanetellipticalEarth Here is the code snippet of the Client Application,Client Application Resource resource = new FileSystemResource("./src/resources/planet-earth.xml");BeanFactory factory = new XmlBeanFactory(resource);Planet planet = (Planet)factory.getBean("planet"); 12. System.out.println(planet);Planet earth = (Planet)factory.getBean("earth"); System.out.println(earth); 7) ConclusionEven though there are lots and lots of functionality in the Spring Core, this article attempted to cover only the basic things. More specifically it concentrated on the various Spring Modules that are resting on top of the Spring Core Framework. Then a good treatment along with some samples is given in the topic Inversion of Control and how well this principle fits into the Spring Architecture is discussed. Then the remaining part of the article explored much about the usage of the various Configuration Stuffs available in the Xml Configuration File. More specifically, Creation of Bean Objects, Mapping between Bean Objects, Collection Mapping, Instantiation through Factory Class,Bean Inheritance, Bean Lifecycle, Configuration Files Import, Controlling the Bean Creation Order is given good coverage.#Spring Framework Interview Questions 1) What is Spring?Spring is a lightweight inversion of control and aspect- oriented container framework.2) Explain Spring? Lightweight : Spring is lightweight when it comes to size and transparency. The basic version of springframework is around 1MB. And the processing overhead is also very negligible.Inversion of control (IoC) : Loose coupling is achieved in spring using the technique Inversion of Control. The objects give their dependencies instead of creating or looking for dependent objects.Aspect oriented (AOP) : Spring supports Aspect oriented programming and enables cohesive development by separating application business logic from system services.Container : Spring contains and manages the life cycle and configuration of application objects.Framework : Spring provides most of the intra functionality leaving rest of the coding to the developer.3) What are the different modules in Spring framework?The Core container moduleApplication context moduleAOP module (Aspect Oriented Programming)JDBC abstraction and DAO moduleO/R mapping integration module (Object/Relational)Web module MVC framework module4) What is the structure of Spring framework?# INCLUDEPICTURE "http://www.javabeat.net/articles/img1.gif" * MERGEFORMATINET ###5) What is the Core container module?This module is provides the fundamental functionality of the spring framework. In this module BeanFactory is the heart of any spring-based application. The entire framework was built on the top of this module. This module makes the Spring container.6) What is Application context module?The Application context module makes spring a framework. This module extends the concept of BeanFactory, providing support for internationalization (I18N) messages, application lifecycle events, and validation. This module also supplies many enterprise services such JNDI access, EJB integration, remoting, and scheduling. It also provides support to other framework.7) What is AOP module?The AOP module is used for developing aspects for our Spring-enabled application. Much of the support has been provided by the AOP Alliance in order to ensure the interoperability between Spring and other AOP frameworks. This module also introduces metadata programming to Spring. Using Springs metadata support, we will be able to addannotations to our source code that instruct Spring on where and how to apply aspects.8) What is JDBC abstraction and DAO module?Using this module we can keep up the database code clean and simple, and prevent problems that result from a failure to close database resources. A new layer of meaningful exceptions on top of the error messages given by several database servers is bought in this module. In addition, this module uses Springs AOP module to provide transaction management services for objects in a Spring application.9) What are object/relational mapping integration module?Spring also supports for using of an object/relational mapping (ORM) tool over straight JDBC by providing the ORM module. Spring provide support to tie into several popular ORM frameworks, including Hibernate, JDO, and iBATIS SQL Maps. Springs transaction management supports each of these ORM frameworks as well as JDBC.10) What is web module? This module is built on the application context module, providing a context that is appropriate for web-based applications. This module also contains support for several web-oriented tasks such as transparently handling multipart requests for file uploads and programmatic binding of request parameters to your business objects. It also contains integration support with Jakarta Struts.11) What is web module?Spring comes with a full-featured MVC framework for building web applications. Although Spring can easily be integrated with other MVC frameworks, such as Struts, Springs MVC framework uses IoC to provide for a 13. clean separation of controller logic from business objects. It also allows you to declaratively bind request parameters to your business objects. It also can take advantage of any of Springs other services, such as I18N messaging and validation.12) What is a BeanFactory?A BeanFactory is an implementation of the factory pattern that applies Inversion of Control to separate the applications configuration and dependencies from the actual application code.13) What is AOP Alliance?AOP Alliance is an open-source project whose goal is to promote adoption of AOP and interoperability among different AOP implementations by defining a common set of interfaces and components.14) What is Spring configuration file?Spring configuration file is an XML file. This file contains the classes information and describes how these classes are configured and introduced to each other.15) What does a simple spring application contain?These applications are like any Java application. They are made up of several classes, each performing a specific purpose within the application. But these classes are configured and introduced to each other through an XML file. This XML file describes how to configure the classes, known as the Spring configuration file.16) What is XMLBeanFactory?BeanFactory has many implementations in Spring. But one of the most useful one isorg.springframework.beans.factory.xml.XmlBeanFactory, which loads its beans based on the definitions contained in an XML file. To create an XmlBeanFactory, pass a java.io.InputStream to the constructor. TheInputStream will provide the XML to the factory. For example, the following code snippet uses a java.io.FileInputStream to provide a bean definition XML file to XmlBeanFactory. BeanFactory factory = new XmlBeanFactory(new FileInputStream("beans.xml"));To retrieve the bean from a BeanFactory, call the getBean() method by passing the name of the bean you want to retrieve. MyBean myBean = (MyBean) factory.getBean("myBean");17) What are important ApplicationContext implementations in spring framework? ClassPathXmlApplicationContext This context loads a context definition from an XML file located in the class path, treating context definition files as class path resources.FileSystemXmlApplicationContext This context loads a context definition from an XML file in the filesystem.XmlWebApplicationContext This context loads the context definitions from an XML file contained within a web application.18) Explain Bean lifecycle in Spring framework?The spring container finds the beans definition from the XML file and instantiates the bean.Using the dependency injection, spring populates all of the properties as specified in the bean definition.If the bean implements the BeanNameAware interface, the factory calls setBeanName() passing the beans ID.If the bean implements the BeanFactoryAware interface, the factory calls setBeanFactory(), passing an instance of itself.If there are any BeanPostProcessors associated with the bean, their post- ProcessBeforeInitialization()methods will be called.If an init-method is specified for the bean, it will be called.Finally, if there are any BeanPostProcessors associated with the bean, theirpostProcessAfterInitialization() methods will be called.19) What is bean wiring?Combining together beans within the Spring container is known as bean wiring or wiring. When wiring beans, you should tell the container what beans are needed and how the container should use dependency injection to tie them together.20) How do add a bean in spring application? In the bean tag the id attribute specifies the bean name and the class attribute specifies the fully qualified class name.21) What are singleton beans and how can you create prototype beans?Beans defined in spring framework are singleton beans. There is an attribute in bean tag named singleton if specified true then bean becomes singleton and if set to false then the bean becomes a prototype bean. By default it is set to true. So, all the beans in spring framework are by default singleton beans. 22) What are the important beans lifecycle methods?There are two important bean lifecycle methods. The first one is setup which is called when the bean is loaded in tothe container. The second method is the teardown method which is called when 14. the bean is unloaded from the container.23) How can you override beans default lifecycle methods?The bean tag has two more important attributes with which you can define your own custom initialization and destroy methods. Here I have shown a small demonstration. Two new methods fooSetup and fooTeardown are to be added to your Foo class. 24) What are Inner Beans? When wiring beans, if a bean element is embedded to a property tag directly, then that bean is said to the InnerBean. The drawback of this bean is that it cannot be reused anywhere else.25) What are the different types of bean injections?There are two types of bean injections.By setterBy constructor26) What is Auto wiring?You can wire the beans as you wish. But spring framework also does this work for you. It can auto wire the related beans together. All you have to do is just set the autowire attribute of bean tag to an autowire type. 27) What are different types of Autowire types?There are four different types by which autowiring can be done.byName byTypeconstructorautodetect28) What are the different types of events related to Listeners?There are a lot of events related to ApplicationContext of spring framework. All the events are subclasses oforg.springframework.context.Application-Event. They areContextClosedEvent This is fired when the context is closed.ContextRefreshedEvent This is fired when the context is initialized or refreshed.RequestHandledEvent This is fired when the web context handles any request.29) What is an Aspect?An aspect is the cross-cutting functionality that you are implementing. It is the aspect of your application you are modularizing. An example of an aspect is logging. Logging is something that is required throughout an application. However, because applications tend to be broken down into layers based on functionality, reusing a logging module through inheritance does not make sense. However, you can create a logging aspect and apply it throughout your application using AOP.30) What is a Jointpoint?A joinpoint is a point in the execution of the application where an aspect can be plugged in. This point could be a method being called, an exception being thrown, or even a field being modified. These are the points where your aspects code can be inserted into the normal flow of your application to add new behavior.31) What is an Advice?Advice is the implementation of an aspect. It is something like telling your application of a new behavior. Generally, and advice is inserted into an application at joinpoints.32) What is a Pointcut?A pointcut is something that defines at what joinpoints an advice should be applied. Advices can be applied at any joinpoint that is supported by the AOP framework. These Pointcuts allow you to specify where the advice can be applied.33) What is an Introduction in AOP?An introduction allows the user to add new methods or attributes to an existing class. This can then be introduced to an existing class without having to change the structure of the class, but give them the new behavior and state.34) What is a Target?A target is the class that is being advised. The class can be a third party class or your own class to which you want to add your own custom behavior. By using the concepts of AOP, the target class is free to center on its major concern, unaware to any advice that is being applied.35) What is a Proxy?A proxy is an object that is created after applying advice to a target object. When you think of client objects the target object and the proxy object are the same.36) What is meant by Weaving?The process of applying aspects to a target object to create a new proxy object is called as Weaving. The aspects are woven into the target object at the specified joinpoints.37) What are the different points where weaving can be applied?Compile TimeClassload TimeRuntime38) What are the different advice types in spring?Around : Intercepts the calls to the target methodBefore : This is called before the target method is invoked After : This is called after the target method is returnedThrows : This is called when the target method throws and exceptionAround : org.aopalliance.intercept.MethodInterceptorBefore : org.springframework.aop.BeforeAdviceAfter : org.springframework.aop.AfterReturningAdviceThrows : org.springframework.aop.ThrowsAdvice39) What are the different types of AutoProxying?BeanNameAutoProxyCreatorDefaultAdvisorAutoProxyCreatorMetadata autoproxying40) What is the Exception class related to all the exceptions that are thrown in spring applications? DataAccessException - 15. org.sprin#g#f#r#a#m#e#w#o#r#k#.#d#a#o#.#D#a#t#a#A#c#c#e#s#s#E#x#c#e#p#t#i#o#n# #4#1#)# #W#h#a#t# #k#i#n#d# #o#f# #e#x#c#e#p#t#i#o#n#s# #t#h#o#s#e# #s#p#r#i#n#g# #D#A#O# #c#l#a#s#s#e#s# #t#h#r#o#w#?##T#h#e# #s#p#r#i#n#g## "!s# #D#A#O# #c#l#a#s#s# #d#o#e#s# #n#o#t# #t#h#r#o#w# #a#n#y# #t#e#c#h#n#o#l#o#g#y# #r#e#l#a#t#e#d# #e#x#c#e#p#t#i#o#n#s# #s#u#c#h# #a#s# #S#Q#L#E#x#c#e#p#t#i#o#n#.# #T#h#e#y# #t#h#r#o#w#e#x#c#e#p#t#i#o#n#s# #w#h#i#c#h# #a#r#e# #s#u#b#c#l#a#s#s#e#s# #o#f# #D#a#t#a#A#c#c#e#s#s#E#x#c#e#p#t#i#o#n#.42) What is DataAccessException? DataAccessException is a RuntimeException. This is an Unchecked Exception. The user is not forced to handle these kinds of exceptions.43) How can you configure a bean to get DataSource from JNDI? java:comp/env/jdbc/myDatasource44) How can you create a DataSource connection pool?${ db.driver}${ db.url}$ { db.username}${ db.password}45) How JDBC can be used more efficiently in spring framework?JDBC can be used more efficiently with the help of a template class provided by spring framework called asJdbcTemplate.46) How JdbcTemplate can be used?With use of Spring JDBC framework the burden of resource management and error handling is reduced a lot. So it leaves developers to write the statements and queries to get the data to and from the database. JdbcTemplate template = new JdbcTemplate(myDataSource);A simple DAO class looks like this. public class StudentDaoJdbc implements StudentDao {private JdbcTemplate jdbcTemplate; public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {this.jdbcTemplate = jdbcTemplate; } more.. }The configuration is shown below. 47) How do you write data to backend in spring using JdbcTemplate?The JdbcTemplate uses several of these callbacks when writing data to the database. The usefulness you will find in each of these interfaces will vary. There are two simple interfaces. One is PreparedStatementCreator and the other interface is BatchPreparedStatementSetter.48) Explain about PreparedStatementCreator?PreparedStatementCreator is one of the most common used interfaces for writing data to database. The interface has one method createPreparedStatement(). PreparedStatement createPreparedStatement(Connection conn) throws SQLException;When this interface is implemented, we should create and return a PreparedStatement from the Connection argument, and the exception handling is automatically taken care off. When this interface is implemented, another interfaceSqlProvider is also implemented which has a method called getSql() which is used to provide sql strings to JdbcTemplate.49) Explain about BatchPreparedStatementSetter?If the user what to update more than one row at a shot then he can go for BatchPreparedStatementSetter. This interface provides two methods setValues(PreparedStatement ps, int i) throws SQLException; int getBatchSize();The getBatchSize() tells the JdbcTemplate class how many statements to create. And this also determines how many times setValues() will be called.50) Explain about RowCallbackHandler and why it is used?In order to navigate through the records we generally go for ResultSet. But spring provides an interface that handles this entire burden and leaves the user to decide what to do with each row. The interface provided by spring isRowCallbackHandler. There is a method processRow() which needs to be implemented so that it is applicable for each and everyrow. void processRow(java.sql.ResultSet rs);#### Hibernate Interview Questions1) What is Hibernate?Hibernate is a powerful, high performance object/relational persistence and query service. This lets the 16. users to develop persistent classes following object-oriented principles such as association, inheritance, polymorphism, composition, and collections.2) What is ORM?ORM stands for Object/Relational mapping. It is the programmed and translucent perseverance of objects in a Java application in to the tables of a relational database using the metadata that describes the mapping between the objects and the database. It works by transforming the data from one representation to another.3) What does an ORM solution comprises of?It should have an API for performing basic CRUD (Create, Read, Update, Delete) operations on objects of persistent classesShould have a language or an API for specifying queries that refer to the classes and the properties of classesAn ability for specifying mapping metadataIt should have a technique for ORM implementation to interact with transactional objects to perform dirty checking, lazy association fetching, and other optimization functions4) What are the different levels of ORM quality?There are four levels defined for ORM quality.Pure relationalLight object mappingMedium object mappingFull object mapping5) What is a pure relational ORM?The entire application, including the user interface, is designed around the relational model and SQL-based relational operations.6) What is a meant by light object mapping?The entities are represented as classes that are mapped manually to the relational tables. The code is hidden from the business logic using specific design patterns. This approach is successful for applications with a less number of entities, or applications with common, metadata-driven data models. This approach is most known to all.7) What is a meant by medium object mapping?The application is designed around an object model. The SQL code is generated at build time. And the associations between objects are supported by the persistence mechanism, and queries are specified using an object-oriented expression language. This is best suited for medium- sized applications with some complex transactions. Used when the mapping exceeds 25 different database products at a time.8) What is meant by full object mapping?Full object mapping supports sophisticated object modeling: composition, inheritance, polymorphism and persistence. The persistence layer implements transparent persistence; persistent classes do not inherit any special base class or have to implement a special interface. Efficient fetching strategies and caching strategies are implemented transparently to the application.9) What are the benefits of ORM and Hibernate?There are many benefits from these. Out of which the following are the most important one.Productivity Hibernate reduces the burden of developer by providing much of the functionality and let the developer to concentrate on business logic.Maintainability As hibernate provides most of the functionality, the LOC for the application will be reduced and it is easy to maintain. By automated object/relational persistence it even reduces the LOC.Performance Hand-coded persistence provided greater performance than automated one. But this is not true all the times. But in hibernate, it provides more optimization that works all the time there by increasing the performance. If it is automated persistence then it still increases the performance.Vendor independence Irrespective of the different types of databases that are there, hibernate provides a much easier way to develop a cross platform application.10) How does hibernate code looks like? Session session = getSessionFactory().openSession(); Transaction tx = session.beginTransaction(); MyPersistanceClass mpc = new MyPersistanceClass ("Sample App"); session.save(mpc); tx.commit(); session.close();The Session and Transaction are the interfaces provided by hibernate. There are many other interfaces besides this.11) What is a hibernate xml mapping document and how does it look like?In order to make most of the things work in hibernate, usually the information is provided in an xml document. Thisdocument is called as xml mapping document. The document defines, among other things, how properties of the user defined persistence classes map to the columns of the relative tables in database. Everything should be included under tag. This is the main tag for an xml mapping document. 12) Show Hibernate overview?# INCLUDEPICTURE 17. "http://www.javabeat.net/articles/img1.gif" * MERGEFORMATINET ###13) What the Core interfaces are of hibernate framework?There are many benefits from these. Out of which the following are the most important one.Session Interface This is the primary interface used by hibernate applications. The instances of thisinterface are lightweight and are inexpensive to create and destroy. Hibernate sessions are not thread safe.SessionFactory Interface This is a factory that delivers the session objects to hibernate application. Generally there will be a single SessionFactory for the whole application and it will be shared among all the application threads. Configuration Interface This interface is used to configure and bootstrap hibernate. The instance of thisinterface is used by the application in order to specify the location of hibernate specific mapping documents. Transaction Interface This is an optional interface but the above three interfaces are mandatory in each and every application. This interface abstracts the code from any kind of transaction implementations such as JDBC transaction, JTA transaction.Query and Criteria Interface This interface allows the user to perform queries and also control the flow of the query execution.14) What are Callback interfaces?These interfaces are used in the application to receive a notification when some object events occur. Like when an object is loaded, saved or deleted. There is no need to implement callbacks in hibernate applications, but theyre useful for implementing certain kinds of generic functionality.15) What are Extension interfaces?When the built-in functionalities provided by hibernate is not sufficient enough, it provides a way so that user can include other interfaces and implement those interfaces for user desire functionality. These interfaces are called as Extension interfaces.16) What are the Extension interfaces that are there in hibernate?There are many extension interfaces provided by hibernate.ProxyFactory interface - used to create proxies ConnectionProvider interface used for JDBC connection management TransactionFactory interface Used for transaction management Transaction interface Used for transaction management TransactionManagementLookup interface Used in transaction management. Cahce interface provides caching techniques and strategiesCacheProvider interface same as Cache interfaceClassPersister interface provides ORM strategies IdentifierGenerator interface used for primary key generationDialect abstract class provides SQL support17) What are different environments to configure hibernate?There are mainly two types of environments in which the configuration of hibernate application differs.Managed environment In this kind of environment everything from database connections, transaction boundaries, security levels and all are defined. An example of this kind of environment is environment provided by application servers such as JBoss, Weblogic and WebSphere.Non-managed environment This kind of environment provides a basic configuration template. Tomcat is one of the best examples that provide this kind of environment.18) What is the file extension you use for hibernate mapping file?The name of the file should be like this : filenam.hbm.xmlThe filename varies here. The extension of these files should be .hbm.xml.This is just a convention and its not mandatory. But this is the best practice to follow this extension.19) What do you create a SessionFactory? Configuration cfg = new Configuration(); cfg.addResource("myinstance/MyConfig.hbm.xml"); cfg.setProperties( System.getProperties() ); SessionFactory sessions = cfg.buildSessionFactory();First, we need to create an instance of Configuration and use that instance to refer to the location of theconfiguration file. After configuring this instance is used to create the SessionFactory by calling the methodbuildSessionFactory().20) What is meant by Method chaining?Method chaining is a programming technique that is supported by many hibernate interfaces. This is less readable when compared to actual java code. And it is not mandatory to use this format. Look how a SessionFactory is created when we use method chaining. SessionFactory sessions = new Configuration() .addResource("myinstance/MyConfig.hbm.xml") .setProperties( System.getProperties() ) .buildSessionFactory();21) What does hibernate.properties file consist of?This is a property file that should be placed in application class path. So when the Configuration object is created, hibernate is first initialized. At this moment the application will automatically detect and read this hibernate.propertiesfile. 18. hibernate.connection.datasource = java:/comp/env/jdbc/AuctionDB hibernate.transaction.factory_class = net.sf.hibernate.transaction.JTATransactionFactory hibernate.transaction.manager_lookup_class = net.sf.hibernate.transaction.JBossTransactionManagerLookup hibernate.dialect = net.sf.hibernate.dialect.PostgreSQLDialect22) What should SessionFactory be placed so that it can be easily accessed?As far as it is compared to J2EE environment, if the SessionFactory is placed in JNDI then it can be easily accessed and shared between different threads and various components that are hibernate aware. You can set the SessionFactory to a JNDI by configuring a property hibernate.session_factory_name in the hibernate.propertiesfile.23) What are POJOs?POJO stands for plain old java objects. These are just basic JavaBeans that have defined setter and getter methods for all the properties that are there in that bean. Besides they can also have some business logic related to thatproperty. Hibernate applications works efficiently with POJOs rather then simple java classes.24) What is object/relational mapping metadata?ORM tools require a metadata format for the application to specify the mapping between classes and tables,properties and columns, associations and foreign keys, Java types and SQL types. This information is called the object/relational mapping metadata. It defines the transformation between the different data type systems and relationship representations.25) What is HQL?HQL stands for Hibernate Query Language. Hibernate allows the user to express queries in its own portable SQL extension and this is called as HQL. It also allows the user to express in native SQL.26) What are the different types of property and class mappings?Typical and most common property mapping Or Derived properties Typical and most common property mapping Controlling inserts and updates 27) What is Attribute Oriented Programming?XDoclet has brought the concept of attribute- oriented programming to Java. Until JDK 1.5, the Java language had no support for annotations; now XDoclet uses the Javadoc tag format (@attribute) to specify class-, field-, or method-level metadata attributes. These attributes are used to generate hibernate mapping file automatically when the application is built. This kind of programming that works on attributes is called as Attribute Oriented Programming.28) What are the different methods of identifying an object?There are three methods by which an object can be identified. Object identity Objects are identical if they reside in the same memory location in the JVM. This can be checked by using the = = operator. Object equality Objects are equal if they have the same value, as defined by the equals( ) method. Classes that dont explicitly override this method inherit the implementation defined by java.lang.Object, which comparesobject identity. Database identity Objects stored in a relational database are identical if they represent the same row or, equivalently, share the same table and primary key value.29) What are the different approaches to represent an inheritance hierarchy?Table per concrete class.Table per class hierarchy.Table per subclass. 30) What are managed associations and hibernate associations?Associations that are related to container management persistence are called managed associations. These are bi-directional associations. Coming to hibernate associations, these are unidirectional.#### ################################################################################ ################################################################################ ###################$###%###5###? ###J###L###M###V###W###a###b############################## ###zaFFFa###############################5#h###h##5#6#B*#CJ ##OJ##PJ##QJ###]#aJ##ph####1#h###h##5#6#B*#CJ##OJ##PJ##QJ### ]#ph####5#h###h##5#6#B*#CJ##OJ##PJ##QJ###]#aJ##ph#### %#h###h##B*#CJ##OJ##PJ##QJ##ph####)#h###h##B*#CJ##OJ##PJ##QJ##aJ##ph#### /#h###h##5#B*#CJ##OJ##PJ##QJ###aJ##ph####)#h##5#B*#CJ##OJ##PJ##QJ### aJ##ph####)#h##0J##5#B*#CJ##OJ##QJ###aJ##ph##########%###5######### ###q###### 19. ###############'###9################################################ ########################################################################## ######################################################################### ################################################### #F###d####d##d#[$#$#gd###,##2###(# P##x# 20. # #4 #'*.#25@9#################d######-D##M ######gd#######d####d##d#[$#$#gd######d####d##d#@[$#$#gd#### #########a ##b ##p ## ## ## ## ## ## ## ##############,###-################################## 21. ### 22. ### 23. ### 24. ### 25. ### 26. ### 27. ### 28. ##s[###/#h###h##5#B*#CJ##OJ##PJ##QJ###aJ ##ph####5#h###h##5#6#B*#CJ##OJ##PJ##QJ### ]#aJ##ph####1#h###h##5#6#B*#CJ##OJ##PJ##QJ### ]#ph####5#h###h##5#6#B*#CJ##OJ##PJ##QJ### ]#aJ##ph####)#h###h##B*#CJ##OJ##PJ##QJ##aJ##ph#### %#h###h##B*#CJ##OJ##PJ##QJ##ph####)#h###h##B*#CJ##OJ##PJ##QJ##aJ##ph#### ### 29. ##/ 30. ##0 31. ##Y 32. ##Z 33. ##c 34. ##d 35. ## 36. ## 37. ## 38. ## 39. ###########x##y############ ##############J###U### #######################w^####1#h###h## 5#6#B*#CJ##OJ##PJ##QJ### ]#ph####)#h###h##B*#CJ##OJ##PJ##QJ##^J##ph####5#h###h##5#6#B*#CJ##OJ ##PJ##QJ### ]#aJ##ph####)#h###h##B*#CJ##OJ##PJ##QJ##aJ##ph####)#h###h##B*#CJ##OJ## PJ##QJ##aJ##ph#### %#h###h##B*#CJ##OJ##PJ##QJ##ph####5#h###h##5#6#B*#CJ##OJ##PJ##QJ### ]#aJ##ph#####$############7###8###:##I:##J:##Q:##i:## 48. ;##;###;##;;####E##N##P##m##n###### {{aa##########2#j#####hdP^##hdP^#B*#CJ##OJ##PJ##QJ##U##aJ##ph #####/#hdP^##hdP^#5#B*#CJ##OJ##PJ##QJ###^J##ph####- #hdP^##hdP^#B*#CJ##OJ##PJ##QJ##^J##aJ##ph####)#hdP^##hdP^#B*#CJ##OJ##PJ##QJ##^J# #ph#### %#hdP^##hdP^#B*#CJ##OJ##PJ##QJ##ph####)#hdP^##hdP^#B*#CJ##OJ##PJ##QJ##aJ##ph#### /#hdP^##hdP^#5#B*#CJ##OJ##PJ##QJ###aJ##ph#####$####$##E##R###### ####P##m######U##)############################################ ######################################################################### ########################################################################## ################################## #F###d####d##d#[$#$#gddP^## ###d######gddP^#####d####d##d#@[$# $#gddP^######d####d##d#[$#$#gddP^##,##2###(# P##x# 80. # #4 #'*.#25@9#################d######-D##M ######gddP^###############U####g##h##i##| ########)##7##B##C##D#####"##-##zbLbLz9z9zbLbLzbL %#hdP^##hdP^#B*#CJ##OJ##PJ##QJ##ph####+#hdP^##hdP^#5#B*#CJ##OJ##PJ##QJ###ph## ##/#hdP^##hdP^#5#B*#CJ##OJ##PJ##QJ###aJ##ph####)#hdP^##hdP^#B*#CJ##OJ##PJ##QJ ##aJ##ph####hdP^##hdP^#5#CJ##OJ##PJ##QJ###aJ###/#hdP^##hdP^#5#B*#CJ##OJ##P J##QJ###aJ##ph#### #hdP^##hdP^#CJ##OJ##PJ##QJ##aJ###2#j#####hdP^##hdP^#B*#CJ##OJ##PJ##QJ##U##aJ##ph #####2#j####hdP^##hdP^#B*#CJ##OJ##PJ##QJ##U##aJ##ph#####- ##.##/##3##>###################### %##u##v################# ## ########n#############X##d##o################ ## ##### ##*##+##B##]##h##q############ #/#hdP^##hdP^#5#B*#CJ##OJ##PJ##QJ###aJ##ph#### %#hdP^##hdP^#B*#CJ##OJ##PJ##QJ##ph####)#hdP^##hdP^#B*#CJ##OJ##PJ##QJ##aJ##ph#### +#hdP^##hdP^#5#B*#CJ##OJ##PJ##QJ###ph####/#hdP^##hdP^#5#B*#CJ##OJ##PJ##QJ## #aJ##ph#####9##n#############X###### ##B########,##l######>####################################### ########################################################################## ########################################################################## ############################################################################# ################## #F###d####d##d#[$#$#gddP^######d####d##d#[$# $#gddP^#####d####d##d#@[$#$#gddP^#### #F###d####d##d#[$#$#gddP^#####################,##? ##J##l##s##t######>##S##T##(##)##0##1##P##i##j####9##k##p ##s##+##T##U##b####|d| #####################/#hdP^##hdP^#5#B*#CJ##OJ##PJ##QJ###^J##ph####)#hdP^##hdP ^#B*#CJ##OJ##PJ##QJ##^J##ph####+#hdP^##hdP^#5#B*#CJ##OJ##PJ##QJ###ph####/#hdP ^##hdP^#5#B*#CJ##OJ##PJ##QJ###aJ##ph####)#hdP^##hdP^#B*#CJ##OJ##PJ##QJ##aJ##p h#### %#hdP^##hdP^#B*#CJ##OJ##PJ##QJ##ph####/#hdP^##hdP^#5#B*#CJ##OJ##PJ##QJ###aJ## ph######>##P####9##t####+##T##~############)##+##Z###### ######################################################################## ########################################################################## ########################################################################## ###########,##2###(# P##x# 81. # #4 #'*.#25@9#################d######-D##M ######gddP^######d####d##d#[$#$#gddP^#####d####d##d#@[$# $#gddP^#### #F###d####d##d#[$# $#gddP^##########################)##+########## ########:##;##L##M##l##m##s##t####{gVGVGVGVGVGV#####h Hfh##hHfh#CJ##OJ##PJ##QJ### #hHfh##hHfh#CJ##OJ##PJ##QJ##aJ###hHfh##hHfh#5#CJ##OJ##PJ##QJ###aJ###/#hdP^# #hdP^#5#B*#CJ##OJ##PJ##QJ###aJ##ph#### %#hdP^##hdP^#B*#CJ##OJ##PJ##QJ##ph####)#hdP^##hdP^#B*#CJ##OJ##PJ##QJ##aJ##ph#### /#hdP^##hdP^#5#B*#CJ##OJ##PJ##QJ###^J##ph####)#hdP^##hdP^#B*#CJ##OJ##PJ##QJ## ^J##ph####-#hdP^##hdP^#B*#CJ##OJ##PJ##QJ##^J##aJ##ph######## ######B##########E############7###g############### ########################################################################## ######################################################################### ############################################################## #F###d####d##d##$#If####[$#$#gdHfh#1##2###(# P##x# 82. # #4 #'*.#25@9#################d#######$#-D##If####M ######gdHfh#####d####d##d##$#If####[$# $#gdHfh######d####d##d##$#@If####[$#$#gdHfh###############! ###C###M###X###f###z### #############################E################################# ###q###}#########kWkhHfh##hHfh#5#CJ##OJ##PJ# #QJ###aJ###hHfh##hHfh#5#CJ##OJ##PJ##QJ###aJ###$#hHfh##hHfh#CJ##OJ##PJ##QJ ##^J##aJ###$#hHfh##hHfh#CJ##OJ##PJ##QJ##^J##aJ###*#hHfh##hHfh#5#CJ##OJ##PJ##QJ# ##^J##aJ###hHfh##hHfh#5#CJ##OJ##PJ##QJ###^J### #hHfh##hHfh#CJ##OJ##PJ##QJ##^J### #hHfh##hHfh#CJ##OJ##PJ##QJ##aJ#####hHfh##hHfh#CJ##OJ##PJ##QJ##"###7###g###### #################################Q###S###V###^#####################? ###V###`###h###j###r################### ## ### ### ##J ######Q###t###| ################################# #######"#hHfh##hHfh#5#CJ##OJ##PJ##QJ####hHfh##hHfh#5#CJ##OJ##PJ##QJ###^J ###$#hHfh##hHfh#CJ##OJ##PJ##QJ##^J##aJ### #hHfh##hHfh#CJ##OJ##PJ##QJ##^J#####hHfh##hHfh#CJ##OJ##PJ##QJ###hHfh##hHfh#5#C J##OJ##PJ##QJ###aJ### #hHfh##hHfh#CJ##OJ##PJ##QJ##aJ##- ###P###T###############?###h########## ##J ######Q################################################################## ########################################################################## #####################################################################d####d ##d##$#If####[$#$#gdHfh######d####d##d##$#@If####[$#$#gdHfh##### #F###d####d##d##$#If####[$#$#gdHfh#5##2###(# P##x# 83. # #4 #'*.#25@9###################d#######$#-D##If####M ######^#gdHfh###### ####### 84. ##$ 85. ##. 86. ##/ 87. ## 88. ## 89. ## 90. ##### 91. ####### ######I######M###N###O###P###Q########################### ################################################################################ ########################################hq###hHfh##hHfh#CJ##OJ##PJ##QJ##aJ### #hHfh##hHfh#CJ##OJ##PJ##QJ##aJ###hHfh##hHfh#5#CJ##OJ##PJ##QJ###aJ#####hHfh# #hHfh#CJ##OJ##PJ##QJ### #hHfh##hHfh#CJ##OJ##PJ##QJ##aJ###"#hHfh##hHfh#5#CJ##OJ##PJ##QJ####hHfh##hHf h#5#CJ##OJ##PJ##QJ###aJ####### 92. ## 93. ## ##########5###I######M###N################################################# ##############################################################g############ #################################A##kdb####$##$#If###########$B########### ####### t#######6#####################3#######4#######B####a###ytHfh##### d####d##d##$#If####[$#$#gdHfh##### #F###d####d##d##$#If####[$#$#gdHfh######d####d##d##$#@If####[$# $#gdHfh##### #F###d####d##d##$#If####[$#$#gdHfh## N###O###P###Q###########################- ################################################################################ ################################################################################ ################################################################################ ####################################################################A##kd####$# #$#If###########$B################## t#######6#####################3#######4#######B####a###ytHfh##### d#######$#If####gdHfh###2#1h#:pU###/=!#"###$#%###### 94. ############################################################################## ################################################################################ ################################################################################ ################################################################################ ################################################################################ ###############################################################k##$##$#If##### !v##h#5####$#v##$:V##### t#######6#####,####5######3#######4#######B####yt#[#h##$#If####K$#L$## ##!v##h#5####`##v##`#:V##### t########6#####,####5######3#######4#######B####k##$##$#If#####! v##h#5####$#v##$:V##### t#######6#####,####5######3#######4#######B####yt#[####D#d####### ###############o#o####################################V#### ######### ##C##$#### ##################i#m#g#1#######"#################k##$##$#If#####! v##h#5####$#v##$:V##### t#######6#####,####5######3#######4#######B####ytt##k##$##$#If##### !v##h#5####$#v##$:V##### t#######6#####,####5######3#######4#######B####ytt#####D#d####### ###############o#o####################################V#### ######### ##C##$#### ##################i#m#g#1#######"#################k##$##$#If#####! v##h#5####$#v##$:V##### t#######6#####,####5######3#######4#######B####ytHfh#k##$##$#If##### !v##h#5####$#v##$:V##### t#######6#####,####5######3#######4#######B####ytHfh################### ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ 95. ################################################################################ ##################################j######################################## ##############6###6###6###6###6###6###6###6###6###v###v###v###v###v###v###v# ##v###v###6###6###6###6###6###6###>###6###6###6###6###6###6###6###6###6###6###6# ##6###6###6###6###6###6###6###6###6###6###6###6###6###6###6###6######6###6##### ##6###6###6###6###6###6###6###6######6###6###6###6###6###6###6###6###6###6###6# ##6###h###H###6###6###6###6###6###6###6###6###6###6###6###6###6###6###6###6###6# ##6###6###6###6###6###6###6###6###6###6###6###6###6###6###6###6###6###6###6###6# ##6###6###6###6###6###6###6###6###6###6###6###6###6###6###6###6###6###6###6###6# ##6###6###6###6###6###6###6###6######6###2########################### ###0###@###P###`###p#############################2###(######### ###0###@###P###`###p############################# ###0###@###P###`###p############################# ###0###@###P###`###p############################# ###0###@###P###`###p############################# ###0###@###P###`###p############################# ###0###@###P###`###p#########8###X##############V###~### ###OJ##PJ##QJ##_H##mH #nH #sH #tH #####J##`##J# 96. ###U######N#o#r#m#a#l### 97. ####d########CJ##_H##aJ##mH #sH #tH ###d##@##"#d# 98. ###### #H#e#a#d#i#n#g##2########d####d##d#@[$# $####5#CJ$#OJ##PJ##QJ###^J##aJ$#`##@####`# 99. ###### #H#e#a#d#i#n#g# #3########$##$######@###5#B*#OJ##PJ##QJ###^J##phO####Z##@####Z# 100. ###### #H#e#a#d#i#n#g##5########$##$######@###B*#OJ##PJ##QJ##^J##ph$? `##########D#A`#D# 101. ##########D#e#f#a#u#l#t##P#a#r#a#g#r#a#p#h##F#o#n#t#####R#i@#R# 102. #######0# 103. #T#a#b#l#e##N#o#r#m#a#l#########4### #l#4#######a#########(#k#(########0###N#o##L#i#s#t##### 104. #####R#O##R# 105. ########H#e#a#d#i#n#g##2# #C#h#a#r#####5##CJ$#OJ##PJ##QJ####^J##aJ$#`#^@####`# 106. #####0# 107. #N#o#r#m#a#l##(#W#e#b#)########d####d##d#[$# $###CJ##OJ##PJ##QJ##^J##aJ##B#O###B# 108. #########a#p#p#l#e#-#c#o#n#v#e#r#t#e#d#-#s#p#a#c#e#####O#!# 109. #########i#l#_#s#p#a#n#####2#O#1#2# 110. ########i#l#_#l#i#n#k#_#s#t#y#l#e#####B#b@#A#B# 111. ####0# #H#T#M#L##C#o#d#e#####CJ##OJ##PJ##QJ##^J##aJ###e@##R## 112. #####0###H#T#M#L##P#r#e#f#o#r#m#a#t#t#e#d###A###2###(# P##x# 113. ##4#'*.#25@9#################d#########CJ##OJ##PJ##QJ##^J##aJ###O #a## 114. #####0###H#T#M#L##P#r#e#f#o#r#m#a#t#t#e#d# #C#h#a#r#####CJ##OJ##PJ##QJ##^J##aJ##8#O#q#8# 115. #########a#p#p#l#e#-#s#t#y#l#e#-#s#p#a#n#####T#/##T# 116. ########H#e#a#d#i#n#g##3##C#h#a#r#####5##B*#OJ##PJ##QJ####^J##phO##N#/ ##N# 117. ########H#e#a#d#i#n#g##5##C#h#a#r#####B*#OJ##PJ##QJ##^J##ph$?`##4#U`##4# 118. ####0# #H#y#p#e#r#l#i#n#k### #>*#ph####PK##########! #############[Content_Types].xmlj0#Er(Iw},##-j4 wP#-t##b{U##TU^hd})*1P#' ^W#0)T9##3`?/#[#G!-Rk.s.#. a?#####PK##########!####6#######_rels/.relsj0 120. }Q#%v/C/}#(h"##O# #=##C?hv=%#[xp {_PG#MGeD###3Vq%'#q##$8K##)fw#9:## x}r#x##w#r:TZaG*y8IjbRc|X#I u3#KGnD#1#N##IB#s RuK>V.E#L+M2#'fi 125. ~V 126. vl{#u8z#H *##:(#W#~#JTeO*tH#GHY#}KNP*##T9/#A7qZ #$*c?###qU#nw#N##%O#i4##=3#P #1Pm 127. 9###M2aD];Yt#[x##]}Wr|]g- eW)6-rC#S#jid DA#IqbJ#x##6k#ASht(Q%#p %m&]caS##l=X#P1Mh#9#MVdDAaVB[fJP#|8# 128. ###A#V^f##Hn-##"#d>zn >b##vKy#D: ,AGmnzi####.uY##C#6OMf3or$5N#H T[XF64T##,M0E)`#5XY`#;%1U#m;R>QD 129. #Dcp#U'#&LE/pm %]8firS4d#7y`Jn#I#R#3U~#7#+###m##qBiD## i#*L6#9mY#&i#HE=(K&N!V.KeLD#{D# ##v#E#deNe(MN9#R6#&3(a/DUz##>##>##>###? ##]H##cH##M##M##O##O###V###V##- l##l##Nn##Tn##Ap##Ip##p##p###q###q##Eq##Kq##q##q##q##q##q##q##q## r##Ir##Or##zr##r##Pu##Zu##u##u##w##w##w##w##w##w###x## x##9x##Lx##lx##rx##x##x##x##x##x##x##y##y##z##z###{###{##|##| ##}##}##%~##3~##|~##~########


Recommended