0% found this document useful (0 votes)
30 views3 pages

Thi EJB

The document contains 16 multiple choice questions about Java Enterprise Edition topics like dependency injection, CDI, EJB, and Jakarta EE. The questions cover concepts such as qualifiers, scopes, deployment descriptors, and the migration from Oracle to Eclipse Foundation.

Uploaded by

pthiena22013
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views3 pages

Thi EJB

The document contains 16 multiple choice questions about Java Enterprise Edition topics like dependency injection, CDI, EJB, and Jakarta EE. The questions cover concepts such as qualifiers, scopes, deployment descriptors, and the migration from Oracle to Eclipse Foundation.

Uploaded by

pthiena22013
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Câu 1: Which of the following is NOT one of the main approaches for injecting beans

into other beans in CDI?


a) Employing annotations
b) Making use of the beans.xml file
c) Using Jakarta code
d) Using the unified EL
Cau 2: What annotation is used to resolve autowiring conflicts when there are multiple
beans of the same type?
a) @Bean
b) @Component
c) @Qualifier
d) @Inject
Cau 3: Enterprise beans are frequently used to provide the business logic of a Web
application and can be packaged within a ____ module of the Web application
a) EAR
b) WAR
c) RAR
d) JAR
Cau 4: DI is a kind of IoC that deals with decoupling dependencies between high-level
and low-level layers by means of ____
a) Shared contexts
b) Shared abstractions
c) Shared dependencies
d) Shared components
Cau 5: What is the function of a deployment description in a Jakarta EE unit?
a) To provide functional component or component
b) To specify location-specific information during deployment
c) To have an optional content description
d) All of these
Cau 6: The Jakarta EE security environment ___ security constraints to be defined at
deployment time, in contrast to other enterprise application models that demand platfrom-
specific security measures in each application.
a) Does not allow
b) Allows
c) Demand
d) Does not demand
Cau 7: According to the instructions provided in the deployment descriptors, the archive
files are deployed onto the ___
a) Client
b) Application server
c) Database
d) File system
Cau 8: The ___ of a bean helps determine the lifecycle of its instances and which clients
refer to which bean instances.
a) Instance
b) Class
c) Object
d) Scope

Cau 9: Different flavors of java are differentiated based on the ___ provided for the
development of various kinds of applications.
a) Languages
b) Platforms
c) Packages
d) Libraries
Cau 10: The <class> element in the persistence.xml file represents which files that
operate upon the persistence unit.
a) Archive files
b) Class files
c) Mapping-file
d) Transaction-type
Cau 11: The parameters of the method injection must all be valid____beans.
a) CDI
b) JSF
c) Java
d) POJO
Cau 12: The <mapping-file> element in the persistence.xml file is used to specify the ___
for the entity classes.
a) Object-relational mapping
b) Transaction-type
c) Provider
d) Classfiles

Cau 13: The deployment descriptor for the EJB modules is ___and for Web modules it is
___
a) Ejb-jar.xml and web.xml
b) Ejb.xml and web-jar.xml
c) Jar-ejb.xml and xml-web
d) Ejb-deploy.xml and web-deploy.xml
Cau 14: Constructor injection occurs when a bean constructor is annotated with the
@Inject annotation and one or more parameters. The container will ____all parameters.
a) Ignore
b) Resolve
c) Instantiate
d) call
Cau 15: After migrating from Oracle to the Eclipse Foundation, Jakarta Enterprise
Edition EE 9 (Jakarta EE) now makes use of package namespace___rather than javax.
a) Java
b) Org.*
c) Jakarta.*
d) Ee.*
Cau 16; In jakarta EE platform, the declarative style of programming is made possible by
___ that includes both programmatic and declarative security concepts
a) Annotations
b) Programmatic API
c) Deployment descriptor
d) beans

You might also like