Spring Flashcards

1
Q

What is Dependency Injection

A

A design pattern that passes concrete instances during object creation or initialization

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the different cloud models and what do we get in each that we don’t in another.

A

OnSite: We manage Application, Data, Runtime, O/S, Middleware, Virtualization, Servers, Secutiy, Networking.
IAAS (EC2) : We manage Application, Data, Runtime, O/S, Middleware.
PAAS (Elastic Beanstalk): We manage Application and data
SAAS: everything is provided.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What calls the bean lifecycle and what is it?

A
Make a request to the IOC container
Instantiate object
Populate the properties
setBeanName
setBeanFactory
Preinitialization
CustomInit 
PostInitilization
Then it's ready and in use
Destroy
Custom Destroy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Difference between a JoinPoint and a PointCut

A

A joinpoint is a place where advice can be injected in the method execution. A pointcut is a set of joinpoints and it tells Spring which joinpoints out of the cluster of joinpoints that you want to have that advice given to.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Different types of annotations

A
@Aspect
@Component
@Before
@After
@AfterThrowing
@AfterReturning
@Around
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the beans that we need to configure in Spring ORM

A

DataSource which holds our DB credentials. This is then injected into the SessionFactory which holds our hibernate specific configurations, and then is injected into either our DAOs or the TransactionManager

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does the @Transactional do

A

This indicates that we want the annotated method to execute in the context of a transaction and we want that transaction managed by Spring.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What’s JSR 303?

A

Bean Validation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly