Debashish
--------------
SCJP2, SCWCD 1.4, PMP, ITIL Foundation, Cloud Foundry Certified Developer, AWS SA Associate
Q (1) When designing a distributed system, remote access to fine-grained objects should be avoided. Why?
A. Thinner clients are possible with coarse-grained objects.
B. Fine-grained objects result in increased network traffic.
C. Fine-grained objects are hard to develop and maintain.
select 2 choices
Q (2) Whose responsibility is it for providing an implementation for the home interface of an EJB?
A. The application assembler.
B. The bean developer.
C. The container and its tools.
D. The bean deployer
select 1
Q (3) What steps does a J2EE developer need to use to get a reference to an existing EJB's home?
A. Get a remote reference to the EJB home by using the JNDI Context lookup() method, passing the name of the EJB's home.
B. Use the RMIRegistry lookup() method to get a remote reference to the EJB home.
C. Cast the EJB home remote reference to the right type by using the PortableRemoteObject.narrow() static method, passing the remote reference and the class of the EJB home.
D. Cast the remote object reference to the right type within Java.
select 3
Q4 Which of the following is TRUE concerning CMP Entity bean activation and passivation?
A. Storage of persistent state to the database is handled automatically by the EJB container during passivation.
B. A client must explicitly activate a bean that has been passivated.
C. Clients do not directly communicate with a bean and are unaware of activation and passivation.
select 1
Q5 In what manner is a reference to an Entity Bean obtained by a client?
A. Invoking the zero-argument public constructor of the bean.
B. Invoking the appropriate create() method of the home interface.
C. Invoking the newInstance() method of the home interface.
D. Invoking the newInstance() method of the bean class.
select 1
Debashish
--------------
SCJP2, SCWCD 1.4, PMP, ITIL Foundation, Cloud Foundry Certified Developer, AWS SA Associate
Q6 A developer buys a set of third party EJBs. Which of the following are included in the EJB .jar file?
A. Bean classes.
B. Remote interfaces.
C. Home interfaces.
D. Source code.
select 3
Q7 Which one of the following statements describes the design that BEST leverages the J2EE architecture?
A. Clients install Swing components on their system which interact via RMI with EJBs on the server, EJBs interact with backend services such as databases.
B. Clients view applets in web browsers, servlets service the client requests on the server and interact with backend services such as databases.
C. Clients view HTML in web browsers, JSP pages service the client requests and interact with EJBs on the server, EJBs interact with backend services such as databases.
D. Clients view HTML in web browsers, CGI scripts service the client requests on the server and interact with EJBs on the server, EJBs interact with backend services such as databases
Select 1
Q8 A servlet counts the number of times it has been called using an incrementCount() method. During testing, the developer verifies that the servlet accurately counts the requests from a number of clients. Which of the following BEST explains this fact?
A. The web or application server supports activation and passivation of the servlet.
B. The HttpServlet class is designed to share state data across all its instances.
C. The same servlet instance services all the requests.
D. The servlet doGet( ) method has been marked as synchronized
Select 1
Q9 Which of the following statements accurately describe the J2EE architecture?
A. Web components provide presentation logic that works well with anonymous clients over the Internet.
B. EJBs provide business logic within the context of transactions and persistence.
C. Web components access EJBs through the same APIs as application clients.
D. Application servers provide the infrastructure for the J2EE architecture
select 3
Q10 Deployment-specific information for an EJB is located in:
A. the bean class's BeanInfo class.
B. the properties variable of the home interface.
C. an XML deployment descriptor.
D. the server's ejb.properties file.
select 1
Q11 Which of the following are TRUE with respect to state management in a web application?
A. It is impossible to determine whether cookies have been enabled on a client browser.
B. URL Rewriting is an alternative to using cookies.
C. URL Rewriting does not require any client side configuration.
D. HttpSession information is available to JavaScript code in a web page.
select 2
Q12 A stateful Session bean is to be created. Which of the following objects are necessary?
A. A primary key.
B. A home interface.
C. A bean class.
D. A passivation class.
select 2
Q13 Most web applications require logic for validating form input and determining the next page to display. Given long term maintenance and reuse objectives, what is the BEST design to implement this logic?
A. A JSP that both validates form input and determines the next page.
B. Validate form input in a JSP and determine the next page in a servlet.
C. Validate form input in a servlet and determine the next page in a JSP.
D. A servlet both validates form input and determines the next page.
select 1
Q14 Which of the following MUST be declared for a CMP Entity Bean in its deployment descriptor?
A. Bean class.
B. Database connection factory reference.
C. Home and remote interfaces.
D. Primary key class
select 3
Q15 A Proxy design pattern is one where a surrogate or placeholder for an object is used to communicate with an object that is not locally available. Which of the following J2EE technologies use proxies that are visible to a developer?
A. JNDI
B. RMI
C. JSP
D. EJB
select 2
Q19. When comparing servlets and JSPs, which of the following are TRUE?
A. JSPs provide better performance than servlets.
B. JSPs may call servlets and servlets may also call JSPs.
C. A JSP must be compiled into a servlet before it can be used.
D. Initialization and destruction behavior is supported in both servlets and JSPs.
select 3
Q20. Implementing the SingleThreadModel interface :
A. requires all servlet methods be declared as synchronized.
B. guarantees that synchronization problems will never occur.
C. may have a negative impact on performance.
D. prevents multiple HTTP request threads from accessing a single servlet instance concurrently
select 2
Q22. Which of the following implicit page objects are available for a JSP error page, that is, one with an "isErrorPage=true" page directive?
A. application
B. throwable
C. exception
D. config
select 3
Q 24. A stateful Session bean is being passivated by its container. Assuming all fields are non-transient, which of the following values will still exist following passivation?
A. null.
B. A JDBC Connection.
C. An Entity bean.
D. A SessionContext.
E. A UserTransaction.
select 4
Debashish
--------------
SCJP2, SCWCD 1.4, PMP, ITIL Foundation, Cloud Foundry Certified Developer, AWS SA Associate
Q (2) Whose responsibility is it for providing an implementation for the home interface of an EJB?
A. The application assembler.
B. The bean developer.
C. The container and its tools.
D. The bean deployer
select 1
Who else but (B) the EJB Developer
Regards,
James
Originally posted by Michael Arndt:
Hmmm, you sound quite sure, but did you really ever write a home interface implementation? Or a remote interface implementation?
Debashish
--------------
SCJP2, SCWCD 1.4, PMP, ITIL Foundation, Cloud Foundry Certified Developer, AWS SA Associate
It's a pleasure to see superheros taking such an interest in science. And this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|