Which three methods can Bean Developer use in any EJB compliant container implementing the full Java EE6 product?

Which three methods can Bean Developer use in any EJB compliant container implementing the
full Java EE6 product? (Choose three.)

Which three methods can Bean Developer use in any EJB compliant container implementing the
full Java EE6 product? (Choose three.)

A.
Class.getClassLoader

B.
FileInputStream.read

C.
DataSource.getConnection

D.
EJBContext.getCallerPrincipal

E.
Executors.newSingleThreadExecutor

F.
QueueConnection.createQueueSession

Explanation:
D: UseEJBContext.getCallerPrincipal()to obtain the java.security.Principal that
identifies the caller.

Incorrect:
A: Do not load native libraries.
E: Not allowed:Starting, stopping, or managing threads in any way. That restriction eliminates the
possibility of conflicts with the EJB container’s responsibilities of managing locking, threading, and
concurrency issues.
Reference:Programming restrictions on EJB
Reference:javax.ejb Interface EJBContext



Leave a Reply 3

Your email address will not be published. Required fields are marked *


Figaro

Figaro

Enterprise Java Bean is not allowed to use java.io package to attempt to access files and directories in the file system.
B is incorrect.

CDF are correct answers.