Week 3 - Stateful Session Beans (SFSB) Flashcards

1
Q

SFSB are dedicated to one client (T or F)

A

T

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

SFSB are long-lived (T or F)

A

F

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

SFSB use instance pooling (T or F)

A

F - SLSB do

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

SFSB are susceptible to passivation and activation (T or F)

A

T

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

Why might a stateful session bean implement session synchronization?

A

jakarta.ejb.SessionSynchronization

Allows the bean to take action before or after a transaction.

With session synchronization, you can be sure that your state changes are synchronized with the commit or rollback of the transaction. This ensures data consistency and reliability across the entire transaction.

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

difference between stateful session bean and cdi bean?

A

Stateful Session Beans are used when you need to track client-specific state over multiple method calls (like for user sessions).
CDI Beans are more general-purpose and allow for dependency injection and flexible state management based on different scopes (like session or application-wide state).

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