Testking ibm 000-154

By PassGuide-IBM Study Guide | Oct 1, 2008
Visited 130 times, 2 so far today

test 154,web developer : 000-154 Exam
Known also as the IBM Web Developer (000-154), 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-154 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-154 practice exams and exam simulators will translate directly into your daily work environment.

1.EJB clients must supply which two of the following pieces of information in order to use JNDI
services?
A.The IP address of a Web container
B.The DataSource name for a JDBC database
C.A provider URL detailing the location of the name tree
D.The class name of the initial context factory
Correct:C D
2.When the JMS API is used, which two subtypes of javax.jms.Message are most appropriate for sending a message to a consumer that is not a Java client?
A.BytesMessage B.MapMessage C.ObjectMessage D.StreamMessage E.TextMessage Correct:A E
3.In the JMS API for the publish­subscribe domain, how does a durable subscriber differ from a non­durable subscriber?
A.Messages in topics that have durable subscribers remain in the topic until they expire or the subscriber connection to the JMS provider is closed.
B.If a durable subscriber becomes disconnected without unsubscribing and later reconnects, the subscriber receives messages that arrived while the subscriber was not active.
C.If a topic has a durable subscriber, the JMS provider logs all messages in a persistent media so that an application can inspect the log and extract messages at a later time.
D.The application server delivers each message in a transactional context so that if a durable subscriber then rolls back the transaction, the state of the message reverts to that prior to delivery.
Correct:B
4.Which of the following is NOT a message transfer protocol?
A.POP B.SMTP C.IMAP D.MIME Correct:D
5.Which two of the following are NOT parts of the J2C Version 1.0 Common Client Interface?
A.ConnectionFactory B.ConnectionException C.ResultSetMetaData D.TransactionFactory E.ResultSet
Correct:B D
6.What is best method for obtaining a home interface for a bean named Employee?
A.Context initCtx = new InitialContext(System.getProperties()); Object o = initCtx.lookup(“EmployeeHome”); EmployeeHome empHome = (EmployeeHome) javax.rmi.PortableRemoteObject.narrow(o, EmployeeHome.class);

