Free Cheat-test Samples and Demo Questions Download
Adobe exams Adobe
Apple exams Apple
Avaya exams Avaya
Check Point exams Check Point
Cisco exams Cisco
Citrix exams Citrix
CIW exams CIW
CompTIA exams CompTIA
CWNP exams CWNP
EC-Council exams EC-Council
EMC exams EMC
Exin exams Exin
Fortinet exams Fortinet
GIAC exams GIAC
Hitachi exams Hitachi
HP exams HP
IBM exams IBM
Isaca exams Isaca
ISC exams ISC
ISEB exams ISEB
Juniper exams Juniper
LPI exams LPI
McAfee exams McAfee
Microsoft exams Microsoft
Oracle exams Oracle
PMI exams PMI
Riverbed exams Riverbed
SNIA exams SAP
Sun exams SAS
Symantec exams Symantec
VMware exams VMware
All certification exams

IBM 000-484 Exam - Cheat-Test.com

Free 000-484 Sample Questions:

1.A developer successfully creates and tests a stateful Session Bean. Following deployment, intermittent NullPointerExceptions begin to occur, particularly when the server is heavily loaded. Which bean method is MOST likely to be related to the problem?
A.setSessionContext
B.ejbCreate
C.ejbPassivate
D.beforeCompletion
E.ejbLoad
Answer: C

2.A developer implements a BMP entity bean which uses a relational database. Identify the lifecycle methods that involve database access.
A.ejbCreate()
B.ejbPostCreate()
C.ejbActivate()
D.ejbPassivate()
E.ejbRemove()
Answer: A, E

3.An EJB that is deployed with container­manager transaction contains a business method. This method performs an operation that potentially throws a NullPointerException. If this occurs, the bean cannot recover and should rollback its transaction. What is the BEST way to implement this scenario?
A.Catch the NullPointerException exception, then throw an application exception. The container will rollback the transaction automatically.
B.Catch the NullPointerException exception, then throw an application exception that wraps the original exception. The container will rollback the transaction automatically.
C.Catch the NullPointerException exception, call setRollbackOnly(), thus forcing a rollback of the transaction, then throw an application exception.
D.Do nothing and let the NullPointerException propagate to the container. The container will rollback the transaction automatically.
Answer: C

4.Which of the following are TRUE regarding ejbPostCreate() methods?
A.Only entity beans have ejbPostCreate() methods.
B.ejbPostCreate() method signatures must match ejbCreate() method signatures.
C.ejbPostCreate() methods are optional.
D.Corresponding postCreate() methods exist in the bean's home interface.
E.ejbPostCreate() is called by the EJB container following creation of the bean's EJBObject.
Answer: A, B, E

5.Which of the following represents the order in which a stateful session bean's methods might get executed, according to its life cycle?
A.ejbPassivate(), setSessionContext(), ejbActivate(), ejbRemove().
B.ejbActivate(), setSessionContext(), ejbPassivate(), ejbRemove().
C.setSessionContext(), ejbActivate(), ejbPassivate(), ejbRemove().
D.setSessionContext(), ejbPassivate(), ejbActivate(), ejbRemove().
Answer: D

6.An EJB is required to hold a customer's address information. This information must be made available to future customer transactions. The bean must be deployable to any EJB server. The exact server runtime configuration is unknown. Which bean type BEST suits these requirements?
A.A stateless session bean.
B.A stateful session bean.
C.A BMP entity bean.
D.A CMP entity bean.
E.A message­driven bean.
Answer: D

7.The remote home interface for an EJB only contains a single method. The signature of this method is create(int xyz). What type of bean MUST it be?
A.stateless session bean
B.stateful session bean
C.BMP entity bean
D.CMP entity bean
E.message­driven bean
Answer: B

8.Two entity beans share a bidirectional, container­managed relationship (CMR). What statements are TRUE regarding these beans? .
A.None of the entity beans need to have a local interface.
B.Only one of the two entity beans MUST have a local interface; the other bean can have either a remote or a local interface.
C.Both entity beans MUST have local interfaces.
D.None of the entity beans have to be container­managed­persistence (CMP) beans.
E.Only one of the two entity beans MUST be a container­managed­persistence (CMP) bean. The other bean can be either a container­managed (CMP) or bean­managed (BMP) bean.
F.Both entity beans must be container­managed persistence (CMP) beans.
Answer: C, F

9.Which of the following are TRUE about primary keys and entity beans?
A.All entity beans must have a findByPrimaryKey(primaryKey) method implemented in the bean class.
B.All entity beans must have a findByPrimaryKey(primaryKey) method declared in each home interface.
C.All primary key classes must be legal value types in RMI­IIOP.
D.A custom primary key class must be defined.
E.Entity beans must be located using the findByPrimaryKey(primaryKey) method.
Answer: B, C

