1Z0-900 · Question #2
Which two capabilities are provided by the Java Authentication and Authorization Services (JAAS) API? (Choose two.)
The correct answer is D. the ManagedTaskListener interface. There's a notable issue with this question worth flagging before the explanation: the options listed are not JAAS concepts. JAAS deals with authentication/authorization security (LoginModule, Subject, CallbackHandler, etc.). These options relate to Java EE Concurrency Utilities…
Question
Which two capabilities are provided by the Java Authentication and Authorization Services (JAAS) API? (Choose two.)
Options
- Athe Runnable Interface
- Bthe ManagedExecutorTask interface
- Cthe TaskEventListener interface
- Dthe ManagedTaskListener interface
How the community answered
(47 responses)- A4% (2)
- B2% (1)
- C2% (1)
- D91% (43)
Explanation
There's a notable issue with this question worth flagging before the explanation: the options listed are not JAAS concepts. JAAS deals with authentication/authorization security (LoginModule, Subject, CallbackHandler, etc.). These options relate to Java EE Concurrency Utilities (JSR-236). This appears to be a mislabeled or incorrectly sourced exam question.
On the options themselves:
D is correct because ManagedTaskListener is a real Java EE interface (in javax.enterprise.concurrent) that provides lifecycle callbacks - taskSubmitted, taskStarting, taskDone, and taskAborted - allowing you to monitor tasks submitted to managed executors. It is a legitimate concurrency API.
A is wrong because Runnable is a core Java (java.lang) interface, not specific to managed concurrency or JAAS - it's too foundational to count as a distinctive API capability.
B is wrong because ManagedExecutorTask is not a standard Java EE interface name. The real interface is ManagedExecutorService. This is a plausible-sounding distractor.
C is wrong because TaskEventListener is not a standard Java EE or JAAS interface - another fabricated distractor designed to sound plausible.
Memory tip: The prefix Managed signals Java EE managed concurrency. When you see ManagedTaskListener, think "it listens to task lifecycle events in a managed container" - that's its exact purpose and it's real. If an interface name sounds almost right but isn't quite (ManagedExecutorTask, TaskEventListener), it's likely a trap.
Exam caution: If this question appeared on a real exam, the "Choose two" instruction with only one listed correct answer suggests the answer key may be incomplete or the question itself has errors. Flag it if possible.
Topics
Community Discussion
No community discussion yet for this question.