Ask questions and see you at July 1st, 8 pm CET: youtube.com/c/bienadam
Also checkout recent episode:
Please keep the questions as short and as concise as only possible. Feel free to ask several, shorter questions. I will also cover some questions in my "shorts" youtube.com/@bienadam/shorts between the shows.
Upcoming airhacks.tv events are also going to be announced at meetup.com/airhacks
New: the airhacks.tv discord server: discord.gg/airhacks
Hi Adam,
I have several questions about CDI and EJB in Jakarta 10 (or 11). I split them into different comments. Feel free to skip between them to others' questions and come back to them later.
Passivation
@Stateful
EJBs can be passivated. Is passivation still considered useful? It requires all the object graph to be Serializable, which is something Java is trying to move away from. CDI's@ConversationScoped
,@SessionScoped
and@RequestScoped
can also hold state, but aren't passivated. Is there a reason to use@Stateful
considering that the trend is to move from EJB to CDI?Simplified use case: 5 users need to guess a number that the server generates. Each client sends its guess, the server waits until all clients send their guesses, then returns a win/lose response to each client. How should the class that holds the guesses be annotated?