SlideShare a Scribd company logo
1 of 65
Spring Tutorial 
AAddddrreessss:: 
KK11// 44,, SSeeccoonndd fflloooorr,, 
SSeeccttoorr--1155//1166 MMaarrkkeett,, 
VVaasshhii,, NNaavvii MMuummbbaaii. 
MMoobb NNoo:: 
99889922990000110033 
99889922990000117733 
by
Introduction to the Spring 
Framework
• Java Architect for MATRIX Resources in 
Atlanta 
• 8 years of software development experience 
• Sun Certified Java Programmer 
• Sun Certified Web Component Developer
Overview 
• Application Layering Architecture 
• Spring in the Middle Tier 
• Spring Inversion of Control + AOP 
• Wiring objects together 
• Spring Database Components 
• Demo
Application Layering
Application Layering 
• A clear separation of application component responsibility. 
– Presentation layer 
• Concentrates on request/response actions 
• Handles UI rendering from a model. 
• Contains formatting logic and non-business related validation logic. 
• Handles exceptions thrown from other layers 
– Persistence layer 
• Used to communicate with a persistence store such as a relational 
database. 
• Provides a query language 
• Possible O/R mapping capabilities 
• JDBC, Hibernate, iBATIS, JDO, Entity Beans, etc. 
– Domain layer 
• Contains business objects that are used across above layers. 
• Contain complex relationships between other domain objects 
• May be rich in business logic 
• May have ORM mappings 
• Domain objects should only have dependencies on other domain 
objects
What about a Service Layer? 
• Where do we position loosely-coupled business logic? 
• What is service logic? 
• How should container level services be implemented? 
• How do we support transactions in a POJO based application? 
• How do we communicate from our presentation layer to our persistence layer? 
• How do we get to services that contain business logic? 
• How should our business objects communicate with our persistence layer? 
• How do we get objects retrieved from our persistence layer to our UI layer?
Application Layering (cont) 
– Service layer 
• Gateway to expose business logic to the 
outside world 
• Manages ‘container level services’ such as 
transactions, security, data access logic, and 
manipulates domain objects 
• Not well defined in many applications today or 
tightly coupled in an inappropriate layer.
Proposed Web App Layering
More Application Layering 
Combinations 
• Presentation/Business/Persistence 
• Struts+Spring+Hibernate 
• Struts + Spring + EJB 
• JavaServer Faces + Spring + iBATIS 
• Spring + Spring + JDO 
• Flex + Spring + Hibernate 
• Struts + Spring + JDBC 
• You decide…
EJB (<=2.x) in the Service Layer 
• Sun’s traditional solution to middle tier business logic 
• Specification that did not always work as projected in 
real applications. 
• EJBs are less portable than POJO based 
architectures. 
• Inconsistencies by vendors make EJBs break the 
“write once, run anywhere” rule. 
• Fosters over-engineering in most cases 
• Entity Beans – very limiting compared to alternatives 
such as Hibernate. 
• Performance with POJOs are much faster then EJBs. 
• EJBs run in a heavy container 
• Your code becomes coupled to EJB API. 
• We need to redefine what J2EE means…
Spring In the Middle Tier
Spring Mission Statement 
• J2EE should be easier to use 
• OO design is more important than any 
implementation technology, such as 
J2EE. 
• Testability is essential, and a framework 
such as Spring should help make your 
code easier to test. 
• Spring should not compete with good 
existing solutions, but should foster 
integration.
Spring 
• A lightweight framework that addresses each tier in a 
Web application. 
– Presentation layer – An MVC framework that is most similar 
to Struts but is more powerful and easy to use. 
– Business layer – Lightweight IoC container and AOP support 
(including built in aspects) 
– Persistence layer – DAO template support for popular ORMs 
and JDBC 
• Simplifies persistence frameworks and JDBC 
• Complimentary: Not a replacement for a persistence framework 
• Helps organize your middle tier and handle typical 
J2EE plumbing problems. 
• Reduces code and speeds up development 
• Current Version is 1.0.2
Spring (continued) 
• Do I have to use all components of Spring? 
• Spring is a non-invasive and portable framework that allows you 
to introduce as much or as little as you want to your application. 
• Promotes decoupling and reusability 
• POJO Based 
• Allows developers to focus more on reused business logic and 
less on plumbing problems. 
• Reduces or alleviates code littering, ad hoc singletons, factories, 
service locators and multiple configuration files. 
• Removes common code issues like leaking connections and 
more. 
• Built in aspects such as transaction management 
• Most business objects in Spring apps do not depend on the 
Spring framework.
Why Did I choose Spring? 
• Introduced to Spring by way of Hibernate 
• Originally wanted Spring to provide a way to simplify 
DAO objects and provide declarative transaction 
support to our non-EJB applications. 
• Needed a solution to loosely couple business logic in 
a POJO fashion. 
• Wanted to build portable applications that provided 
clearer separation of presentation, business, and 
persistence logic. 
• Easily integrated with our existing frameworks 
• Great documentation and community support
Simplify your code with Spring 
• Enables you to stop polluting code 
• No more custom singleton objects 
– Beans are defined in a centralized configuration file 
• No more custom factory object to build and/or locate other 
objects 
• DAO simplification 
– Consistent CRUD 
– Data access templates 
– No more copy-paste try/catch/finally blocks 
– No more passing Connection objects between methods 
– No more leaked connections 
• POJO Based 
• Refactoring experience with Spring 
• Caution Spring is addictive!
Spring IoC + AOP 
• IoC container 
– Setter based and constructor based dependency injection 
– Portable across application servers 
– Promotes good use of OO practices such as programming 
to interfaces. 
– Beans managed by an IoC container are reusable and 
decoupled from business logic 
• AOP 
– Spring uses Dynamic AOP Proxy objects to provide cross-cutting 
services 
– Reusable components 
– Aopalliance support today 
– Integrates with the IoC container 
– AspectJ support in Spring 1.1
Spring IoC
Inversion of Control 
• Dependency injection 
– Beans define their dependencies through constructor 
arguments or properties 
– The container provides the injection at runtime 
• “Don’t talk to strangers” 
• Also known as the Hollywood principle – “don’t call 
me I will call you” 
• Decouples object creators and locators from 
application logic 
• Easy to maintain and reuse 
• Testing is easier
Non-IoC / Dependency Injection
Non-IoC Service Object 
public class OrderServiceImpl implements 
IOrderService { 
public Order saveOrder(Order order) throws 
OrderException{ 
try{ 
// 1. Create a Session/Connection object 
// 2. Start a transaction 
// 3. Lookup and invoke one of the methods in a 
// DAO and pass the Session/Connection object. 
// 4. Commit transaction 
}catch(Exception e){ 
// handle e, rollback transaction, 
//cleanup, // throw e 
}finally{ 
//Release resources and handle more exceptions 
} 
}
IoC / Dependency Injection
IoC Service Object 
public class OrderSpringService 
implements IOrderService { 
IOrderDAO orderDAO; 
public Order saveOrder(Order order) 
throws OrderException{ 
// perform some business logic… 
return orderDAO.saveNewOrder(order); 
} 
public void setOrderDAO(IOrderDAO 
orderDAO) { 
this.orderDAO = orderDAO; 
} 
• Program to interfaces for your bean dependencies!
Spring Bean Definition 
• The bean class is the actual implementation of the bean being 
described by the BeanFactory. 
• Bean examples – DAO, DataSource, Transaction Manager, 
Persistence Managers, Service objects, etc 
• Spring config contains implementation classes while your code 
should program to interfaces. 
• Bean behaviors include: 
– Singleton or prototype 
– Autowiring 
– Initialization and destruction methods 
• init-method 
• destroy-method 
• Beans can be configured to have property values set. 
– Can read simple values, collections, maps, references to other 
beans, etc.
Simple Spring Bean Example 
• <bean id=“orderBean” class=“example.OrderBean” 
init-method=“init”> 
<property 
name=“minimumAmountToProcess”>10</property> 
<property name=“orderDAO”> 
<ref bean=“orderDAOBean”/> 
</property> 
</bean> 
• public class OrderBean implements IOrderBean{ 
… 
public void 
setMinimumAmountToProcess(double d){ 
this. minimumAmountToProcess = d; 
} 
public void setOrderDAO(IOrderDAO odao){ 
this.orderDAO = odao; 
} 
}
Spring BeanFactory 
• BeanFactory is core to the Spring framework 
– Lightweight container that loads bean definitions and 
manages your beans. 
– Configured declaratively using an XML file, or files, that 
determine how beans can be referenced and wired together. 
– Knows how to serve and manage a singleton or prototype 
defined bean 
– Responsible for lifecycle methods. 
– Injects dependencies into defined beans when served 
• Avoids the use of singletons and factories
Spring ApplicationContext 
• A Spring ApplicationContext allows you to get access 
to the objects that are configured in a BeanFactory in 
a framework manner. 
• ApplicationContext extends BeanFactory 
– Adds services such as international messaging capabilities. 
– Add the ability to load file resources in a generic fashion. 
• Several ways to configure a context: 
– XMLWebApplicationContext – Configuration for a web 
application. 
– ClassPathXMLApplicationContext – standalone XML 
application context 
– FileSystemXmlApplicationContext 
• Allows you to avoid writing Service Locators
Configuring an XMLWebApplicationContext 
<context-param> 
<param-name>contextConfigLocation</param-name> 
<param-value> 
/WEB-INF/applicationContext.xml 
</param-value> 
</context-param> 
<listener> 
<listener-class> 
org.springframework.web.context.ContextLoader 
Listener 
</listener-class> 
</listener>
Configuring an XMLWebApplicationContext 
<context-param> 
<param-name>contextConfigLocation</param-name> 
<param-value> 
/WEB-INF/applicationContext.xml 
</param-value> 
</context-param> 
<servlet> 
<servlet-name>context</servlet-name> 
<servlet-class> 
org.springframework.web.context.ContextLoader 
Servlet 
</servlet-class> 
<load-on-startup>1</load-on-startup> 
</servlet>
Locating a Bean with Struts 
public abstract class BaseAction extends 
ActionSupport { 
protected IOrderService 
getOrderService() { 
return (IOrderService) 
getWebApplicationContext() 
.getBean("orderService"); 
} 
} 
<bean id=“orderService" 
class="com.meagle.service.spring.OrderServiceImpl">
Spring AOP
AOP 
• Complements OO programming 
• Core business concerns vs. Crosscutting enterprise concerns 
• Components of AOP 
– Aspect – unit of modularity for crosscutting concerns 
– Join point – well-defined points in the program flow 
– Pointcut – join point queries where advice executes 
– Advice – the block of code that runs based on the pointcut 
definition 
– Weaving – can be done at runtime or compile time. Inserts the 
advice (crosscutting concerns) into the code (core concerns). 
• Aspects can be used as an alternative to existing technologies 
such as EJB. Ex: declarative transaction management, 
declarative security, profiling, logging, etc. 
• Aspects can be added or removed as needed without changing 
your code.
Spring AOP 
• Framework that builds on the aopalliance interfaces. 
• Aspects are coded with pure Java code. You do not 
need to learn pointcut query languages that are 
available in other AOP implementations. 
• Spring aspects can be configured using its own IoC 
container. 
– Objects obtained from the IoC container can be 
transparently advised based on configuration 
• Spring AOP has built in aspects such as providing 
transaction management, performance monitoring 
and more for your beans 
• Spring AOP is not as robust as some other 
implementations such as AspectJ. 
– However, it does support common aspect uses to solve 
common problems in enterprise applications
Spring AOP 
• Supports the following advices: 
– method before 
– method after returning 
– throws advice 
– around advice (uses AOPAlliance MethodInterceptor 
directly) 
• Spring allows you to chain together interceptors and 
advice with precedence. 
• Aspects are weaved together at runtime. AspectJ 
uses compile time weaving. 
• Spring AOP also includes advisors that contain 
advice and pointcut filtering. 
• ProxyFactoryBean – sources AOP proxies from a 
Spring BeanFactory 
• IoC + AOP is a great combination that is non-invasive
Spring AOP Around Advice Example 
public class PerformanceMonitorDetailInterceptor implements 
MethodInterceptor { 
protected final Log logger = LogFactory.getLog(getClass()); 
public Object invoke(MethodInvocation invocation) throws Throwable 
{ 
String name = 
invocation.getMethod().getDeclaringClass().getName() 
+ "." 
+ invocation.getMethod().getName(); 
StopWatch sw = new StopWatch(name); 
sw.start(name); 
Object rval = invocation.proceed(); 
sw.stop(); 
logger.info(sw.prettyPrint()); 
return rval; 
} 
}
Spring AOP Advice (Cont’) 
• Advisor references the advice and the pointcut 
<bean id="perfMonInterceptor" 
class= 
"com.meagle.service.interceptor.PerformanceMonitorDetailInterceptor"/> 
<bean id="performanceAdvisor" 
class="org.springframework.aop.support.RegexpMethodPointcutAdvisor"> 
<property name="advice"> 
<ref local="perfMonInterceptor"/> 
</property> 
<property name="patterns"> 
<list> 
<value>.*find.*</value> 
<value>.*save.*</value> 
<value>.*update.*</value> 
</list> 
</property> 
</bean>
AOP Weaving
Wiring Beans Together with 
Spring
Wiring your Persistence Layer 
<bean id=“mySessionFactory" class= 
“org.springframework.orm.hibernate.LocalSessionFactoryBean“> 
<property name="mappingResources"> 
<list> 
<value>com/matrix/bo/Order.hbm.xml</value> 
<value>com/matrix/bo/OrderLineItem.hbm.xml</value> 
</list> 
</property> 
<property name="hibernateProperties"> 
<props> 
<prop key="hibernate.dialect"> 
net.sf.hibernate.dialect.DB2Dialect 
</prop> 
<prop key="hibernate.default_schema">DB2ADMIN</prop> 
<prop key="hibernate.show_sql">false</prop> 
<prop key="hibernate.proxool.xml"> 
/WEB-INF/proxool.xml</prop> 
<prop key="hibernate.proxool.pool_alias">spring</prop> 
</props> 
</property> 
</bean>
Wiring your Transaction Management 
Four transaction managers available 
– DataSourceTransactionManager 
– HibernateTransactionManager 
– JdoTransactionManager 
– JtaTransactionManager 
<bean id=“myTransactionManager" 
class="org 
.springframework 
.orm 
.hibernate 
.HibernateTransactionManager"> 
<property name=“sessionFactory"> 
<ref local=“mySessionFactory"/> 
</property> 
</bean>
Wiring a Service Object 
<bean id=“orderService" class="org.springframework.transaction. 
interceptor.TransactionProxyFactoryBean"> 
<property name="transactionManager"> 
<ref local=“myTransactionManager"/> 
</property> 
<property name="target"><ref local=“orderTarget"/></property> 
<property name="transactionAttributes"> 
<props> 
<prop key="find*"> 
PROPAGATION_REQUIRED,readOnly,-OrderException 
</prop> 
<prop key="save*"> 
PROPAGATION_REQUIRED,-OrderMinimumAmountException 
</prop> 
<prop key="update*"> 
PROPAGATION_REQUIRED,-OrderException 
</prop> 
</props> 
</property> 
</bean>
Defining a Target to Proxy 
public class OrderServiceSpringImpl 
implements IOrderService { 
private IOrderDAO orderDAO; 
// service methods… 
public void setOrderDAO(IOrderDAO 
orderDAO) { 
this.orderDAO = orderDAO; 
} 
}
Wiring a Service Object (cont’) 
<bean id=“orderTarget" 
class="com.meagle.service.spring.OrderServiceSp 
ringImpl"> 
<property name=“orderDAO"> 
<ref local=“orderDAO"/> 
</property> 
</bean> 
<bean id=“orderDAO" 
class="com.meagle.dao.hibernate.OrderHibernateD 
AO"> 
<property name="sessionFactory"> 
<ref local=“mySessionFactory"/> 
</property> 
</bean>
Spring Database Components
Consistent Abstract Classes for DAO Support 
• Extend your DAO classes with the proper xxxDAOSupport class 
that matches your persistence mechanism. 
• JdbcDaoSupport 
– Super class for JDBC data access objects. 
– Requires a DataSource to be set, providing a JdbcTemplate based 
on it to subclasses. 
• HibernateDaoSupport 
– Super class for Hibernate data access objects. 
– Requires a SessionFactory to be set, providing a 
HibernateTemplate based on it to subclasses. 
• JdoDaoSupport 
– Super class for JDO data access objects. 
– Requires a PersistenceManagerFactory to be set, providing a 
JdoTemplate based on it to subclasses. 
• SqlMapDaoSupport 
– Supper class for iBATIS SqlMap data access object. 
– Requires a DataSource to be set, providing a SqlMapTemplate
Spring DAO Templates 
• Built in code templates that support JDBC, Hibernate, JDO, and 
iBatis SQL Maps 
• Simplifies data access coding by reducing redundant code and 
helps avoid common errors. 
• Alleviates opening and closing connections in your DAO code. 
• No more ThreadLocal or passing Connection/Session objects. 
• Transaction management is handled by a wired bean 
• You are dropped into the template with the resources you need 
for data access – Session, PreparedStatement, etc. 
• Code only needs to be implemented in callback methods. 
– doInXXX(Object) 
• Optional separate JDBC framework
Ex: Code without a template 
public class OrderHibernateDAO implements IOrderDAO { 
public Order saveOrder(Order order) throws 
OrderException{ 
Session s = null; 
Transaction tx = null; 
try{ 
s = ... // get a new Session object 
tx = s.beginTransaction(); 
s.save(order); 
tx.commit(); 
} catch (HibernateException he){ 
// log, rollback, and convert to OrderException 
} catch (SQLException sqle){ 
// log, rollback, and convert to OrderException 
} finally { 
s.close(); // needs a try/catch block 
} 
return order; 
}
Ex: Spring DAO Template Example 
public class OrderHibernateDAO extends HibernateDaoSupport 
implements IOrderDAO { 
... 
public Order saveOrder(final Order order) { 
return (Order) getHibernateTemplate().execute(new 
HibernateCallback() { 
public Object doInHibernate(Session session) 
throws HibernateException, SQLException { 
session.save(order); 
return order; 
} 
}); 
} 
... 
}
Ex 2: Spring DAO Template Example 
public class OrderHibernateDAO extends 
HibernateDaoSupport 
implements IOrderDAO { 
... 
public List findOrdersByCustomerId(int id) { 
return getHibernateTemplate() 
.findByNamedQuery(“OrdersByCustomerID”, 
new Integer(id)); 
} 
public Order findOrderById(int orderId ) { 
return (Order) getHibernateTemplate().load( 
Order. class, 
new Integer(orderId)); 
} 
... 
}
Consistent Exception Handling 
• Spring has it’s own exception handling hierarchy for DAO logic. 
• No more copy and pasting redundant exception logic! 
• Exceptions from JDBC, or a supported ORM, are wrapped up 
into an appropriate, and consistent, DataAccessException and 
thrown. 
• This allows you to decouple exceptions in your business logic. 
• These exceptions are treated as unchecked exceptions that you 
can handle in your business tier if needed. No need to try/catch 
in your DAO. 
• Define your own exception translation by subclassing classes 
such as SQLErrorCodeSQLExceptionTranslator
Spring and Testing 
• Easier test driven development (TDD) 
• Integration testing 
– Can use a standalone Spring configuration 
with mock objects for testing. 
– Consider XMLApplicationContext or 
FileSystemApplicationContext. 
• Unit testing 
– Allows you to test outside the container 
without using the Spring container. 
• Easy to test POJOs
Struts Support 
• ContextLoaderPlugin - Struts 1.1 PlugIn that 
loads a Spring application context for the 
Struts ActionServlet. This context will 
automatically refer to the root 
WebApplicationContext (loaded by 
ContextLoaderListener/Servlet) as parent. 
• ActionSupport and DispatchActionSupport 
are pre-built convenience classes that 
provide easy access to the context. These 
classes alleviate the need to build custom 
service locators.
Even More Spring Components 
• JavaMail helpers 
• Scheduling support via Quartz 
• Convenience implementation classes for 
– Remoting support – JAXRPC, RMI, Hessian, and Burlap 
• EJB support for easier access. 
• Acegi Security System for Spring 
• http://acegisecurity.sourceforge.net/ 
• Very good framework! 
• Eclipse Plugin – Spring IDE for Eclipse 
• Coming soon 
– JMS implementation classes 
– JMX support
Future Trends and Predictions 
• Traditional J2EE development with EJB will become more 
POJO based with EJB 3.0 
• Lightweight IoC container support will become more popular 
• Future versions of J2EE will resemble frameworks like Spring 
and Hibernate for business logic and persistence logic 
respectively. 
– EJB 3.0 ~ (Spring + Hibernate) 
• AOP is gaining momentum as an alternative to providing 
enterprise services 
• Annotations will be helpful for applying AOP advice – J2SE 1.5 
• IoC + AOP is a great non-invasive combination. 
• Spring is already available today! 
• If you are considering EJB 3.0 - Spring will make an easier 
migration path
Demo 
• Shows an end-to-end implementation using 
Struts, Spring, and Hibernate. 
• Demonstrates declarative transaction 
management with POJOs using Spring 
Aspect. 
• Demonstrates working with a custom 
Spring aspect for performance monitoring. 
• DAO replacement Hibernate << >> JDBC 
• Look at some code.
Resources 
• Spring – www.springframework.org 
• J2EE without EJB – Rod Johnson/ Jurgen 
Hoeller 
• Better, Faster, Lighter Java – Bruce Tate 
• Wiring your Web Application with Open 
Source Java 
http://www.onjava.com/pub/a/onjava/2004/04/ 
07/wiringwebapps.html
Real World EJB Usage 
• Stateless Session Beans (SLSBs) 
– One of the easiest beans to program, but still want to 
program with POJOs. 
– Local interfaces alleviate remote interface performance 
issues. 
– Used as facades to other objects 
– Allows developers to provide declarative transaction 
management. 
• Message Driven Beans (MDBs) 
– Easy to program 
– Provides asynchronous messaging 
• Distributed Transaction Management 
• RMI Remoting 
• How do we get the benefits of EJB without using an 
EJB container?
Application Layering (cont) 
• More Architectural decisions… 
– How do we achieve independent layers of code that can 
provide clear separation, loose coupling, and allow 
communication with each other? 
– How can we design an architecture that can allow layer 
replacement without affecting existing layers? 
– What technologies, and frameworks, should be implemented 
in each layer? 
– How will we implement security? 
– Will the application be flexible to technology changes? 
– How will the application handle enterprise level services 
such as transactions, security, logging, resource pooling, 
profiling, etc?
More about the Service Layer 
• Often tightly coupled with other layers 
– Struts is not where you place business logic and persistence logic! 
• The missing link IMHO in most applications today. 
• EJB – SLSB, SFSB provide the common J2EE business layer 
enterprise solutions for transactions within a container. What 
about POJO? 
• Hand code transaction logic with JTA 
• Frameworks – Spring, Picocontainer, HiveMind, etc. 
• Lighterweight containers use 
– IoC/Dependency Injection 
– AOP
Application Layering (cont) 
• Where do we code business logic? 
– Domain objects 
• Heavy domain model / thin service layer approach 
• Business logic is embedded in domain objects 
• Takes advantage of OO programming 
• Behavior rich domain model 
– Service Layer 
• Thin domain model / heavy service layer approach 
• Wraps procedural business logic over domain objects 
• Anti-pattern according to Fowler – ‘Anemic Domain 
Model’ 
• Provides a separation of business logic concerns from 
the domain model 
• Treats the domain model as ORM objects
ClassPathXMLApplicationContext 
• Usually used with a standalone application to 
obtain a context 
– Ex: Swing application 
• Useful when performing integration testing 
– In-container testing. 
– Define a separate application context XML file that 
contains mappings to your mock objects.

More Related Content

What's hot

JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6Bert Ertman
 
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012Jagadish Prasath
 
Introduction to Spring
Introduction to SpringIntroduction to Spring
Introduction to SpringSujit Kumar
 
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlJava Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlArjun Thakur
 
Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Rohit Kelapure
 
Hibernate Presentation
Hibernate  PresentationHibernate  Presentation
Hibernate Presentationguest11106b
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewEugene Bogaart
 
Introduction To J Boss Seam
Introduction To J Boss SeamIntroduction To J Boss Seam
Introduction To J Boss Seamashishkulkarni
 
CORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVACORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVABALUJAINSTITUTE
 
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsMurat Yener
 
Intorduction to struts
Intorduction to strutsIntorduction to struts
Intorduction to strutsAnup72
 
Oracle ADF Architecture TV - Design - Advanced ADF Task Flow Concepts
Oracle ADF Architecture TV - Design - Advanced ADF Task Flow ConceptsOracle ADF Architecture TV - Design - Advanced ADF Task Flow Concepts
Oracle ADF Architecture TV - Design - Advanced ADF Task Flow ConceptsChris Muir
 
Frameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic ReviewFrameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic Reviewnetc2012
 

What's hot (18)

40020
4002040020
40020
 
Spring
SpringSpring
Spring
 
JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6
 
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
 
Introduction to Spring
Introduction to SpringIntroduction to Spring
Introduction to Spring
 
EJB 3.1 by Bert Ertman
EJB 3.1 by Bert ErtmanEJB 3.1 by Bert Ertman
EJB 3.1 by Bert Ertman
 
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlJava Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
 
Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010
 
Hibernate Presentation
Hibernate  PresentationHibernate  Presentation
Hibernate Presentation
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
 
Java ee introduction
Java ee introductionJava ee introduction
Java ee introduction
 
Hibernate
HibernateHibernate
Hibernate
 
Introduction To J Boss Seam
Introduction To J Boss SeamIntroduction To J Boss Seam
Introduction To J Boss Seam
 
CORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVACORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVA
 
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design Patterns
 
Intorduction to struts
Intorduction to strutsIntorduction to struts
Intorduction to struts
 
Oracle ADF Architecture TV - Design - Advanced ADF Task Flow Concepts
Oracle ADF Architecture TV - Design - Advanced ADF Task Flow ConceptsOracle ADF Architecture TV - Design - Advanced ADF Task Flow Concepts
Oracle ADF Architecture TV - Design - Advanced ADF Task Flow Concepts
 
Frameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic ReviewFrameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic Review
 

Similar to Hybernat and structs, spring classes in mumbai

Spring introduction
Spring introductionSpring introduction
Spring introductionManav Prasad
 
스프링 프레임워크
스프링 프레임워크스프링 프레임워크
스프링 프레임워크Yoonki Chang
 
Learn spring at amc square learning
Learn spring at amc square learningLearn spring at amc square learning
Learn spring at amc square learningASIT Education
 
Django è pronto per l'Enterprise
Django è pronto per l'EnterpriseDjango è pronto per l'Enterprise
Django è pronto per l'EnterprisePyCon Italia
 
Introduction to j2 ee frameworks
Introduction to j2 ee frameworksIntroduction to j2 ee frameworks
Introduction to j2 ee frameworksMukesh Kumar
 
Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”EPAM Systems
 
Framework adoption for java enterprise application development
Framework adoption for java enterprise application developmentFramework adoption for java enterprise application development
Framework adoption for java enterprise application developmentClarence Ho
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applicationsJulien Dubois
 
1. Spring intro IoC
1. Spring intro IoC1. Spring intro IoC
1. Spring intro IoCASG
 
EJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another IntroductionEJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another IntroductionKelum Senanayake
 
Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Adam Mokan
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project Elad Hirsch
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring FrameworkASG
 
Spring framework
Spring frameworkSpring framework
Spring frameworkKani Selvam
 
Hibernate basics
Hibernate basicsHibernate basics
Hibernate basicsAathikaJava
 

Similar to Hybernat and structs, spring classes in mumbai (20)

Spring introduction
Spring introductionSpring introduction
Spring introduction
 
Java Spring
Java SpringJava Spring
Java Spring
 
스프링 프레임워크
스프링 프레임워크스프링 프레임워크
스프링 프레임워크
 
spring
springspring
spring
 
Introduction to Spring & Spring BootFramework
Introduction to Spring  & Spring BootFrameworkIntroduction to Spring  & Spring BootFramework
Introduction to Spring & Spring BootFramework
 
Learn spring at amc square learning
Learn spring at amc square learningLearn spring at amc square learning
Learn spring at amc square learning
 
Spring ppt
Spring pptSpring ppt
Spring ppt
 
Django è pronto per l'Enterprise
Django è pronto per l'EnterpriseDjango è pronto per l'Enterprise
Django è pronto per l'Enterprise
 
Introduction to j2 ee frameworks
Introduction to j2 ee frameworksIntroduction to j2 ee frameworks
Introduction to j2 ee frameworks
 
Spring 2
Spring 2Spring 2
Spring 2
 
Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”
 
Framework adoption for java enterprise application development
Framework adoption for java enterprise application developmentFramework adoption for java enterprise application development
Framework adoption for java enterprise application development
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applications
 
1. Spring intro IoC
1. Spring intro IoC1. Spring intro IoC
1. Spring intro IoC
 
EJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another IntroductionEJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another Introduction
 
Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project 
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Hibernate basics
Hibernate basicsHibernate basics
Hibernate basics
 

More from Vibrant Technologies & Computers

Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.Vibrant Technologies & Computers
 

More from Vibrant Technologies & Computers (20)

Buisness analyst business analysis overview ppt 5
Buisness analyst business analysis overview ppt 5Buisness analyst business analysis overview ppt 5
Buisness analyst business analysis overview ppt 5
 
SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables  SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables
 
SQL- Introduction to MySQL
SQL- Introduction to MySQLSQL- Introduction to MySQL
SQL- Introduction to MySQL
 
SQL- Introduction to SQL database
SQL- Introduction to SQL database SQL- Introduction to SQL database
SQL- Introduction to SQL database
 
ITIL - introduction to ITIL
ITIL - introduction to ITILITIL - introduction to ITIL
ITIL - introduction to ITIL
 
Salesforce - Introduction to Security & Access
Salesforce -  Introduction to Security & Access Salesforce -  Introduction to Security & Access
Salesforce - Introduction to Security & Access
 
Data ware housing- Introduction to olap .
Data ware housing- Introduction to  olap .Data ware housing- Introduction to  olap .
Data ware housing- Introduction to olap .
 
Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.
 
Data ware housing- Introduction to data ware housing
Data ware housing- Introduction to data ware housingData ware housing- Introduction to data ware housing
Data ware housing- Introduction to data ware housing
 
Salesforce - classification of cloud computing
Salesforce - classification of cloud computingSalesforce - classification of cloud computing
Salesforce - classification of cloud computing
 
Salesforce - cloud computing fundamental
Salesforce - cloud computing fundamentalSalesforce - cloud computing fundamental
Salesforce - cloud computing fundamental
 
SQL- Introduction to PL/SQL
SQL- Introduction to  PL/SQLSQL- Introduction to  PL/SQL
SQL- Introduction to PL/SQL
 
SQL- Introduction to advanced sql concepts
SQL- Introduction to  advanced sql conceptsSQL- Introduction to  advanced sql concepts
SQL- Introduction to advanced sql concepts
 
SQL Inteoduction to SQL manipulating of data
SQL Inteoduction to SQL manipulating of data   SQL Inteoduction to SQL manipulating of data
SQL Inteoduction to SQL manipulating of data
 
SQL- Introduction to SQL Set Operations
SQL- Introduction to SQL Set OperationsSQL- Introduction to SQL Set Operations
SQL- Introduction to SQL Set Operations
 
Sas - Introduction to designing the data mart
Sas - Introduction to designing the data martSas - Introduction to designing the data mart
Sas - Introduction to designing the data mart
 
Sas - Introduction to working under change management
Sas - Introduction to working under change managementSas - Introduction to working under change management
Sas - Introduction to working under change management
 
SAS - overview of SAS
SAS - overview of SASSAS - overview of SAS
SAS - overview of SAS
 
Teradata - Architecture of Teradata
Teradata - Architecture of TeradataTeradata - Architecture of Teradata
Teradata - Architecture of Teradata
 
Teradata - Restoring Data
Teradata - Restoring Data Teradata - Restoring Data
Teradata - Restoring Data
 

Recently uploaded

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 

Recently uploaded (20)

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 

Hybernat and structs, spring classes in mumbai

  • 1.
  • 2. Spring Tutorial AAddddrreessss:: KK11// 44,, SSeeccoonndd fflloooorr,, SSeeccttoorr--1155//1166 MMaarrkkeett,, VVaasshhii,, NNaavvii MMuummbbaaii. MMoobb NNoo:: 99889922990000110033 99889922990000117733 by
  • 3. Introduction to the Spring Framework
  • 4. • Java Architect for MATRIX Resources in Atlanta • 8 years of software development experience • Sun Certified Java Programmer • Sun Certified Web Component Developer
  • 5. Overview • Application Layering Architecture • Spring in the Middle Tier • Spring Inversion of Control + AOP • Wiring objects together • Spring Database Components • Demo
  • 7. Application Layering • A clear separation of application component responsibility. – Presentation layer • Concentrates on request/response actions • Handles UI rendering from a model. • Contains formatting logic and non-business related validation logic. • Handles exceptions thrown from other layers – Persistence layer • Used to communicate with a persistence store such as a relational database. • Provides a query language • Possible O/R mapping capabilities • JDBC, Hibernate, iBATIS, JDO, Entity Beans, etc. – Domain layer • Contains business objects that are used across above layers. • Contain complex relationships between other domain objects • May be rich in business logic • May have ORM mappings • Domain objects should only have dependencies on other domain objects
  • 8. What about a Service Layer? • Where do we position loosely-coupled business logic? • What is service logic? • How should container level services be implemented? • How do we support transactions in a POJO based application? • How do we communicate from our presentation layer to our persistence layer? • How do we get to services that contain business logic? • How should our business objects communicate with our persistence layer? • How do we get objects retrieved from our persistence layer to our UI layer?
  • 9. Application Layering (cont) – Service layer • Gateway to expose business logic to the outside world • Manages ‘container level services’ such as transactions, security, data access logic, and manipulates domain objects • Not well defined in many applications today or tightly coupled in an inappropriate layer.
  • 10. Proposed Web App Layering
  • 11. More Application Layering Combinations • Presentation/Business/Persistence • Struts+Spring+Hibernate • Struts + Spring + EJB • JavaServer Faces + Spring + iBATIS • Spring + Spring + JDO • Flex + Spring + Hibernate • Struts + Spring + JDBC • You decide…
  • 12. EJB (<=2.x) in the Service Layer • Sun’s traditional solution to middle tier business logic • Specification that did not always work as projected in real applications. • EJBs are less portable than POJO based architectures. • Inconsistencies by vendors make EJBs break the “write once, run anywhere” rule. • Fosters over-engineering in most cases • Entity Beans – very limiting compared to alternatives such as Hibernate. • Performance with POJOs are much faster then EJBs. • EJBs run in a heavy container • Your code becomes coupled to EJB API. • We need to redefine what J2EE means…
  • 13. Spring In the Middle Tier
  • 14. Spring Mission Statement • J2EE should be easier to use • OO design is more important than any implementation technology, such as J2EE. • Testability is essential, and a framework such as Spring should help make your code easier to test. • Spring should not compete with good existing solutions, but should foster integration.
  • 15. Spring • A lightweight framework that addresses each tier in a Web application. – Presentation layer – An MVC framework that is most similar to Struts but is more powerful and easy to use. – Business layer – Lightweight IoC container and AOP support (including built in aspects) – Persistence layer – DAO template support for popular ORMs and JDBC • Simplifies persistence frameworks and JDBC • Complimentary: Not a replacement for a persistence framework • Helps organize your middle tier and handle typical J2EE plumbing problems. • Reduces code and speeds up development • Current Version is 1.0.2
  • 16. Spring (continued) • Do I have to use all components of Spring? • Spring is a non-invasive and portable framework that allows you to introduce as much or as little as you want to your application. • Promotes decoupling and reusability • POJO Based • Allows developers to focus more on reused business logic and less on plumbing problems. • Reduces or alleviates code littering, ad hoc singletons, factories, service locators and multiple configuration files. • Removes common code issues like leaking connections and more. • Built in aspects such as transaction management • Most business objects in Spring apps do not depend on the Spring framework.
  • 17. Why Did I choose Spring? • Introduced to Spring by way of Hibernate • Originally wanted Spring to provide a way to simplify DAO objects and provide declarative transaction support to our non-EJB applications. • Needed a solution to loosely couple business logic in a POJO fashion. • Wanted to build portable applications that provided clearer separation of presentation, business, and persistence logic. • Easily integrated with our existing frameworks • Great documentation and community support
  • 18. Simplify your code with Spring • Enables you to stop polluting code • No more custom singleton objects – Beans are defined in a centralized configuration file • No more custom factory object to build and/or locate other objects • DAO simplification – Consistent CRUD – Data access templates – No more copy-paste try/catch/finally blocks – No more passing Connection objects between methods – No more leaked connections • POJO Based • Refactoring experience with Spring • Caution Spring is addictive!
  • 19. Spring IoC + AOP • IoC container – Setter based and constructor based dependency injection – Portable across application servers – Promotes good use of OO practices such as programming to interfaces. – Beans managed by an IoC container are reusable and decoupled from business logic • AOP – Spring uses Dynamic AOP Proxy objects to provide cross-cutting services – Reusable components – Aopalliance support today – Integrates with the IoC container – AspectJ support in Spring 1.1
  • 21. Inversion of Control • Dependency injection – Beans define their dependencies through constructor arguments or properties – The container provides the injection at runtime • “Don’t talk to strangers” • Also known as the Hollywood principle – “don’t call me I will call you” • Decouples object creators and locators from application logic • Easy to maintain and reuse • Testing is easier
  • 22. Non-IoC / Dependency Injection
  • 23. Non-IoC Service Object public class OrderServiceImpl implements IOrderService { public Order saveOrder(Order order) throws OrderException{ try{ // 1. Create a Session/Connection object // 2. Start a transaction // 3. Lookup and invoke one of the methods in a // DAO and pass the Session/Connection object. // 4. Commit transaction }catch(Exception e){ // handle e, rollback transaction, //cleanup, // throw e }finally{ //Release resources and handle more exceptions } }
  • 24. IoC / Dependency Injection
  • 25. IoC Service Object public class OrderSpringService implements IOrderService { IOrderDAO orderDAO; public Order saveOrder(Order order) throws OrderException{ // perform some business logic… return orderDAO.saveNewOrder(order); } public void setOrderDAO(IOrderDAO orderDAO) { this.orderDAO = orderDAO; } • Program to interfaces for your bean dependencies!
  • 26. Spring Bean Definition • The bean class is the actual implementation of the bean being described by the BeanFactory. • Bean examples – DAO, DataSource, Transaction Manager, Persistence Managers, Service objects, etc • Spring config contains implementation classes while your code should program to interfaces. • Bean behaviors include: – Singleton or prototype – Autowiring – Initialization and destruction methods • init-method • destroy-method • Beans can be configured to have property values set. – Can read simple values, collections, maps, references to other beans, etc.
  • 27. Simple Spring Bean Example • <bean id=“orderBean” class=“example.OrderBean” init-method=“init”> <property name=“minimumAmountToProcess”>10</property> <property name=“orderDAO”> <ref bean=“orderDAOBean”/> </property> </bean> • public class OrderBean implements IOrderBean{ … public void setMinimumAmountToProcess(double d){ this. minimumAmountToProcess = d; } public void setOrderDAO(IOrderDAO odao){ this.orderDAO = odao; } }
  • 28. Spring BeanFactory • BeanFactory is core to the Spring framework – Lightweight container that loads bean definitions and manages your beans. – Configured declaratively using an XML file, or files, that determine how beans can be referenced and wired together. – Knows how to serve and manage a singleton or prototype defined bean – Responsible for lifecycle methods. – Injects dependencies into defined beans when served • Avoids the use of singletons and factories
  • 29. Spring ApplicationContext • A Spring ApplicationContext allows you to get access to the objects that are configured in a BeanFactory in a framework manner. • ApplicationContext extends BeanFactory – Adds services such as international messaging capabilities. – Add the ability to load file resources in a generic fashion. • Several ways to configure a context: – XMLWebApplicationContext – Configuration for a web application. – ClassPathXMLApplicationContext – standalone XML application context – FileSystemXmlApplicationContext • Allows you to avoid writing Service Locators
  • 30. Configuring an XMLWebApplicationContext <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/applicationContext.xml </param-value> </context-param> <listener> <listener-class> org.springframework.web.context.ContextLoader Listener </listener-class> </listener>
  • 31. Configuring an XMLWebApplicationContext <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/applicationContext.xml </param-value> </context-param> <servlet> <servlet-name>context</servlet-name> <servlet-class> org.springframework.web.context.ContextLoader Servlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet>
  • 32. Locating a Bean with Struts public abstract class BaseAction extends ActionSupport { protected IOrderService getOrderService() { return (IOrderService) getWebApplicationContext() .getBean("orderService"); } } <bean id=“orderService" class="com.meagle.service.spring.OrderServiceImpl">
  • 34. AOP • Complements OO programming • Core business concerns vs. Crosscutting enterprise concerns • Components of AOP – Aspect – unit of modularity for crosscutting concerns – Join point – well-defined points in the program flow – Pointcut – join point queries where advice executes – Advice – the block of code that runs based on the pointcut definition – Weaving – can be done at runtime or compile time. Inserts the advice (crosscutting concerns) into the code (core concerns). • Aspects can be used as an alternative to existing technologies such as EJB. Ex: declarative transaction management, declarative security, profiling, logging, etc. • Aspects can be added or removed as needed without changing your code.
  • 35. Spring AOP • Framework that builds on the aopalliance interfaces. • Aspects are coded with pure Java code. You do not need to learn pointcut query languages that are available in other AOP implementations. • Spring aspects can be configured using its own IoC container. – Objects obtained from the IoC container can be transparently advised based on configuration • Spring AOP has built in aspects such as providing transaction management, performance monitoring and more for your beans • Spring AOP is not as robust as some other implementations such as AspectJ. – However, it does support common aspect uses to solve common problems in enterprise applications
  • 36. Spring AOP • Supports the following advices: – method before – method after returning – throws advice – around advice (uses AOPAlliance MethodInterceptor directly) • Spring allows you to chain together interceptors and advice with precedence. • Aspects are weaved together at runtime. AspectJ uses compile time weaving. • Spring AOP also includes advisors that contain advice and pointcut filtering. • ProxyFactoryBean – sources AOP proxies from a Spring BeanFactory • IoC + AOP is a great combination that is non-invasive
  • 37. Spring AOP Around Advice Example public class PerformanceMonitorDetailInterceptor implements MethodInterceptor { protected final Log logger = LogFactory.getLog(getClass()); public Object invoke(MethodInvocation invocation) throws Throwable { String name = invocation.getMethod().getDeclaringClass().getName() + "." + invocation.getMethod().getName(); StopWatch sw = new StopWatch(name); sw.start(name); Object rval = invocation.proceed(); sw.stop(); logger.info(sw.prettyPrint()); return rval; } }
  • 38. Spring AOP Advice (Cont’) • Advisor references the advice and the pointcut <bean id="perfMonInterceptor" class= "com.meagle.service.interceptor.PerformanceMonitorDetailInterceptor"/> <bean id="performanceAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor"> <property name="advice"> <ref local="perfMonInterceptor"/> </property> <property name="patterns"> <list> <value>.*find.*</value> <value>.*save.*</value> <value>.*update.*</value> </list> </property> </bean>
  • 40. Wiring Beans Together with Spring
  • 41. Wiring your Persistence Layer <bean id=“mySessionFactory" class= “org.springframework.orm.hibernate.LocalSessionFactoryBean“> <property name="mappingResources"> <list> <value>com/matrix/bo/Order.hbm.xml</value> <value>com/matrix/bo/OrderLineItem.hbm.xml</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect"> net.sf.hibernate.dialect.DB2Dialect </prop> <prop key="hibernate.default_schema">DB2ADMIN</prop> <prop key="hibernate.show_sql">false</prop> <prop key="hibernate.proxool.xml"> /WEB-INF/proxool.xml</prop> <prop key="hibernate.proxool.pool_alias">spring</prop> </props> </property> </bean>
  • 42. Wiring your Transaction Management Four transaction managers available – DataSourceTransactionManager – HibernateTransactionManager – JdoTransactionManager – JtaTransactionManager <bean id=“myTransactionManager" class="org .springframework .orm .hibernate .HibernateTransactionManager"> <property name=“sessionFactory"> <ref local=“mySessionFactory"/> </property> </bean>
  • 43. Wiring a Service Object <bean id=“orderService" class="org.springframework.transaction. interceptor.TransactionProxyFactoryBean"> <property name="transactionManager"> <ref local=“myTransactionManager"/> </property> <property name="target"><ref local=“orderTarget"/></property> <property name="transactionAttributes"> <props> <prop key="find*"> PROPAGATION_REQUIRED,readOnly,-OrderException </prop> <prop key="save*"> PROPAGATION_REQUIRED,-OrderMinimumAmountException </prop> <prop key="update*"> PROPAGATION_REQUIRED,-OrderException </prop> </props> </property> </bean>
  • 44. Defining a Target to Proxy public class OrderServiceSpringImpl implements IOrderService { private IOrderDAO orderDAO; // service methods… public void setOrderDAO(IOrderDAO orderDAO) { this.orderDAO = orderDAO; } }
  • 45. Wiring a Service Object (cont’) <bean id=“orderTarget" class="com.meagle.service.spring.OrderServiceSp ringImpl"> <property name=“orderDAO"> <ref local=“orderDAO"/> </property> </bean> <bean id=“orderDAO" class="com.meagle.dao.hibernate.OrderHibernateD AO"> <property name="sessionFactory"> <ref local=“mySessionFactory"/> </property> </bean>
  • 46.
  • 48. Consistent Abstract Classes for DAO Support • Extend your DAO classes with the proper xxxDAOSupport class that matches your persistence mechanism. • JdbcDaoSupport – Super class for JDBC data access objects. – Requires a DataSource to be set, providing a JdbcTemplate based on it to subclasses. • HibernateDaoSupport – Super class for Hibernate data access objects. – Requires a SessionFactory to be set, providing a HibernateTemplate based on it to subclasses. • JdoDaoSupport – Super class for JDO data access objects. – Requires a PersistenceManagerFactory to be set, providing a JdoTemplate based on it to subclasses. • SqlMapDaoSupport – Supper class for iBATIS SqlMap data access object. – Requires a DataSource to be set, providing a SqlMapTemplate
  • 49. Spring DAO Templates • Built in code templates that support JDBC, Hibernate, JDO, and iBatis SQL Maps • Simplifies data access coding by reducing redundant code and helps avoid common errors. • Alleviates opening and closing connections in your DAO code. • No more ThreadLocal or passing Connection/Session objects. • Transaction management is handled by a wired bean • You are dropped into the template with the resources you need for data access – Session, PreparedStatement, etc. • Code only needs to be implemented in callback methods. – doInXXX(Object) • Optional separate JDBC framework
  • 50. Ex: Code without a template public class OrderHibernateDAO implements IOrderDAO { public Order saveOrder(Order order) throws OrderException{ Session s = null; Transaction tx = null; try{ s = ... // get a new Session object tx = s.beginTransaction(); s.save(order); tx.commit(); } catch (HibernateException he){ // log, rollback, and convert to OrderException } catch (SQLException sqle){ // log, rollback, and convert to OrderException } finally { s.close(); // needs a try/catch block } return order; }
  • 51. Ex: Spring DAO Template Example public class OrderHibernateDAO extends HibernateDaoSupport implements IOrderDAO { ... public Order saveOrder(final Order order) { return (Order) getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException { session.save(order); return order; } }); } ... }
  • 52. Ex 2: Spring DAO Template Example public class OrderHibernateDAO extends HibernateDaoSupport implements IOrderDAO { ... public List findOrdersByCustomerId(int id) { return getHibernateTemplate() .findByNamedQuery(“OrdersByCustomerID”, new Integer(id)); } public Order findOrderById(int orderId ) { return (Order) getHibernateTemplate().load( Order. class, new Integer(orderId)); } ... }
  • 53. Consistent Exception Handling • Spring has it’s own exception handling hierarchy for DAO logic. • No more copy and pasting redundant exception logic! • Exceptions from JDBC, or a supported ORM, are wrapped up into an appropriate, and consistent, DataAccessException and thrown. • This allows you to decouple exceptions in your business logic. • These exceptions are treated as unchecked exceptions that you can handle in your business tier if needed. No need to try/catch in your DAO. • Define your own exception translation by subclassing classes such as SQLErrorCodeSQLExceptionTranslator
  • 54. Spring and Testing • Easier test driven development (TDD) • Integration testing – Can use a standalone Spring configuration with mock objects for testing. – Consider XMLApplicationContext or FileSystemApplicationContext. • Unit testing – Allows you to test outside the container without using the Spring container. • Easy to test POJOs
  • 55. Struts Support • ContextLoaderPlugin - Struts 1.1 PlugIn that loads a Spring application context for the Struts ActionServlet. This context will automatically refer to the root WebApplicationContext (loaded by ContextLoaderListener/Servlet) as parent. • ActionSupport and DispatchActionSupport are pre-built convenience classes that provide easy access to the context. These classes alleviate the need to build custom service locators.
  • 56. Even More Spring Components • JavaMail helpers • Scheduling support via Quartz • Convenience implementation classes for – Remoting support – JAXRPC, RMI, Hessian, and Burlap • EJB support for easier access. • Acegi Security System for Spring • http://acegisecurity.sourceforge.net/ • Very good framework! • Eclipse Plugin – Spring IDE for Eclipse • Coming soon – JMS implementation classes – JMX support
  • 57. Future Trends and Predictions • Traditional J2EE development with EJB will become more POJO based with EJB 3.0 • Lightweight IoC container support will become more popular • Future versions of J2EE will resemble frameworks like Spring and Hibernate for business logic and persistence logic respectively. – EJB 3.0 ~ (Spring + Hibernate) • AOP is gaining momentum as an alternative to providing enterprise services • Annotations will be helpful for applying AOP advice – J2SE 1.5 • IoC + AOP is a great non-invasive combination. • Spring is already available today! • If you are considering EJB 3.0 - Spring will make an easier migration path
  • 58. Demo • Shows an end-to-end implementation using Struts, Spring, and Hibernate. • Demonstrates declarative transaction management with POJOs using Spring Aspect. • Demonstrates working with a custom Spring aspect for performance monitoring. • DAO replacement Hibernate << >> JDBC • Look at some code.
  • 59.
  • 60. Resources • Spring – www.springframework.org • J2EE without EJB – Rod Johnson/ Jurgen Hoeller • Better, Faster, Lighter Java – Bruce Tate • Wiring your Web Application with Open Source Java http://www.onjava.com/pub/a/onjava/2004/04/ 07/wiringwebapps.html
  • 61. Real World EJB Usage • Stateless Session Beans (SLSBs) – One of the easiest beans to program, but still want to program with POJOs. – Local interfaces alleviate remote interface performance issues. – Used as facades to other objects – Allows developers to provide declarative transaction management. • Message Driven Beans (MDBs) – Easy to program – Provides asynchronous messaging • Distributed Transaction Management • RMI Remoting • How do we get the benefits of EJB without using an EJB container?
  • 62. Application Layering (cont) • More Architectural decisions… – How do we achieve independent layers of code that can provide clear separation, loose coupling, and allow communication with each other? – How can we design an architecture that can allow layer replacement without affecting existing layers? – What technologies, and frameworks, should be implemented in each layer? – How will we implement security? – Will the application be flexible to technology changes? – How will the application handle enterprise level services such as transactions, security, logging, resource pooling, profiling, etc?
  • 63. More about the Service Layer • Often tightly coupled with other layers – Struts is not where you place business logic and persistence logic! • The missing link IMHO in most applications today. • EJB – SLSB, SFSB provide the common J2EE business layer enterprise solutions for transactions within a container. What about POJO? • Hand code transaction logic with JTA • Frameworks – Spring, Picocontainer, HiveMind, etc. • Lighterweight containers use – IoC/Dependency Injection – AOP
  • 64. Application Layering (cont) • Where do we code business logic? – Domain objects • Heavy domain model / thin service layer approach • Business logic is embedded in domain objects • Takes advantage of OO programming • Behavior rich domain model – Service Layer • Thin domain model / heavy service layer approach • Wraps procedural business logic over domain objects • Anti-pattern according to Fowler – ‘Anemic Domain Model’ • Provides a separation of business logic concerns from the domain model • Treats the domain model as ORM objects
  • 65. ClassPathXMLApplicationContext • Usually used with a standalone application to obtain a context – Ex: Swing application • Useful when performing integration testing – In-container testing. – Define a separate application context XML file that contains mappings to your mock objects.

Editor's Notes

  1. There are typically four layers within a web container: A presentation layer that concentrates on request/response actions which handles UI. Typically uses an MVC framework. A business service layer to manage transactions and business logic. This is usually not addressed in many applications today or tightly coupled in an inappropriate layer. A persistence layer to communicate with a back-end relational database. A domain object model that can be used across all layers.
  2. Spring MVC – a single shared controller instance handles a particular request type - controllers, interceptors run in the IoC container - allows multiple DispatcherServlets that can share an “application context” - Interface based not class-based
  3. Provides a good alternative to EJB for most applications Provides end-to-end framework for applications.
  4. Inversion of Control has already been referred to as Dependency Injection. The basic principle is that beans define their dependencies (i.e. the other objects they work with) only through constructor arguments or properties. Then, it is the job of the container to actually inject those dependencies when it creates the bean. This is fundamentally the inverse (hence the name Inversion of Control) of the bean instantiating or locating its dependencies on its own using direct construction of classes, or something like the Service Locator pattern. While we will not elaborate too much on the advantages of Dependency Injection, it becomes evident upon usage that code gets much cleaner and reaching a higher grade of decoupling is much easier when beans do not look up their dependencies, but are provided them, and additionally do not even know where the dependencies are located and of what actual type they are. As touched on in the previous paragraph, Inversion of Control/Dependency Injection exists in two major variants: setter-based dependency injection is realized by calling setters on your beans after invoking a no-argument constructor to instantiate your bean. Beans defined in the BeanFactory that use setter-based dependency injection are true JavaBeans. Spring generally advocates usage of setter-based dependency injection, since a large number of constructor arguments can get unwieldy, especially when some properties are optional. constructor-based dependency injection is realized by invoking a constructor with a number of arguments, each representing a collaborator or property. Although Spring generally advocates usage of setter-based dependency injection as much as possible, it does fully support the constructor-based approach as well, since you may wish to use it with pre-existing beans which provide only multi-argument constructors, and no setters. Additionally, for simpler beans, some people prefer the constructor approach as a means of ensuring beans can not be constructed in an invalid state.
  5. The DAO would be injected with a Session/Connection object
  6. For example WebSphere initializes Listeners after Servlets are loaded which is a bad thing in this case.
  7. Remember to discuss how the names of the xml tags map to the Javadoc setters.
  8. DataSourceTransactionManager - PlatformTransactionManager implementation for single JDBC data sources. Binds a JDBC connection from the specified data source to the thread, potentially allowing for one thread connection per data source. HibernateTransactionManager- PlatformTransactionManager implementation for single Hibernate session factories. Binds a Hibernate Session from the specified factory to the thread, potentially allowing for one thread Session per factory. SessionFactoryUtils and HibernateTemplate are aware of thread-bound Sessions and participate in such transactions automatically. Using either is required for Hibernate access code that needs to support this transaction handling mechanism. JdoTransactionManager - PlatformTransactionManager implementation for single JDO persistence manager factories. Binds a JDO PersistenceManager from the specified factory to the thread, potentially allowing for one thread PersistenceManager per factory. PersistenceManagerFactoryUtils and JdoTemplate are aware of thread-bound persistence managers and take part in such transactions automatically. Using either is required for JDO access code supporting this transaction management mechanism. JtaTransactionManager - PlatformTransactionManager implementation for JTA, i.e. J2EE container transactions. Can also work with a locally configured JTA implementation. This transaction manager is appropriate for handling distributed transactions, i.e. transactions that span multiple resources, and for managing transactions on a J2EE Connector (e.g. a persistence toolkit registered as JCA Connector).
  9. TODO -Make sure to discuss naming methods with consistent names and how to handle rollbacks for a bean: &amp;lt;prop key=&amp;quot;add*&amp;quot;&amp;gt;PROPAGATION_REQUIRED,-PortalException&amp;lt;/prop&amp;gt; - TransactionAttributeEditor - A &amp;quot;+&amp;quot; before an exception name substring indicates that transactions should commit even if this exception is thrown; a &amp;quot;-&amp;quot; that they should roll back. RuntimeExceptions will automatically runback when encountered even if they are not declared.
  10. EJB might be necessary for applications that require distributed transaction management or RMI remoting capabilities. IoC for orthogonal business/DAO dependency wiring and AOP for crosscutting concerns