Week 2 - Container services Flashcards

1
Q

What are some container services?

A
  • Dependency Injection
  • Concurrency
  • Security
  • Transactions
  • Instance pooling
  • Lifecycle callbacks
  • Interceptors
  • Persistence
  • Timers
  • Naming and Object Stores
  • Interoperability
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Stateless and stateful session beans support concurrent access (T or F)

A

F

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

Message drive beans handle one message at a time (T or F)

A

T

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

Persistence/Entity beans may be accessed concurrently (T or F)

A

T

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

Clients never access EJBs directly (T or F)

A

T

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

What are naming and object stores?

A

Java Naming and Directory Interface (JNDI) used for naming services so that the client can look it up.

(An abstraction for service access)

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

what is Interoperability?

A

Interoperability refers to the ability of different systems, technologies, or applications to work together and exchange data or services effectively. It allows different software and hardware components, often from different vendors or platforms, to communicate and function together seamlessly.

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

Describe the activation mechanism used by containers.

A

Stateful session beans maintain client state.

Client state can be passivated or activated by the server to manage memory.

Passivation is like a temporary deletion that can be recovered.

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

What is a lifecycle callback?

A

Annotated methods that trigger with lifecycle events

@jakarta.ejb.PrePassivate
@jakarta.ejb.PostActivate

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

What is an interceptor?

A

Factor out common code required over several methods.

Modifies behavior before or after method called (intercept)

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

What are two ways to configure/utilize a container?

A

Annotations, XML descriptors.

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

What are local or remote session beans

A

Client running in same JVM (local INTERFACE)
@jakarta.ejb.Local

Client running in different JVM (remote INTERFACE)
@jakarta.ejb.Remote

Recall timesheet app, interface for client to interact with session information.

@Local(CalculatorLocalBusiness.class) -> defines interface for session bean
@LocalBean -> no interface for session bean

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