Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
30 Cards in this Set
- Front
- Back
What is Spring? |
An open-source Java application framework that streamlines development through use of Inversion of Control in its modules. |
|
What are common Spring modules? |
Core, Context, AOP, MVC, Data, Boot, ORM |
|
What are some exceptions from common Spring modules? |
BeanInitializationException, AOPConfigException, NestedCheckedException, HttpRequestMethodNotSupportedException |
|
What is an aspect? |
Is the "what" you are injecting. This is usually a function. |
|
What is a join point? |
The "where you can inject." It is the place a new service will be added into the normal flow of the business method. This point could be a method being called, an exception being thrown, or even a field being modified. |
|
What is a point cut? |
The "where" advice should be executed. The join points an advice should be executed on. |
|
What is an advice? |
The "when" to inject. Executes either Before, After Returning, After Throwing, or Around the targeted method execution. |
|
What do @Before, @After, @AfterThrowing, @AfterReturning, and @Around do? |
@Before is before the method is executed. @After is after the method is executed, regardless of success or failure. @AfterReturning is only upon success. @AfterThrowing is only upon failure. @Around occurs before and after the method execution. |
|
@Pointcut |
Provides a name the can be used by advice annotations to refer to that pointcut. |
|
@ProceedingJoinPoint |
Declares the point where the method execution should continue during an Around advice. |
|
@Component |
Marks a java class as a spring bean and enables it to be found and pulled into the application context. |
|
@Aspect |
A class that performs functionality for cross-cutting concerns. |
|
What is IOC? |
Inversion of Control. It is the concept of the developer giving control to a container. |
|
What is AOP? |
Aspect-oriented programming. It aims to increase the modularity by allowing separation of cross-cutting concerns through the use of aspects. It adds behaviors without modifying the code itself. |
|
What is a cross-cutting concern? |
A problem that spans several areas of a program. Examples are logging and transactions. |
|
What is dependency injection? |
Required objects, or dependencies, are given from a container upon creation of that reference/dependency. |
|
What are the different forms of dependency injection? |
Setter, constructor, and interface. |
|
What is a bean factory? |
Older system that fetches objects lazily. |
|
What is an application context? |
A BeanFactory with more features, such as text messaging, generic resource loaders, and bean event listeners. It fetches bean eagerly. |
|
What is JNDI? |
Java Naming and Directory Interface. It is a Java API that provides a unified interface to multiple naming and directory services. It is used to organize and locate components in a distributed computing environment. |
|
What is the lifecycle of a Spring bean? |
Find bean, instantiate bean, inject bean, bean name aware, bean factory aware, bean post processing before intialization, init, post processing after initialization, destroy. |
|
What are the scopes of beans? |
Singleton, Prototype, Request, Session |
|
What is bean wiring? |
The creation of associations between java classes within Spring. |
|
What is auto wiring? |
It enables Spring to resolve dependency relationships between collaborating beans without using explicit element naming. The order of resolution is by name, by type, by constructor, default, and no. |
|
What is an ORM and what does it do? |
Object Relational Mapping bridges the gap between java objects and tables in a database. It consists of a database and POJOs that are mapped to tables and properties of the POJOs that are mapped to the columns in the table. |
|
What is Hibernate? |
Hibernate is a Java ORM for bridging the gap between Java OOP and SQL. |
|
What are core interfaces for Hibernate? |
SessionFactory, Transaction, Session, Query, Criteria and Configuration. |
|
What is the difference between L1 and L2 cache for Hibernate? |
L1 cache is automatically provided by Hibernate. An L2 cache must be explicitly set up, and can use a number of distributed caches for setup, one of which is EH Cache. |
|
Where do you configure Hibernate, and what does it need? |
hibernate.cfg.xml, or hibernate.properties. It requires information about the database to be accessed, including location, dialect, driver, username, and password. If you are using JNDI, you need to give a location to the datasource that it can pull connection data from (location, username, password). This file should sit at the application root, or META-INF for web. |
|
What is the difference between ordering and sorting in Hibernate? |
The correct answer is: Sorting uses Java collections sorting, and ordering uses the SQL order by clause |