10.An EJB is required to model the catalog object of a "J2EE Book Store". The catalog object represents different categories and products and provides browsing and searching services to its clients. Also, it only reads catalog data from the underlying database. Which of the following designs BEST suits the requirement?
A.stateless session bean with Data Access Object (DAO)
B.stateful session bean with Data Access Object (DAO)
C.BMP entity bean with DAO Data Access Object (DAO)
D.CMP entity bean
Answer: A

11.An EJB is required to process order fulfillment. No immediate reply is required by the client, but a confirmation email is expected instead when the order is fulfilled. Which bean type BEST suits the requirements?
A.stateless session bean
B.stateful session bean
C.BMP entity bean
D.CMP entity bean
E.message­driven bean
Answer: E

12.A developer sets up a topic with a message­driven bean. During testing, the developer notes that messages are lost when a client disconnects. What possible changes will ensure that all unexpired messages are delivered when a client has been disconnected?
A.Use a queue instead of a topic.
B.Code the onMessage() method in the client code so that no acknowledgement is sent until after the messages have completed processing.
C.Specify Durable in the deployment descriptor for the topic.
D.Design the client code to implement the javax.jms.MessageListener interface.
Answer: A, C

13.An EJB client initializes and begins a transaction. It then invokes a bean business method. The bean uses container­managed transaction demarcation. The business method executes within the scope of the client supplied transaction. Which of the following are possible values for the bean method's transaction attribute?
A.NotSupported
B.Supports
C.Required
D.RequiresNew
E.Mandatory
Answer: B, C, E

14.Which of the following are TRUE regarding CMP entity beans that conform to the EJB 2.0 specification?
A.Container managed fields must be declared as public.
B.The primary key definition is stored in the deployment descriptor and can be determined at deployment time.
C.The EJB QL statements for any finder methods are stored in the deployment descriptor.
D.Moving the CMPs database to a different server (machine) requires recompilation of the bean.
Answer: B, C

15.A stateful Session bean is deployed using the container­managed transaction demarcation attribute RequiresNew. Which of the following are TRUE regarding exceptions in its business methods?
A.Transaction rollback occurs automatically when an application exception is thrown.
B.Transaction rollback occurs automatically when a system exception is thrown.
C.Transaction rollback restores bean state.
D.If EJBException is thrown by a business method, it must be declared in its throws clause.
E.Application exceptions should normally be passed directly through to the caller.
Answer: B, E

16.Identify the order in which the following events occur when invoking a remote method through RMI.
A.(1) The server object is instantiated. (2) The server object is bound in the RMI Registry (3) A reference to the server object is obtained by the client. (4) A message describing the method and its parameters is sent to the server object by the client for invocation.
B.(1) The server object is instantiated. (2) The server object is bound in the RMI Registry (3) A message describing the method and its parameters is sent to the server object by the client for invocation. (4) A reference to the server object is obtained by the client.
C.(1) A message describing the method and its parameters is sent to the server object by the client for invocation. (2) The server object is instantiated. (3) The server object is serialized and copied to the client.
(4) A reference to the server object is obtained by the client.
D.(1) The server object is bound in the RMI Registry. (2) A reference to the server object is obtained by
the client. (3) A message describing the method and its parameters is sent to the server object by the client for invocation. (4) The server object is serialized and copied to the client.
Answer: A