B.Context initCtx = InitialContext.getDefaultContext(); Object o = initCtx.lookup(“EmployeeHome”);
EmployeeHome empHome = (EmployeeHome) javax.rmi.PortableRemoteObject.narrow(o, EmployeeHome.class);
C.Context initCtx = new InitialContext(System.getProperties()); EmployeeHome empHome =
(EmployeeHome) initCtx.lookup(“EmployeeHome”);
D.Context initCtx = InitialContext.getDefaultContext(); EmployeeHome empHome = (EmployeeHome)
initCtx.lookup(“EmployeeHome”);
Correct:A
7.Given a JDBC data source named myDataSource, which of the following establishes a JDBC
connection?
A.Connection con = new Connection(myDataSource); B.Connection con = myDataSource.getConnection();
C.Connection con = ConnectionManager.getConnection(myDataSource); D.Connection con = myDataSource.open();
Correct:B
8.When a context throws a NamingException, which of the following methods can be used to determine which portion of the JNDI name is valid?
A.NamingException.resolvedObj() B.NamingException.remainingName() C.NamingException.resolvedName() D.NamingException.getRootCause() Correct:C
9.From the perspective of an EJB client, what types of EJBs will always be unique for every create() call?
A.Entity
B.Stateless Session C.Stateful Session D.Message­Driven Correct:A C
10.Refer to the exhibit to answer the question. Consider the Employees relation defined in the exhibit and the Java code segment defined below: Statement s = con.createStatement(); ResultSet
rs = s.executeQuery(“SELECT * FROM Employees ” + “WHERE EmployeeID >= 10002 AND ” +

“EmployeeID <= 10004"); Which code segments display the entire content of the result set assuming that columns EmployeeID and Extension are of SQL type SMALLINT and column Name
is of SQL type VARCHAR?

A.do { System.out.println(rs.getShort("EmployeeID")); System.out.println(rs.getString("Name"));
System.out.println(rs.getShort("Extension")); } while (rs.next())
B.do { System.out.println(rs.getString("EmployeeID")); System.out.println(rs.getString("Name")); System.out.println(rs.getString("Extension")); } while (rs.next())
C.while (rs.next()) { System.out.println(rs.getString(1)); System.out.println(rs.getString(2)); System.out.println(rs.getString(3)); }
D.while (rs.next()) { System.out.println(rs.getString(0)); System.out.println(rs.getString(1)); System.out.println(rs.getString(2)); }
E.while (rs.next()) E.while (rs.next()) E.while (rs.next()) { System.out.println(rs.getString("EmployeeID")); System.out.println(rs.getString("Name")); System.out.println(rs.getString("Extension")); }
Correct:C E
11.Refer to the exhibit to answer the question. Consider the Products relation defined in the exhibit. What is the result of attempting to execute the following Java code segment assuming con is a valid reference to an open Connection object? 1. PreparedStatement ps = con.prepareStatement( 2. "SELECT * FROM Products WHERE " + 3. "Cost < ?"); 4. 5. ps.setDouble(0, 10f); 6. 7. ResultSet rs = ps.executeUpdate(); 8. rs.next(); 9. System.out.print(rs.getString(1)); 10. System.out.println(rs.getString(2));

A.The code segment displays "1001 Flyback Transformer".
B.The code segment displays "1004 Grounding Strap". C.The code segment displays "Flyback Transformer 8.0". D.The code segment displays "Grounding Strap 0.15". E.No output is displayed due to a runtime error.
Correct:E
12.Which two of the following scenarios are better modeled in the JMS point­to­point domain than
in the JMS publish­subscribe domain?
A.A store sends a shipping order to a warehouse to request delivery of a purchased item to a customer. B.Headquarters of a chain of stores sends messages that contain price update information to several stores that consume messages independently.
C.Many sports teams post scores so that fans can see the latest results for their favorite teams.
D.A client application sends insurance policy data to an application that calculates insurance premiums, and waits for the response.
Correct:A D
13.Where would an EJB reference be found if it were placed in the JNDI location recommended in
J2EE 1.3?
A.java:comp/env/ejb

B.java:comp/ejb
C.java:ejb D.java:env/ejb Correct:A
14.Assuming variable env is a reference to a hashtable containing the parameters necessary to obtain the JNDI initial context, which of the following obtains a JDBC data source named MyDataSource?
A.DataSource ds; try { ctx = new InitialContext(env); ds = (DataSource) ctx.lookup("MyDataSource"); }
catch (NamingException ne) { }
B.DataSource ds; try { ctx = new InitialContext(env); ds = (DataSource)
ctx.getConnection("MyDataSource"); } catch (NamingException ne) { }
C.DataSource ds; try { ctx = new InitialContext(env); ds = (DataSource)
ctx.getNameInNamespace("MyDataSource"); } catch (NamingException ne) { }
D.DataSource ds; try { ctx = new InitialContext(env); ds = (DataSource)
ctx.getURLOrDefaultInitCtx("MyDataSource"); } catch (NamingException ne) { }
Correct:A
15.Consider an EJB named Employee and its home interface named EmployeeHome. The findByDepartment method of the EmployeeHome interface is most likely to have a return value of which of the following types?
A.Employee B.EmployeeHome C.Employee D.Collection Correct:D
16.A running Filter must call what method in order to ensure that the next filter in the filter chain is called?
A.Servlet.doFilter(Request,Response); B.FilterChain.doFilter(Request,Response); C.Filter.doFilter(Request,Response); D.Servlet.doChain(Request,Response); E.Filter.doChain(Request,Response); F.FilterChain.doChain(Request,Response); Correct:B
17.A client has accessed a servlet via a form that uses an HTTP POST request. Which two methods could be used by the servlet to obtain information input within the form?
A.Using the servlet object's getServletInfo method B.Using the request object's getAttribute method C.Using the request object's getParameter method D.Using the ServletConfig's getInitParameter method
E.Using the request object's getParameterValues method F.Using the request object's getAttributeValues method Correct:C E
18.Which method would be used to call a registered servlet with the following attributes? Site =

www.jcert.org Web application name = testApp Servlet URI = TestServlet
A.getServletConfig().getServletContext().getRequestDispatcher("http://www.jcert.org/testApp/TestServlet
").forward(req,res); B.getServletConfig().getServletContext().getRequestDispatcher("/testApp/TestServlet").forward(req,res); C.getServletConfig().getServletContext().getRequestDispatcher("/TestServlet").forward(req,res); D.getServletConfig().getServletContext().getRequestDispatcher("TestServlet").forward(req,res);
Correct:C
19.Which of the following is considered the best way to design a flexible API that does not require
a servlet per activity?
A.Embed the activity name in a hidden field. Let the servlet read the field to determine what must occur. B.Create a query string containing the activity name as a parameter. Let the servlet read the parameter to determine what must occur.
C.Use a servlet mapping to make requests with the same suffix. Change the prefix to the action and let the servlet read the whole URL to determine what is required.
Correct:C
20.Which three of the following may be contained in a WAR file?
A.Enterprise JavaBeans
B.Servlets C.JavaServer Pages D.Applets
E.Client­side Java applications
Correct:B C D
21.Given the following HTML form on a Web page: Phone Book

Last Name:
Smith

First Name:
John

Phone Number:
4567890

If the user who is presented with this form simply clicks the Submit button without updating any fields, what URL (and associated query string) will the browser attempt to access? A.http://localhost:7001/phoneBook%last=Smith?first=John?phone=4567890
B.http://localhost:7001/phoneBook?text=Smith&text=John&number=4567890
C.http://localhost:7001/phoneBook?Last Name=Smith&First Name=John&Phone Number=4567890
D.http://localhost:7001/phoneBook?last=Smith&first=John&phone=4567890

| English | Chinese(Traditional) | Chinese(Simplified) | ­ 6 ­ KillTest Information Co., Ltd. All rights reserved.

E.http://localhost:7001/phoneBook (with no associated query string)
Correct:D
22.Which two scenarios will always result in the init method of a servlet being invoked?
A.Every time a new client accesses the servlet
B.When the server automatically reloads the servlet
C.When an HTTP INIT type request is made by a client
D.When the servlet is put into service after loading and instantiation
Correct:B D
23.For J2EE 1.3, which of the following session methods would allow the developer to set the timeout period so that a session will be automatically invalidated if it has not been used during the specified interval?
A.session.setTimeOutInterval() B.session.setInactiveTimeOutInterval() C.session.setMaxTimeOutInterval() D.session.setMaxInactiveInterval() Correct:D
24.A client browser has cookies turned off and is interacting with a servlet that is using HTTP sessions for client state management. According to J2EE Patterns best practices, which technique or technology should be used by the servlet programmer in order to maintain this client's state?
A.Servlet filters B.Servlet events C.URL encoding
D.Use of persistent sessions
E.Creation of a new session at the beginning of the service method
F.Hidden fields G.Client­side certificates Correct:C
25.Which would be the best exception to catch to ensure that all objects placed into a session in a clustered environment using Database­based session persistence properly implement Serializable where supported?
A.NamingException B.IllegalArgumentException C.Exception D.java.rmi.RMIException Correct:B
26.If four classes were instantiated in the following order, implementing the associated event listener, in what order would they be notified if the application were shut down? CustomConnectionManager implements HttpSessionListener CustomerManager implements ServletContextListener OrderManager implements HttpSessionListener ShoppingCartManager implements HttpSessionListener
A.ShoppingCartManager, OrderManager, CustomerConnectionManager, CustomerManager
B.ShoppingCartManager, CustomerManager, OrderManager, CustomConnectionManager

C.CustomerManager, ShoppingCartManager, OrderManager, CustomConnectionManager
D.CustomerManager, CustomConnectionManager, OrderManager, ShoppingCartManager
Correct:A
27.What method in the ServletContext could be used to get an attribute called times_Accessed from the servlet context?
A.getInitParameter(times_Accessed); B.getInitParameter("times_Accessed"); C.getParameter(times_Accessed); D.getParameter("times_Accessed"); E.getAttribute(times_Accessed); F.getAttribute("times_Accessed"); Correct:F
28.What is the best scope in which to store an object containing display data that is to be sent from a servlet acting as a controller to a JSP page with the session disabled?
A.page B.request C.session
D.application/servletContext
Correct:B
29.A servlet has been configured in a deployment descriptor file with servlet­specific initialization parameters. Through which interface can a servlet access these initialization parameters? A.ServletConfig
B.ServletContext
C.HttpServletRequest D.HttpServletResponse Correct:A
30.Which two of the following should be avoided in order for a servlet that does not implement the
SingleThreadModel to be thread safe?
A.Class variables
B.Instance variables
C.Local variables
D.Class methods E.Instance methods
Correct:A B

Testking ibm 000-154 Interactive Testing Engine Included!
114 Questions
Updated : 09/18/2008
Price : $87.99 $79.99
Free down:Testking ibm 000-154
Free down:Pass4sure ibm 000-154

Bookmark and Share
IBM Free Downloads

Type

Exam Bible New Questions & Answers

Latest Updated

Download link
Testking torrent All Ibm 's Exam Pack

767

1 days ago Download
pass4sure ibm

Random Posts

testking ibm
2 Comments so far
  1. [...] 000-094 Exam : Application Development with IBM WebSphere Integration Developer V6.0.1 Testking 000-154 Exam : Web Developer Testking 000-256 Exam : Application Development with IBM Rational Application [...]

  2. [...] testking 000-154 [...]

Leave a Comment

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)

Website

Comments

© 2007 IBM Certification Exams, - IBM Sitemap ibm exams