
test287,enterprise appl.dev.with websphere studio v5.0 : 000-287 Exam
Known also as the IBM Enterprise Application Development with IBM WebSphere Studio, V5.0 (000-287), this exam plays an integral role in obtaining your certification. All IBM certification exams are extremely detailed and cover many different technological areas. We designed the 000-287 questions and answers for this very purpose, to prepare you for the unexpected. Beyond the testing center, the skills you learn and the knowledge you confirm using the 000-287 practice exams and exam simulators will translate directly into your daily work environment.
1.A developer discovers that an exception being thrown from a business method on an entity
bean does not cause the transaction to rollback; a rollback was expected. What would correct this problem?
A.Ensure that the business method throws an instance of javax.jts.TransactionRolledbackException. B.Ensure that the business method marks the current transaction for rollback by calling the setRollbackOnly() method on the EJBContext.
C.Call rollback() on the current UserTransaction object. D.Call rollback() on the EJBContext.
E.call setRollbackOnly() on the UserTransaction object.
Correct:B
2.A developer is writing a task() method, in a session bean, which makes use of several entity beans to perform a task. The session bean must record the invocation of the task using a LogEntry entity bean. The log entry must NOT be made if the task fails. Assume that the LogEntry bean is configured with ‘Supports’. In order to GUARANTEE this behavior, the task() method of the session bean should be configured as:
A.beanmanaged transaction and explicitly begin an UserTransaction before creating the LogEntry instance and performing the task logic. Finally, have the task() method commit or rollback the transaction based on the success/failure of the task.
B.’Supports’. Within the task() method, create the LogEntry instance and perform the task logic. Finally, have the task method() call sessionContext.setRollBackOnly() if the task logic fails.
C.’RequiresNew’. Within the method, create the LogEntry instance and perform the task logic. Finally, have the task() method call sessionContext.setRollBackOnly() if the task fails.
D.’Mandatory’. Within the method, create the LogEntry instance and perform the task logic. Finally, have the task() method call sessionContext.setRollBackOnly() if the task fails.
Correct:A C
3.While developing an EJB for an EJB 2.0 compliant server, a developer runs into a problem. Whenever the method ejbContext.getUserTransaction() is called, an IllegalStateException is thrown. Which of the following are possible causes for this behavior?
A.The bean is an entity bean. B.The bean is a session bean.
C.A transaction has not been started.
D.Containermanaged transaction demarcation is being used.
Correct:A D
4.Customer and Address are BMP entity beans. The ejbCreate method for Customer is passed values for the properties of the Customer’s address and it is necessary to ensure that an Address Entity is created as part of the same transaction that creates the Customer. Assuming the Address requires a reference to the Customer and there are no foreign key constraints enforced by the database, the BEST way to create the Address is to:
A.Insert the Address data into the address table in the ejbCreate method of Customer. B.Insert the Address data into the address table in the ejbPostCreate method of Customer. C.Invoke the create() method of AddressHome from the ejbCreate method of Customer.
D.Invoke the create() method of AddressHome from the ejbPostCreate method of Customer.
Correct:D
5.A developer is writing a session bean which makes use of several entity beans to perform a task.
The session bean must record the invocation of the task using a LogEntry entity bean. The log entry must be made regardless of the success of the task. What supports BEST this behavior? A.Provide two distinct operations on the session bean that would be invoked in sequence by the client code; one for creating the LogEntry and one for performing the task.
B.Use ‘RequiresNew’ transaction attribute on the LogEntry bean to ensure that the creation of the
LogEntry occurs on a separate transaction.
C.Use ‘Mandatory’ transaction attribute on the LogEntry bean to ensure that the creation of the LogEntry occurs on a separate transaction.
D.Have the task session bean invoke a createLogEntry() method on another session bean to ensure that the LogEntry is created outside the task transaction.
Correct:B
6.Refer to the exhibit to answer the question. The servlet filter, IntegerFilter, is used to retrieve a parameter from the HTTP request, convert it to an Integer object and store this object in the HttpServletRequest object for later use within a servlet. During stress testing the filter is found to mix up numbers obtained from different simultaneous requests. Which of the following is the BEST way to fix the problem?
A.Make theInteger a local variable of the doFilter method. B.Synchronize the doFilter method of the filter class.
C.Add SingleThreadModel to the implements clause of the class definition. D.Place the call to setAttribute in a synchronized block.
Correct:A
7.Refer to the exhibit to answer the question. A JSP, productlist.jsp, contains a link for each available product which sends information about the product to AddItemToBasketServlet as parameters of the HTTP POST request. During testing, the developer finds that the application behaves correctly, adding an item to the basket and returning the client to the product list to select more items. After deployment to the production environment, however, users find that the system fails to correctly record items when “shopping for several items at the same time”. Which
of the following is the BEST way to fix this problem? A.Synchronize the addItem method of the Basket class. B.Enable persistent sessions in the server configuration. C.Use URL rewriting for storage of the session ID.
D.Synchronize the doPost method of AddItemToBasketServlet.
Correct:A
8.Given that the following JSP page directive has been defined in the JSP page, which implicit objects are available for use in JSP scriptlets and expressions? (%@ page isThreadSafe=”true” isErrorPage=”true” errorPage=”error.html” %)
A.request B.error C.page D.in
E.out
Correct:A C E
9.Examination of the logs of a production web application have revealed that some servlets, which
form part of an internal testing framework, are being invoked by external users, even though the test servlets are not mapped to URLs in the web.xml file. Which of the following would be the BEST way to fix this problem?
A.Uncheck the “Serve servlets by classname” checkbox in the Extensions page of the Web Deployment
Descriptor editor.
B.Check the “Only serve mapped servlets” checkbox in the Servlets page of the Web Deployment
Descriptor editor.
C.Add mappings for the test servlets to the web.xml file.
D.Remove the classnames for the test servlets from the MANIFEST.MF file for the web application.
Correct:A
10.Part of the “page template”, to be returned to the browser as a result of executing a JSP, is HTML which is updated daily, e.g., a “Press Releases” section. This is BEST done using which of the following tags?
A.<%@ forward file="/pages/press_releases.html" %> B.<%@ include file="/pages/press_releases.html" %> C.
11.A production web application contains many servlets, each representing one operation, which
a user can perform in the application. The developer responsible for the application finds that it is hard to maintain and provides few opportunities for reuse of classes. Which of the following would be the BEST way to address these shortcomings?
A.Replace the many servlets with a single servlet and use objects implementing the Command design pattern to manage request processing.
B.Relocate the business logic to reside in the servlet classes, to reduce the number of classes in the application.
C.Add a single servlet to receive requests from the user and then use a rulesbased mechanism for deciding which of the many servlets to forward the request to.
D.Move the controller logic from the servlets to the JSPs, to reduce the number of addressable resources
in the application.
Correct:A
12.The following code fragment shows the creation of a session object within a servlet (request is
an object of type HttpServletRequest, flag is a boolean value): HttpSession session = request.getSession(flag); Which of the following statements are TRUE after this line of code has been executed?
A.If flag is true, session always contains a reference to a new HttpSession object.
B.If flag is true and no HttpSession object currently exists for this client, session contains a reference to a new HttpSession object.
C.If flag is false and no HttpSession object currently exists for this client, session is null.
D.If flag is false and no HttpSession object currently exists for this client, an exception is thrown.
E.If flag is false, a new HttpSession object cannot be created because the session manager’s maximum limits have been reached.
Correct:B C
13.A servlet has saved an instance of a com.ibm.ShoppingCart bean to the session object. The shopping cart information has to be displayed using a JSP page. Which JSP tags would allow for accessing the bean from the JSP page?
A.
B.
14.Which of the following tasks MUST be completed before a JSP custom tag implementation class can be used in a JSP?
A.The definition of the tag must be added to the tag library descriptor. B.The tag library URI must be specified in a taglib directive.
C.Custom tags must be enabled in the web deployment descriptor.
D.The mapping for the custom tag must be defined in the web deployment descriptor. E.The taglib module must be placed in the web application’s lib directory.
Correct:A B
15.A servlet, which extends HttpServlet, needs to read various initialization parameters relating to
a database, such as the database name, user ID and password. The servlet contains the following code to read the database.dbname parameter: String dbname = getInitParameter(“database.dbname”); Where MUST the value of this parameter be entered?
A.In a file called database.properties, located in the WEBINF directory within the web module.
B.In a file called database.dbname.properties, located in the WEBINF directory within the web module.
C.In the web deployment descriptor for the web module, in an initparam element within the servlet element.
D.In the web deployment descriptor for the web module, in an enventry element.
Correct:C
16.Which of the following statements are TRUE with regard to setting the “Access Intent” attribute
to “wsOptimisticRead” on methods of an entity EJB?
A.The ejbStore method ALWAYS gets called whenever any EJB method is called.
B.The ejbLoad method gets called once in a transaction whenever the EJB methods are called. C.The ejbStore method does NOT get called whenever the EJB method is called.
D.The ejbStore method gets called whenever the ejbActivate method is called.
Correct:B C
17.A developer of a selfservice payroll application needs to connect to the payroll database. The name of the database is different in each of the development, staging and production environments. If the developer has to make the code portable across each of the environments, what is the BEST way to implement this?
A.Create a property file for each of the environments and define a property called “payroll_db” which maps to the physical database. For each of the environments, publish the environment specific property file. In the application code use this property to connect to the database.
B.Declare a resource reference called “payroll_db” in the deployment descriptor. While deploying the application in WebSphere, bind the resource to a JDBC Connection factory in the target environment. In
the application code use the resource reference to retrieve a connection from the factory.
C.Define a Web Application context parameter called “payroll_db”. While deploying the application in WebSphere, initialize this property with the name of the physical database in the target environment. In the application code use the Servlet API to lookup the value of the database and connect to it.
D.Define an environment variable for the database name. Make the code choose a database name based
on the environment variable.
Correct:B
18.Which of the following happen when an enterprise application is published to server test environments in WebSphere Studio Application Developer, V5 ?
A.The application projects are built. B.The application projects are rebuilt.
C.The server configuration is copied to the server location.
D.An enterprise application (EAR file) is exported to the local file system.
Correct:C
19.Which of the following resources/tools are provided by WebSphere Studio Application Developer, V5 to test and deploy enterprise applications in WebSphere Application Server, V5? A.Server Projects
B.Local Server
C.Server and Server Configurations
D.WebConsole
Correct:A C
20.In order to access the com.ibm.sample.EmployeeServlet servlet, any of the following URLs can
be used: http://www.sample.ibm.com/Emp/EmpSearch http://employees.ibm.com/Emp/EmpSearch http://employees.ibm.com/Emp/servlet/com.ibm.sample.EmployeeServlet Which statements must
be TRUE based on this information?
A.The “File serving enabled” attribute is set in the deployment descriptor of the web module. B.The web application context root is /Emp.
C.The servlet path is /Emp/EmpSearch.
D.The “Serve Servlets by classname” attribute is set in the WebSphere extension section of the web module deployment descriptor.
E.The Virtual Host configuration contains an alias that maps to “employees.ibm.com”.
Correct:B D E
21.Consider an application for which security roles are being defined using the J2EE Authorization model as implemented by WebSphere. The application has a servlet, which should
be made available only to WebSphere authenticated users. What are some of the steps necessary
to provide this security? Assume the Application and Web Deployment Descriptor editors in
WebSphere Studio Application Developer are being used.
A.Make the servlet use an EJB which is protected by the appropriate security role. B.Define an appropriate security role in the web deployment descriptor.
C.Add the security role to the servlet definition in the web deployment descriptor. D.Add the servlet as a web resource on a virtual host within WebSphere.
E.Define method level permissions in the web deployment descriptor.
Correct:B C
22.A developer must install an Enterprise Application in IBM WebSphere Application Server V5. What tools can be used to perform this task?
A.XMLConfig command line utility.
B.Web based administrative console (WebConsole). C.SEAppInstall command line utility.
D.”wscp” command line utility. E.”wsadmin” command line utility. Correct:B E
23.In an enterprise application deployed in WebSphere Application Server, V5.0, if a Web module
(WAR file) should access an EJB module, what is the BEST way for that Web module to reference the EJB interfaces and client stubs?
A.Package the EJB interfaces and client stubs into a separate EJB Client JAR file and specify this JAR file
in the MANIFEST Classpath of the Web module.
B.Specify the EJB JAR file in the MANIFEST Classpath of the Web module. C.Package the EJB interfaces and client stubs into the Web module.
D.Package the EJB and Web modules into an EAR file and specify EJB jar in the Classpath property of the EAR deployment descriptor.
E.None of the above, as the classes in the EJB module are automatically made available to the Web module.
Correct:E
24.An IBMCampusOnline.com enterprise application retrieves and stores information about students and courses. Student and course entities are modeled as CMP entity beans. Students can see their courses and the tutor can see which students have enrolled in a course. To design the appropriate containermanaged relationship:
A.the CMP beans have to provide a local interface
B.the CMP beans are to be declared in the same package
C.the beans have to expose remote interfaces for servlet access D.foreign keys must exist on the appropriate database tables Correct:A D
25.The IBMCampusOnline.com enterprise application is used by students accessing it over the internet and by employees accessing it from the intranet. The business process steps are mapped
to stateless session bean methods. The session beans MUST have a remote interface when they:
A.are accessed from different JVMs
B.are accessed by servlets
C.are accessed by nonJava clients D.become part of the session bean pool Correct:A C
26.While designing EJBs with WebSphere Studio V5 a developer decides that EJB inheritance would speed up the development of the enterprise beans. When subclassing the enterprise bean class which of the following rules MUST be obeyed?
A.Define the inheritance according to EJB 2.0 specification
B.Beans have to be defined in the same EJB module
C.Use EJB inheritance only with CMP entity beans
D.Subclassed beans share the parents primary key class
Correct:B D
27.A developer is designing an enterprise application in which a user will submit a form containing information about customer registration. This information needs to be stored in CUSTOMER and ADDRESS tables. All the EJBs will be deployed in the same server, different from the one for the Web application. What is the BEST way to improve the application’s performance with the following components? RegistrationServlet : Servlet RegisterProcessor : session EJB CustomerEJB : CMP Entity EJB for CUSTOMER table AddressEJB : CMP Entity EJB for ADDRESS table
A.RegistrationServlet invokes the remote view of the CustomerEJB and AddressEJB. B.RegistrationServlet invokes the local view of the CustomerEJB and AddressEJB.
C.RegistrationServlet invokes the remote view of the RegisterProcessor and RegisterProcessor then invokes the remote view of the CustomerEJB and AddressEJB.
D.RegistrationServlet invokes the remote view of the RegisterProcessor and RegisterProcessor then invokes the local view of the CustomerEJB and AddressEJB.
Correct:D
28.A Developer creates a new messagedriven bean (MDB). What piece of configuration information MUST be provided to the deployer of the bean?
A.The JNDI name of the destination.
B.The name of the queue the bean listens to. C.The name of the listener port used by the MDB.
D.The JNDI name of the connection factory used with the queue.
Correct:C
29.While testing the create method of a CMP entity bean using the Universal Test Client of IBM WebSphere Studio Application Developer, an exception is thrown. Which of the following are LEAST likely causes of this exception?
A.The ‘databaseName’ attribute of the Data source in the Server Configuration is wrong. B.The ‘JNDI Name’ attribute of the Data source in the Server Configuration is wrong. C.The ejbCreate method does NOT have the code for setting the CMP fields.
D.The ejbCreate method does NOT have the code for INSERT SQL statement. E.The ejbPostCreate method has NO code.
Correct:D E
30.While testing a messagedriven bean, the following exception is thrown: MQJMS2005:failed to create MQQueueManager for ‘localhost:WAS_localhost_server1′ What is the BEST explanation for this?
A.ejbjar.xml file is not valid.
B.The Queue resource was not started.
C.The MessageListener interface is not implemented. D.The message is not sent to MQQueueManager.
E.While parsing the message of MQQueueManager, the exception is thrown.
Correct:B
Testking ibm 000-287 Interactive Testing Engine Included!
101 Questions
Updated : 09/18/2008
Price : $87.99 $79.99
Free down:Testking ibm 000-287
Free down:Pass4sure ibm 000-287
| IBM Free Downloads |
|
Type |
Exam Bible | New Questions & Answers |
Latest Updated |
Download link |
![]() |
All Ibm 's Exam Pack |
767 |
1 days ago | Download |
If you would like to make a comment, please fill out the form below.
[...] Testking 000-287 Exam : Enterprise Application Development with IBM WebSphere Studio, V5.0 [...]
[...] Testking 000-287 Exam : Enterprise Application Development with IBM WebSphere Studio, V5.0 [...]
[...] testking 000-287 [...]
[...] 000-287 testking 000-287 transcender 000-287 actualtest 000-287 Pass4sure Share and [...]