17.There is a requirement to implement a Filter called ClickFilter that will be invoked for every servlet invocation, in order to remember a User's click trail. Additionally, servlets that perform an update action need to be configured with an AuditFilter that logs the time the update occurred, the values before update and the value after update and the user id performing the update. All update servlets have /update in their context path and extend a base servlet class called UpdateServlet. Which of the following Filter configurations MUST be used to satisfy these requirements?
A. ClickFilter /*
B. ClickFilter /*
C. AuditFilter /UpdateServlet
D. AuditFilter /update/*
Answer: A, D

18.To optimize resource usage, a developer would like to explicitly release resources associated with a particular HttpSession when the session times out or the user logs out. Which of the folowing tasks MUST be performed to implement this requirement?
A.Implement the javax.servlet.http.SessionPassivationListener interface.
B.Implement the javax.servlet.http.HttpSessionListener interface.
C.Implement the javax.servlet.http.HttpSessionBindingListener interface.
D.Configure the listener implementation in the Web application deployment descriptor.
E.Configure the listener implementation in the enterprise application deployment descriptor.
Answer: B, D

19.Which of the following steps should be performed to make use of Tag libraries in the MOST
flexible manner?
A.Install the Tag implementation JAR file in the \WEB­INF\lib directory.
B.Define a URI for the Tag library, using the element in TLD.
C.Define the physical location for the tag library in the web application deployment descriptor.
D.Import the tag library in the JSP using the uri attribute of the taglib directive.
E.Import the tag library in the JSP directly using its physical location.
F.Create a separate directory to install the Tag implementation JAR files.
Answer: B, C, D

20.Which of the following statements are true with regard to JSP pages written using XML syntax?
A.The element is used to introduce the namespace for custom tags in the page.
B.A JSP source file can intermix standard JSP syntax and XML source file.
C.A JSP source file in XML syntax CAN include via a directive, a JSP source file in JSP syntax.
D.A JSP source file in JSP syntax CANNOT include via a directive, a JSP source file in XML syntax.
E.A attribute MUST be provided for every tag library to display translation time error messages.
Answer: A, C

21.To extract the parameters of an HTTP GET request, a servlet MUST:
A.implement a constructor that takes a URL as a parameter and parse it.
B.implement a doGet() method that takes a String as a parameter and parse it.
C.implement a method that takes a String as a parameter and parse it.
D.ask the servlet request object for a certain parameter.
Answer: D

22.A single BankAccount instance exists on the application server for each customer. Thread safety concerns have been raised at a recent project meeting when accessing the BankAccount objects via the Web. Of specific concern is concurrent access to the single BankAccount instance
for a customer. Which of the following are possible solutions to resolve threading concerns?
A.Ensure that the doGet() and doPost() methods of all servlets accessing the BankAccount are synchronized.
B.Ensure that all BankAccount methods are synchronized.
C.Ensure that all servlets acquire the BankAccount lock before performing any update operations.
D.Place the shared BankAccount object in an HttpSession.
Answer: B, C

23.A "fat controller" is created while refactoring duplicated control code from multiple JSP views. Which of the following patterns can be used to further improve the design?
A.Front Controller ­ Command and Controller Strategy
B.Front Controller ­ JSP Front Strategy
C.View Helper
D.Service Locator
Answer: A, C

24.In which of the following ways can a server effectively use JavaServer Pages?
A.A request is received by a JSP. The JSP accesses JavaBeans to perform specific functions and uses these JavaBeans to generate dynamic HTML and presents it back to the client.
B.A request passes from a JSP to a servlet. The servlet accesses BeanInfo objects that perform specific functions and uses the BeanInfo objects to generate dynamic HTML and present results back to the client.
C.A request is received by a servlet which uses request dispatcher to include or forward to a JSP to present textual data results back to the client.
D.A request is received by a servlet which uses request dispatcher to include or forward to a JSP to output binary content back to the client.
Answer: A, C

25.A Web application must be secured using the Secure Socket Layer (SSL) protocol. An HttpSession will be used to store a client's BankAccount object between requests. Given these requirements, which of the following statements are TRUE?
A.The BankAccount class must implement the Serializable interface.
B.BankAccount objects must first be encrypted before being added to the HttpSession.
C.Either cookies or URL rewriting may be used for associating the HttpSession with the client browser.
D.SSL's support for HTTP Tunneling would allow a BankAccount to be serialized and sent to the Web browser, and can be accessed through JavaScript.
Answer: A, C

26.Which of the following is FALSE with respect to error handling when building a Web application?
A.Servlets must catch all possible exceptions.
B.Each JSP may specify a unique error page to handle any exceptions which may occur during its execution.
C.Unhandled exceptions that occur in a JSP may be handled by the user­defined servlet that invoked the JSP.
D.Custom, user­defined exceptions can be thrown from within a JSP.
Answer: A

27.A J2EE Web application needs to be integrated with a legacy Mainframe application. It is cost prohibitive to rewrite the legacy application programs in Java. What J2EE technology would be BEST suited to integrate these programs with the Web application?
A.Use JDBC to invoke the Mainframe application programs from the Web application.
B.Implement an enterprise messaging infrastructure that supports JMS to integrate with the Mainframe application programs.
C.Use EJB CMP beans to access the Mainframe application programs.
D.Use the CICS for Java API to access the application programs.
Answer: B

28.Which of the following services are guaranteed to be provided by a JDBC 2.0 Driver that implements the javax.sql.ConnectionPoolDataSource?
A.distributed transaction support
B.connection pooling
C.connection event listening
D.savepoint services
Answer: B, C

29.An application following best practices while using a javax.sql.DataSource to connect to a database should:
A.create an instance of DataSource using the default constructor.
B.retrieve a DataSource using a JNDI lookup.
C.load an appropriate driver class, for example Class.forName("XyzDriver").newInstance().
D.provide a URL identifying the required database, for example dataSource.getConnection("jdbc:odbc:Northwind").
E.close all ResultSets, Statements, and Connections upon completion.
Answer: B, E


© 2014 Cheat-Test.com, All Rights Reserved