Pals,
reached 94%.
still 4 questions wrong. 1 question in the
test might be broken.
Tried to map the questions to the sections, but there might be errors.
Please help to find the errors and reach better score.
Explanations welcome. Especially where marked with [please explain]
toc, toc, toc Bruce.
toc, toc, toc Bill.
toc, toc, toc Mohit.
toc, toc, toc Jochen.
toc, toc, toc everybody.
1. Design and build reusable enterprise components 8 8 100.0
2. Design and build web components for JavaServer Pages (JSPs) and
Servlets including IBM WebSphere specific features 10 10
100.0
3. Develop clients that access the enterprise components 4 4 100.0
4. Demonstrate understanding of database connectivity and connection pooling within IBM WebSphere Application Server 2 2
100.0
5. Handle
EJB transaction issues 6 6 100.0
6. Develop J2EE components with IBM WebSphere Studio Application Developer for Windows, V4.0.3 8 6 75.0
7. Assemble enterprise applications and deploy them in IBM WebSphere Application Server 7 6 85.0
8. Use IBM WebSphere tools to validate aspects of the application server, such as security, performance, connection pools,
and session management 8 8 100.
-----------------------------------------------------------------------
A. Design and build reusable enterprise components 8 6 75.0
1)
On a project, web client requests are serviced by a servlet controller that uses the Command
pattern.
The request is forwarded from Command classes to JSPs which respond with XML. Given this architecture,
the BEST way to work with EJBs is to have the:
a) Command classes retrieve the required data from the EJBs, passing the data to the JSPs.
b) Command classes retrieve the required data from the EJBs, passing the data to the JSPs as an XML file.
c) JSPs retrieve the required data from the EJBs
a)
[see Bruce Yu's explanation below]
---
2)
A IBMBankOnline.com customer with multiple accounts can transfer funds from one account to another. When transferring funds,
source and destination accounts cannot be the same. Assuming the Account object is uniquely identifiable by the customer
number
and account type, what task should NOT be performed to complete this requirement?
a) Define a serializable AccountKey class.
b) Declare the two fields that uniquely identify an account as public members of the AccountKey class.
c) Implement the equals() and hashcode() methods on the AccountKey class.
d) Override the EJBObject's isIdentical() method in the Account bean class.
d)
---
3)
A business-to-business application is being written wherein the system receives requests from other companies to authorize
the credit
charge a customer has made. Typically, the client system performs a single request of the service during a customer session.
The
application's function is implemented using EJBs. The application service should be implemented as a:
a) CMP Entity Bean.
b) BMP Entity Bean.
c) Stateful Session Bean.
d) Stateless Session Bean.
d)
---
4)
A developer is writing a BMP Entity Bean that caches a reference to a database connection in a private field. The bean also
holds
references to two other objects, neither of which is serializable. Those two referenced objects are created from the
persistent
state of the bean. Which of the following MUST the developer do to handle the passivation requirements for this entity bean?
a) Make the database connection reference field transient.
b) Make the fields that hold the references to the non-serializable objects transient.
c) Create a writeObject(ObjectOutputStream) method on the entity bean which throws an instance of
java.io.NotSerializableException.
d) Create a writeObject(ObjectOutputStream) method on the entity bean which translates the object references into
serializable form.
e) Create a readObject(ObjectInputStream) method on the entity bean which translates the serialized data back into the
previously held
object references.
a, b
[see discussion above]
-------
6)
While testing a CMP Entity bean, a developer discovers that a change to one of the bean's properties is not being reflected
in the
database that contains the bean data. What are possible causes?
a) The ejbStore() method has a bug.
b) The ejbCreate() method has a bug.
c) The setter for the property has a bug.
d) The mapping of container managed fields to database fields has a bug.
e) The deployment descriptor has a bug.
f) The ejbLoad() method has a bug.
a), c), d), e)
[not sure, please explain!!!]
---
19)
The Customer EJB retrieving customer information from a database is to be displayed in a
JSP. In order for the EJB provider
to make the
information from the Customer EJB available to the application assembler, the BEST approach is to provide the application
assembler with a:
a) Jar file containing the Customer bean's stubs, remote and home interface.
b) Wrapper object delegating all method calls to the remote Entity bean. The wrapper object provides access to only the
getter methods
defined in the Entity bean.
c) Wrapper object delegating all method calls to the remote Entity bean. The wrapper object provides access to the
bean's getter and
setter methods.
d) Wrapper object acting as a local attribute cache for the remote Entity bean. The wrapper object provides access to
the bean's
getter methods.
d)
[not sure]
---
---
8)
A client invokes the create() method on an CMP entity bean. Which of the following is a correct sequence in which the
operations mentioned
below are performed?
a. Container creates an EJBObject.
b. EJB home object invokes ejbCreate() on Bean instance.
c. Bean instance is associated with EJBObject.
d. Container creates new bean instance.
e. Container calls setEntityContext() on bean instance.
f. Container creates the bean representation in a database.
g. ejbPostCreate() method is invoked on bean instance.
a) b -> f -> a -> c -> g
b) b -> a -> f -> c -> e -> g
c) a -> d -> c -> b -> e -> g -> f
d) a -> d -> c -> b -> f -> g -> e
e) a -> c -> e -> b -> f -> g
a)
---
---
52)
Part of an application's business logic is implemented using a limited set of connections to a legacy system. The
development team want to
provide an EJB interface to this legacy code. The BEST approach to managing connection resources would be to use:
a) Stateful Session beans one per connection
b) Stateless Session beans one per connection
c) BMP Entity Bean one per connection
d) CMP Entity Bean one per connection
c
---------------------------------------------------------------------------------------------------
B. Design and build web components for JavaServer Pages (JSPs) and Servlets including IBM WebSphere specific features 10 10
100.0
9)
Given that the service() method of a typical servlet is multithreaded, which one of the following issues does NOT need to be
addressed
in a servlet's implementation?
a) Concurrent access to shared resources
b) Concurrent access to local variables
c) Concurrent access to static variables
d) Concurrent access to instance variables
b)
---
10)
When processing a request which of the following objects is BEST suited for sharing data between Servlets and JSPs?
a) request
b) session
c) context
d) application
a
---
11)
A Servlet must perform 3 operations that are independent of one another. They are time consuming with each operation
consuming about 10
msec of CPU. The Servlet's response depends on the completion of all three operations. The developer decides to perform each
operation
on a separate worker
thread to run them concurrently. Which of the following describe important parts of this implementation?
a) The Servlet should implement MultiThreadModel.
b) The Servlet should implement SingleThreadModel.
c) Access to the HttpSession must be synchronized.
d) The worker threads must not write to the ServletOutputStream.
e) The worker threads must not read from the ServletInputStream.
d)
---
12)
Upon startup, a web application reads global information from a database into an object of type com.ibm.ApplicationInfo and
adds this
object to the servlet context. Which of the following tags allow for accessing this information from a JSP page?
a) < jsp:useBean id="appinfo" class=" com.ibm.ApplicationInfo" / >
b) < jsp:useBean id="appinfo" class="com.ibm.ApplicationInfo" scope="config"/ >
c) < jsp:useBean id="appinfo" class=" com.ibm.ApplicationInfo" scope="context"/ >
d) < jsp:useBean id="appinfo" scope="application" class=" com.ibm.ApplicationInfo" / >
d)
---
13)
Which of the following statements are TRUE about the implicit objects in JSP?
a) The in object can be used to retrieve user input.
b) The config object can be used to retrieve initial parameters.
c) The request object can be used to retrieve header information.
d) The dispatcher object is used to forward or include other Servlets or JSPs.
e) The context object can be used to retrieve context information such as referrer URI and MIME type.
b), c)
---
14)
A Web site is getting a lot of 'hits' and the amount of session data managed by the server is becoming too large for it to
handle.
Which of the following are appropriate ways to solve the problem?
a) Expand the capacity of the server.
b) Add additional servers to share the load.
c) Store the session data in a Cookie.
d) Store all session data in hidden fields on the web pages that are served.
a), b)
---
15)
Which of the following statements is FALSE about objects that implement the HttpSessionBindingListener?
a) They are notified when they are bound (placed) to the HttpSession
b) They are notified when they are unbound (removed) from the HttpSession
c) They are notified when they are placed in the HttpSessionContext
d) They can obtain details of the notification from a HttpSessionBindingEvent
c)
---
16)
A developer wishes to make a server function available to an
applet via a Servlet. The applet passes the Servlet a
serialized object as
an argument. How should the developer implement the Servlet?
a) Sub-class HttpServlet and create an ObjectInputStream from the ServletInputStream in the doGet() method.
b) Sub-class HttpServlet and create an ObjectInputStream from the ServletInputStream in the service() method.
c) Sub-class GenericServlet and create an ObjectInputStream from the ServletInputStream in the doGet() method.
d) Sub-class GenericServlet and create an ObjectInputStream from the ServletInputStream in the service() method.
d)
---
17)
Which of the following statements are TRUE about the HttpServletRequest object?
a) getHeader() method should be used to retrieve HTTP header information.
b) getQueryString() method should be used to retrieve the query parameters.
c) getCurrentSession() method should be used to retrieve the current HTTP session.
d) getUserName() method should be used to retrieve the username of the authenticated user.
a, b
---
18)
A Servlet S1 forwards a request to Servlet S2. The BEST way for Servlet S1 to pass data to Servlet S2 is by saving the data
to:
a) A Cookie.
b) The request object.
c) The ServletContext.
d) The HttpSession object.
b
---
51)
A JSP is displaying data from a JavaBean accessed through a < jsp:useBean > tag. It is an error condition if the JavaBean is
not found in
the request scope at runtime. What should the JSP developer do to ensure correct behavior?
a) Specify the real JavaBean's
Java type as the value for only the class attribute of the jsp:useBean tag.
b) Specify the JavaBean's Java type as the value for only the type attribute of the jsp:useBean tag.
c) Add an isErrorPage specification in a JSP page directive.
d) Add an errorPage specification in a JSP page directive.
b, d
--------------------------------------------------------------------------------------------------
C. Develop clients that access the enterprise components 4 3 100.0
20)
When the getStockPrice() method of the StockQuote
SOAP service is invoked, an exception occurs. How is the exception
reported to the
SOAP client? Assume that the Apache SOAP V 2.2 toolkit is being used.
a) It is reported as a < SOAP-ENV:Fault > element of the response SOAP envelope.
b) It reported as a < SOAP-ENV:Exception > element of the response SOAP envelope.
c) A SOAPException is thrown.
d) The < faultcode > element indicates the fault type.
a), c), d)
---
21)
EJB client code uses an InitialContext to locate an EJB home interface. The InitialContext is typically obtained through the
use of the
constructor:
InitialContext(properties)
There are many environment variables which can be set in the properties parameter. The properties which are used by the
WebSphere
Application Server are:
a) INITIAL_CONTEXT_FACTORY
b) STATE_FACTORIES
c) OBJECT_FACTORIES
d) SECURITY_PROTOCOL
e) PROVIDER_URL
a), e)
---
30)
The following sequence of method calls occurred on a CMP Entity bean instance when a Session bean invoked its
businessMethod1() and
businessMethod2() methods from the same Session bean method in IBM WebSphere Application Server, Advanced Single Server
Edition for
Multiplatforms:
entityBean.ejbActivate()
entityBean.ejbLoad()
entityBean.businessMethod1()
entityBean.businessMethod2()
entityBean.ejbStore()
entityBean.ejbPassivate()
Assuming that the session bean is configured with TX_REQUIRED, what MUST be TRUE about the scenario that generated these
method calls?
a) The business methods are NOT configured with TX_REQUIRES_NEW.
b) Any persistent state changes that occur as a result of businessMethod1() are in the same transaction scope as changes
made by
businessMethod2().
c) Any persistent state changes that occur as a result of businessMethod1() are in a different transaction scope than
changes made
by businessMethod2().
d) ejbStore() will write the resultant state of the Entity bean to the persistent store.
a), b)
[not sure, if belongs to this section]
---
50)
For a business operation, a complex set of data is returned. The data is a subset of the data associated with an Entity
bean. Much of the
data needs to be presented back to the client through a JavaServer Page. What is the BEST technique to deliver the data back
to the JSP?
a) Create a JavaBean Wrapper access bean to access the Entity EJB.
b) Create a Value Object (JavaBean) specific to request, copying data from the EJB on construction.
c) Create a Value Object (JavaBean) which represents complete persistent object, copying data from the EJB on
construction.
d) Create a copy Helper access bean to access the Entity EJB.
e) Hand off a reference to the Entity bean directly to the JSP.
b)
[not sure, if belongs to this section]
----------------------------------------------------------------------------
D. Demonstrate understanding of database connectivity and connection pooling within IBM WebSphere Application Server 2 2
100.0
23)
A servlet program requests a database connection from a DataSource named "MyDatasource" connection pool. Based on the
connection, the
program executes a SQL statement, then the program releases the connection to the connection pool. The code in the servlet
that handles the
connection pool is as follows:
1: Hashtable parms = new Hashtable();
2: parms.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
3: Context context = new InitialContext(parms);
4: DataSource ds = (DataSource)context.lookup("MyDatasource");
5: Connection conn = ds.getConnection("userid", "PASSWORD");
6: Perform normal SQL Processing
7: if(conn!=null) conn.close()
a) 1,2,3
b) 1,2,3,4
c) 1,2,3,4,5
d) 1,2,3,4,5,6
e) 1,2,3,4,5,7
b)
[is right answer, why???]
---
24)
A DataSource named "MyDatasource" has been created and configured (in WebSphere Application Server, Advanced Single Server
Edition) to
have an "idle timeout" of 30 and a "minimum pool size" of 10. If a servlet acquires a connection from that DataSource, and
the servlet
holds the connection for 2 minutes without using it, which statement is TRUE?
a) The servlet's connection will be unaffected by the idle timeout.
b) The pool size will be increased by 10 when some other servlet needs a connection.
c) After 30 seconds, WebSphere can return the connection to the connection pool.
d) The servlet's service() method will throw a javax.sql.PooledConnectionException if the servlet attempts to use its
connection.
a)
---
----------------------------------------------------------------------------
E. Handle EJB transaction issues 6 6 100%
7)
Which of the following EJB transaction isolation attributes will ensure that dirty and non-repeatable reads do not occur?
a) Read uncommitted
b) Read committed
c) Rrepeatable read
d) Serializable
c, d
---
25)
A developer is writing an Account EJB in order to provide applications access to the Account database table. The
requirements are that
the table rows cannot be changed when the EJB is being accessed by applications within a single transaction. Given that the
transaction
attribute on the bean is set to TX_REQUIRED, the BEST way to achieve this goal is to configure the Account bean with a
transaction
isolation level of:
a) TRANSACTION_ALLOW_READONLY.
b) TRANSACTION_SERIALIZABLE.
c) TRANSACTION_REPEATABLE_READ.
d) TRANSACTION_READ_COMMITTED.
c)
---
26)
While executing a method on a Session bean configured with TX_BEAN_MANAGED, an
IllegalStateException is thrown when trying
to commit
a transaction that spans multiple business method calls on the Session bean. A cause of this problem may be that:
a) The Session bean is declared as stateless.
b) At some point an exception has occurred and the transaction has been rolled back.
c) An Entity bean accessed in the scope of the transaction marked the transaction for rollback.
d) The Session bean method that starts the transaction was never called.
d)
---
27)
An application makes a findAll() call on the Home Interface of an Order CMP Entity Bean. The application wants to have
findAll() return
all committed orders including those which may have been committed (by another transaction) concurrent with the transaction
invoking the
findAll() method. What transaction isolation setting is NOT appropriate to apply to the Order CMP Entity bean if it is to
satisfy the
above condition?
a) Read uncommitted
b) Read committed
c) Repeatable read
d) Serializable
d)
---
28)
While testing a Session bean configured with "Bean Managed", a developer discovers that a TransactionRolledBackException is
being thrown
by a call to a method on an Entity Bean. The Session bean, prior to calling the method, explicitly started the transaction.
Possible causes for the exception are that the:
a) entity bean method is throwing a checked exception.
b) entity bean method is throwing an un-checked exception.
c) entity bean is configured with a transaction attribute of "Not Supported".
d) entity bean method is throwing an exception and the entity bean is configured with a transaction attribute of
"Requires New".
b, d
---
29)
While testing a BMP Entity Bean, a developer discovers that a transaction rollback does not cause a rollback of the changes
made to the
bean as it should. Which of the following should the developer suspect?
a) The ejbPassivate() method has a bug.
b) The ejbStore() method has a bug.
c) The ejbCreate() method has a bug.
d) The datastore does not support JTA.
e) The transaction does not implement javax.transaction.UserTransaction.
b, d
---
----------------------------------------------------------------------------
F. Develop J2EE components with IBM WebSphere Studio Application Developer for Windows, V4.0.3 8 6 75.0
5)
A developer needs to create a web site that displays information about a user's BankAccount. The information is contained in
a BankAccount
entity bean and is guaranteed to be accurate to within 1 day of account activity. Which of the following Access beans is the
BEST to use to
represent the BankAccount in this scenario?
a) RowSet
b) ColumnSet
c) Copy Helper
d) Proxy Wrapper
e) JavaBean Wrapper
c)
[not sure, if belongs to that section]
---
31)
What is the MOST direct way of exporting an enterprise application to WebSphere Application Server Advanced Edition from
Application
Developer?
a) Export EAR file from Application Developer and deploy using the Administration Console.
b) Export J2EE modules from Application Developer and use AAT to assemble and deploy.
c) Publish the EAR file to local or remote WAS AE.
d) Publish the EAR file to local or remote WAS AE and use AAT to deploy.
c)
---
32)
Which of the following tasks MUST a developer carry out, in order to map the "address" property of an EJB to columns in a
database?
Assume that the "address" field is an object of type Address with street, city, and postalCode as attributes.
a) Use the EJB converter/composer wizard to create a new composer.
b) Use the EJB converter/composer wizard to create a new converter.
c) Use the Mapping Editor to define the correspondence between the address field's attributes and the database columns.
a)
---
33)
A developer launches the EJB Test Client by selecting the EJB in the J2EE View and selecting "Run on Server." After the
server starts,
the following message is observed:
a) not perform lookup with JNDI name: a/b/MyEJB
b) hould the developer do to diagnose the problem?
c) Look at the Bindings page of the EJB Extension Editor.
d) Use netstat to identify port conflicts.
e) Look at the LoggingUtil.log file in the workspace's .metadata folder.
f) Look at the server's console to search for "Error starting" message for the MyEJB bean.
g) Look at the trace.log file under the workspace's .metadata\.plugins\com.ibm.etools.websphere.tools\logs directory.
c, f, g
[question might be BROKEN, am I right?]
---
34)
A bank's branches and the accounts held within a branch are modeled as CMP Entity Beans with 1:M relationship, that is,
every branch has
multiple accounts maintained in it. It is important that the Account EJB exposes a getBranch() accessor. Assuming that
Application
Developer's EJB development tools are used to implement the relationship, what are the different attributes that need to be
set?
a) The multiplicity on the Branch side of the relationship is 1..*.
b) The multiplicity on the Account side of the relationship is 0..*.
c) The Navigable property on the Branch side of the relationship.
d) The Navigable property on the Account side of the relationship.
b, c
---
35)
Which of the following EJB inheritance techniques are supported by the Application Developer EJB development tools?
a) root/leaf-inheritance map
b) single-table inheritance map
c) multiple-table inheritance map
a, b
---
36)
Which of the following statements are TRUE regarding the EJB validator in Application Developer?
a) It can validate against EJB 1.0 specification.
b) It can validate against EJB 1.1 specification.
c) It verifies the latest edition of the .class files.
d) It verifies the latest edition of the .java files.
e) It validates the application.xml file.
b, c
---
37)
When using Application Developer's "Create an Enterprise Bean" wizard to generate a CMP EJB, which of the following can be
generated for
the developer?
a) The Enterprise Bean class
b) The Home and Remote interfaces
c) The Primary Key class
d) The Finder Helper interface
e) Custom Finder methods
a, b, c
----------------------------------------------------------------------------
G. Assemble enterprise applications and deploy them in IBM WebSphere Application Server 7 6 85.0
---
22)
In order to permit an EJB client to lookup the EJB's home interface, the bean must publicize its JNDI name. Which of the
following are
ways a developer can establish the JNDI name for an EJB?
a) By the choice of the EJB Home interface name.
b) By the choice of the EJB Remote interface name.
c) Configuring name in the EJB deployment descriptor
d) Modifying the name during application installation
c), d)
---
39)
There are two web applications which share a set of common classes. The classes are packaged into a separate JAR file. The
WAR files
representing the two web applications do NOT refer to this common JAR file in their MANIFEST Class-Paths. The WAR files and
the JAR file
are packaged into an EAR file. In order for the applications to work when deployed in IBM WebSphere, what should the
Application Server's
"Module Visibility" attribute be set to?
a) SERVLET ENGINE
b) SERVER
c) MODULE
d) APPLICATION
b, d
---
40)
A self-service airline application needs to define a
JDBC resource reference for a DB2 travel database in the deployment
descriptor.
Assuming that the logical name of the resource is "travel", what is the correct declaration?
a) java:comp/env/jdbc/travel
b) java:comp/env/travel
c) java:jdbc/env/db2/travel
d) java:comp/env/jdbc/db2/travel
b)
---
41)
When an Web module (WAR file) accesses an EJB module, what is the BEST way for a 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 Class-path of the Web module.
b) Specify the EJB JAR file in the MANIFEST Class-path 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 Class-path property of the EAR deployment
descriptor.
b)
---
42)
In the Application Assembly Tool of IBM WebSphere Application Server, Advanced Single Server Edition for Multiplatforms, V4,
defining a
CMP EJB method's "Access intent" as "read" has what effects on the application?
a) CMP fields cannot be modified in the read-only method.
b) CMP fields can be changed but are not written by the container to the database when the method completes.
c) The ejbStore() method is not called.
d) The ejbLoad() method is not called.
b, c [not sure]
---
44)
A Web application consists of HTML pages, Servlets, JSPs and JavaBeans. When creating the web module using Application
Assembly Tool's
"Create Web Module Wizard", which of the following MUST be done?
a) Specify the containing enterprise application EAR file.
b) Select the "File serving enabled" option.
c) Specify the "Context root".
d) Identify all HTML pages, Servlets and JSPs to be included in the web module.
e) Select the "Directory browsing enabled" option.
c,d
---
43)
A B2B application employs Servlets, JSPs, HTML pages, images, EJBs and Java classes. These Java classes are common to both
Servlets and
EJBs. What is the BEST way to package these components into J2EE modules?
a) Package the Servlets and JSPs into a WAR file, the Enterprise Beans into an EJB jar and the Java classes in a
separate JAR. After which package these archives along with the JSPs, HTML pages and images into an EAR file.
b) Package the Servlets, HTML pages, images and JSPs into a WAR file, the Enterprise Beans into an EJB jar and the Java
classes in a separate JAR. After which package these archives into an EAR file.
c) Package the Servlets, Java Classes, HTML pages, images and JSPs into a WAR file, the Enterprise Beans and the Java
classes into an EJB jar. After which package these archives into an EAR file.
d) Package the Servlets and JSPs into a WAR file, the Enterprise Beans into an EJB jar and the Java classes in a
separate JAR. Publish the JSPs, HTML pages and images to the Web Server document root and package the Java archives into an
EAR file.
b)
----------------------------------------------------------------------------
H. Use IBM WebSphere tools to validate aspects of the application server, such as security, performance, connection pools,
and session management 8 8 100.0
38)
Before exporting a Web project, for performance reasons, a developer would like to configure the application such that the
Web Server
serves the static content (such as .html and .gif), and the servlet container serves dynamic content (such as JSPs).
Which of the following actions MUST be performed?
a) Set the load-html-on-startup element in web.xml to false.
b) Set the fileServingEnabled attribute to false in ibm-web-ext.xmi file.
c) Set the fileServingEnabled attribute to false in ibm-web-bnd.xmi fil.
d) Do Nothing, because, by default, HTML pages are served by the web server and JSPs are served by the servlet
container.
b)
---
45)
Refer to the exhibit to answer the question.
Consider adding the Customer EJB to a TravelApplication Enterprise Application. If the findCustomersByPhoneNumber() is to be
accessible to
the Agent role, which method permission needs to be created? Assume the Application Assembly Tool (AAT) is being used.
a) Create a "Method Permission" mapping the Agent role to all the methods in the Customer EJB.
b) Create a "Method Permission" mapping the Agent role to all the finder methods in the Customer EJB.
c) Create a "Method Permission" mapping the Agent role to the findCustomersByPhoneNumber() methods in the Customer EJB.
d) Create a "Method Permission" mapping the Agent role to all the methods in the home interface of the Customer EJB.
c)
---
46)
Which of the following are effective ways of handling errors in Web applications when using IBM WebSphere Application
Server, Advanced
Single Server Edition for Multiplatforms, V4?
a) Invalidate the session and forward the request to login page.
b) Define an error page for each web module configured using the Application Assembly Tool.
c) Call the sendError() method in HttpServletResponse from the Servlet where the error occurred.
d) Configure an error page to be triggered by each unique Application exception using the Application Assembly Tool.
b, c
---
47)
A developer noticed that the performance of the Application Server has degraded since a new web application was installed.
Further
examination reveals that more than one instance of the same servlet is currently loaded in this web application. A possible
cause for
this performance problem is that:
a) a custom ClassLoader has been defined for the installed WebApplication.
b) the servlet implements the SingleThreadModel interface.
c) components of the installed application appear to invoke the servlet both by name and by class name.
b)
---
48)
Which of the following mechanisms can be employed to modify the trace settings of the WebSphere Admin Server?
a) By using the OLT client.
b) By editing the server-cfg.xml file.
c) By using the Administrator's Console.
d) By editing the bootstrap.properties file.
b, c
---
49)
When designing a primary key generator for your J2EE application, which of the following would be the BEST option?
a) Depend on database specific key generation support, accessible through stored procedure
b) Build custom key generation engine deployed to database, accessible through stored procedure
c) Use a local primary key generation algorithm to eliminate synchronization delays
d) Use local management and delivery of centrally generated primary keys
d) [not sure if this is right section, might be a. Not sure if I am wright]
53)
Given the design goal of having an application be able to be configured as robust as possible, which techniques should the
developer
AVOID in their design?
a) Use persistent HttpSessions to manage application state data.
b) Use Stateful Session EJBs to manage application state data.
c) Make references to node specific resources.
d) Make all resource references via either java:comp/ JNDI references or EJB environment values.
b, c
---
--------
1. Design and build reusable enterprise components 8 6 75.0
2. Design and build web components for JavaServer Pages (JSPs) and Servlets including IBM WebSphere specific features 10 10
100.0
3. Develop clients that access the enterprise components 4 4 100.0
4. Demonstrate understanding of database connectivity and connection pooling within IBM WebSphere Application Server 2 2
100.0
5. Handle EJB transaction issues 6 6 100.0
6. Develop J2EE components with IBM WebSphere Studio Application Developer for Windows, V4.0.3 8 6 75.0
7. Assemble enterprise applications and deploy them in IBM WebSphere Application Server 7 6 85.0
8. Use IBM WebSphere tools to validate aspects of the application server, such as security, performance, connection pools,
and session management 8 8 100.
-----------------------------------------------------------------------
A. Design and build reusable enterprise components 8 6 75.0
1)
On a project, web client requests are serviced by a servlet controller that uses the Command pattern.
The request is forwarded from Command classes to JSPs which respond with XML. Given this architecture,
the BEST way to work with EJBs is to have the:
a) Command classes retrieve the required data from the EJBs, passing the data to the JSPs.
b) Command classes retrieve the required data from the EJBs, passing the data to the JSPs as an XML file.
c) JSPs retrieve the required data from the EJBs
b)
---
2)
A IBMBankOnline.com customer with multiple accounts can transfer funds from one account to another. When transferring funds,
source and destination accounts cannot be the same. Assuming the Account object is uniquely identifiable by the customer
number
and account type, what task should NOT be performed to complete this requirement?
a) Define a serializable AccountKey class.
b) Declare the two fields that uniquely identify an account as public members of the AccountKey class.
c) Implement the equals() and hashcode() methods on the AccountKey class.
d) Override the EJBObject's isIdentical() method in the Account bean class.
d)
---
3)
A business-to-business application is being written wherein the system receives requests from other companies to authorize
the credit
charge a customer has made. Typically, the client system performs a single request of the service during a customer session.
The
application's function is implemented using EJBs. The application service should be implemented as a:
a) CMP Entity Bean.
b) BMP Entity Bean.
c) Stateful Session Bean.
d) Stateless Session Bean.
d)
---
4)
A developer is writing a BMP Entity Bean that caches a reference to a database connection in a private field. The bean also
holds
references to two other objects, neither of which is serializable. Those two referenced objects are created from the
persistent
state of the bean. Which of the following MUST the developer do to handle the passivation requirements for this entity bean?
a) Make the database connection reference field transient.
b) Make the fields that hold the references to the non-serializable objects transient.
c) Create a writeObject(ObjectOutputStream) method on the entity bean which throws an instance of
java.io.NotSerializableException.
d) Create a writeObject(ObjectOutputStream) method on the entity bean which translates the object references into
serializable form.
e) Create a readObject(ObjectInputStream) method on the entity bean which translates the serialized data back into the
previously held
object references.
c), e)
[not sure, please explain!!!]
-------
6)
While testing a CMP Entity bean, a developer discovers that a change to one of the bean's properties is not being reflected
in the
database that contains the bean data. What are possible causes?
a) The ejbStore() method has a bug.
b) The ejbCreate() method has a bug.
c) The setter for the property has a bug.
d) The mapping of container managed fields to database fields has a bug.
e) The deployment descriptor has a bug.
f) The ejbLoad() method has a bug.
a), c), d), e)
[not sure, please explain!!!]
---
19)
The Customer EJB retrieving customer information from a database is to be displayed in a JSP. In order for the EJB provider
to make the
information from the Customer EJB available to the application assembler, the BEST approach is to provide the application
assembler with a:
a) Jar file containing the Customer bean's stubs, remote and home interface.
b) Wrapper object delegating all method calls to the remote Entity bean. The wrapper object provides access to only the
getter methods
defined in the Entity bean.
c) Wrapper object delegating all method calls to the remote Entity bean. The wrapper object provides access to the
bean's getter and
setter methods.
d) Wrapper object acting as a local attribute cache for the remote Entity bean. The wrapper object provides access to
the bean's
getter methods.
d)
[not sure]
---
---
8)
A client invokes the create() method on an CMP entity bean. Which of the following is a correct sequence in which the
operations mentioned
below are performed?
a. Container creates an EJBObject.
b. EJB home object invokes ejbCreate() on Bean instance.
c. Bean instance is associated with EJBObject.
d. Container creates new bean instance.
e. Container calls setEntityContext() on bean instance.
f. Container creates the bean representation in a database.
g. ejbPostCreate() method is invoked on bean instance.
a) b -> f -> a -> c -> g
b) b -> a -> f -> c -> e -> g
c) a -> d -> c -> b -> e -> g -> f
d) a -> d -> c -> b -> f -> g -> e
e) a -> c -> e -> b -> f -> g
a)
---
---
52)
Part of an application's business logic is implemented using a limited set of connections to a legacy system. The
development team want to
provide an EJB interface to this legacy code. The BEST approach to managing connection resources would be to use:
a) Stateful Session beans one per connection
b) Stateless Session beans one per connection
c) BMP Entity Bean one per connection
d) CMP Entity Bean one per connection
c
---------------------------------------------------------------------------------------------------
B. Design and build web components for JavaServer Pages (JSPs) and Servlets including IBM WebSphere specific features 10 10
100.0
9)
Given that the service() method of a typical servlet is multithreaded, which one of the following issues does NOT need to be
addressed
in a servlet's implementation?
a) Concurrent access to shared resources
b) Concurrent access to local variables
c) Concurrent access to static variables
d) Concurrent access to instance variables
b)
---
10)
When processing a request which of the following objects is BEST suited for sharing data between Servlets and JSPs?
a) request
b) session
c) context
d) application
---
11)
A Servlet must perform 3 operations that are independent of one another. They are time consuming with each operation
consuming about 10
msec of CPU. The Servlet's response depends on the completion of all three operations. The developer decides to perform each
operation
on a separate worker thread to run them concurrently. Which of the following describe important parts of this implementation?
a) The Servlet should implement MultiThreadModel.
b) The Servlet should implement SingleThreadModel.
c) Access to the HttpSession must be synchronized.
d) The worker threads must not write to the ServletOutputStream.
e) The worker threads must not read from the ServletInputStream.
d)
---
12)
Upon startup, a web application reads global information from a database into an object of type com.ibm.ApplicationInfo and
adds this
object to the servlet context. Which of the following tags allow for accessing this information from a JSP page?
a) < jsp:useBean id="appinfo" class=" com.ibm.ApplicationInfo" / >
b) < jsp:useBean id="appinfo" class="com.ibm.ApplicationInfo" scope="config"/ >
c) < jsp:useBean id="appinfo" class=" com.ibm.ApplicationInfo" scope="context"/ >
d) < jsp:useBean id="appinfo" scope="application" class=" com.ibm.ApplicationInfo" / >
d)
---
13)
Which of the following statements are TRUE about the implicit objects in JSP?
a) The in object can be used to retrieve user input.
b) The config object can be used to retrieve initial parameters.
c) The request object can be used to retrieve header information.
d) The dispatcher object is used to forward or include other Servlets or JSPs.
e) The context object can be used to retrieve context information such as referrer URI and MIME type.
b), c)
---
14)
A Web site is getting a lot of 'hits' and the amount of session data managed by the server is becoming too large for it to
handle.
Which of the following are appropriate ways to solve the problem?
a) Expand the capacity of the server.
b) Add additional servers to share the load.
c) Store the session data in a Cookie.
d) Store all session data in hidden fields on the web pages that are served.
a), b)
---
15)
Which of the following statements is FALSE about objects that implement the HttpSessionBindingListener?
a) They are notified when they are bound (placed) to the HttpSession
b) They are notified when they are unbound (removed) from the HttpSession
c) They are notified when they are placed in the HttpSessionContext
d) They can obtain details of the notification from a HttpSessionBindingEvent
c)
---
16)
A developer wishes to make a server function available to an applet via a Servlet. The applet passes the Servlet a
serialized object as
an argument. How should the developer implement the Servlet?
a) Sub-class HttpServlet and create an ObjectInputStream from the ServletInputStream in the doGet() method.
b) Sub-class HttpServlet and create an ObjectInputStream from the ServletInputStream in the service() method.
c) Sub-class GenericServlet and create an ObjectInputStream from the ServletInputStream in the doGet() method.
d) Sub-class GenericServlet and create an ObjectInputStream from the ServletInputStream in the service() method.
d)
---
17)
Which of the following statements are TRUE about the HttpServletRequest object?
a) getHeader() method should be used to retrieve HTTP header information.
b) getQueryString() method should be used to retrieve the query parameters.
c) getCurrentSession() method should be used to retrieve the current HTTP session.
d) getUserName() method should be used to retrieve the username of the authenticated user.
---
18)
A Servlet S1 forwards a request to Servlet S2. The BEST way for Servlet S1 to pass data to Servlet S2 is by saving the data
to:
a) A Cookie.
b) The request object.
c) The ServletContext.
d) The HttpSession object.
---
51)
A JSP is displaying data from a JavaBean accessed through a < jsp:useBean > tag. It is an error condition if the JavaBean is
not found in
the request scope at runtime. What should the JSP developer do to ensure correct behavior?
a) Specify the real JavaBean's Java type as the value for only the class attribute of the jsp:useBean tag.
b) Specify the JavaBean's Java type as the value for only the type attribute of the jsp:useBean tag.
c) Add an isErrorPage specification in a JSP page directive.
d) Add an errorPage specification in a JSP page directive.
b, d
--------------------------------------------------------------------------------------------------
C. Develop clients that access the enterprise components 4 3 100.0
20)
When the getStockPrice() method of the StockQuote SOAP service is invoked, an exception occurs. How is the exception
reported to the
SOAP client? Assume that the Apache SOAP V 2.2 toolkit is being used.
a) It is reported as a < SOAP-ENV:Fault > element of the response SOAP envelope.
b) It reported as a < SOAP-ENV:Exception > element of the response SOAP envelope.
c) A SOAPException is thrown.
d) The < faultcode > element indicates the fault type.
a), c), d)
---
21)
EJB client code uses an InitialContext to locate an EJB home interface. The InitialContext is typically obtained through the
use of the
constructor:
InitialContext(properties)
There are many environment variables which can be set in the properties parameter. The properties which are used by the
WebSphere
Application Server are:
a) INITIAL_CONTEXT_FACTORY
b) STATE_FACTORIES
c) OBJECT_FACTORIES
d) SECURITY_PROTOCOL
e) PROVIDER_URL
a), e)
---
30)
The following sequence of method calls occurred on a CMP Entity bean instance when a Session bean invoked its
businessMethod1() and
businessMethod2() methods from the same Session bean method in IBM WebSphere Application Server, Advanced Single Server
Edition for
Multiplatforms:
entityBean.ejbActivate()
entityBean.ejbLoad()
entityBean.businessMethod1()
entityBean.businessMethod2()
entityBean.ejbStore()
entityBean.ejbPassivate()
Assuming that the session bean is configured with TX_REQUIRED, what MUST be TRUE about the scenario that generated these
method calls?
a) The business methods are NOT configured with TX_REQUIRES_NEW.
b) Any persistent state changes that occur as a result of businessMethod1() are in the same transaction scope as changes
made by
businessMethod2().
c) Any persistent state changes that occur as a result of businessMethod1() are in a different transaction scope than
changes made
by businessMethod2().
d) ejbStore() will write the resultant state of the Entity bean to the persistent store.
a), b)
[not sure, if belongs to this section]
---
50)
For a business operation, a complex set of data is returned. The data is a subset of the data associated with an Entity
bean. Much of the
data needs to be presented back to the client through a JavaServer Page. What is the BEST technique to deliver the data back
to the JSP?
a) Create a JavaBean Wrapper access bean to access the Entity EJB.
b) Create a Value Object (JavaBean) specific to request, copying data from the EJB on construction.
c) Create a Value Object (JavaBean) which represents complete persistent object, copying data from the EJB on
construction.
d) Create a copy Helper access bean to access the Entity EJB.
e) Hand off a reference to the Entity bean directly to the JSP.
b)
[not sure, if belongs to this section]
----------------------------------------------------------------------------
D. Demonstrate understanding of database connectivity and connection pooling within IBM WebSphere Application Server 2 2
100.0
23)
A servlet program requests a database connection from a DataSource named "MyDatasource" connection pool. Based on the
connection, the
program executes a SQL statement, then the program releases the connection to the connection pool. The code in the servlet
that handles the
connection pool is as follows:
1: Hashtable parms = new Hashtable();
2: parms.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
3: Context context = new InitialContext(parms);
4: DataSource ds = (DataSource)context.lookup("MyDatasource");
5: Connection conn = ds.getConnection("userid", "PASSWORD");
6: Perform normal SQL Processing
7: if(conn!=null) conn.close()
a) 1,2,3
b) 1,2,3,4
c) 1,2,3,4,5
d) 1,2,3,4,5,6
e) 1,2,3,4,5,7
b)
[is right answer, why???]
---
24)
A DataSource named "MyDatasource" has been created and configured (in WebSphere Application Server, Advanced Single Server
Edition) to
have an "idle timeout" of 30 and a "minimum pool size" of 10. If a servlet acquires a connection from that DataSource, and
the servlet
holds the connection for 2 minutes without using it, which statement is TRUE?
a) The servlet's connection will be unaffected by the idle timeout.
b) The pool size will be increased by 10 when some other servlet needs a connection.
c) After 30 seconds, WebSphere can return the connection to the connection pool.
d) The servlet's service() method will throw a javax.sql.PooledConnectionException if the servlet attempts to use its
connection.
a)
---
----------------------------------------------------------------------------
E. Handle EJB transaction issues 6 6 100%
7)
Which of the following EJB transaction isolation attributes will ensure that dirty and non-repeatable reads do not occur?
a) Read uncommitted
b) Read committed
c) Rrepeatable read
d) Serializable
c, d
---
25)
A developer is writing an Account EJB in order to provide applications access to the Account database table. The
requirements are that
the table rows cannot be changed when the EJB is being accessed by applications within a single transaction. Given that the
transaction
attribute on the bean is set to TX_REQUIRED, the BEST way to achieve this goal is to configure the Account bean with a
transaction
isolation level of:
a) TRANSACTION_ALLOW_READONLY.
b) TRANSACTION_SERIALIZABLE.
c) TRANSACTION_REPEATABLE_READ.
d) TRANSACTION_READ_COMMITTED.
c)
---
26)
While executing a method on a Session bean configured with TX_BEAN_MANAGED, an IllegalStateException is thrown when trying
to commit
a transaction that spans multiple business method calls on the Session bean. A cause of this problem may be that:
a) The Session bean is declared as stateless.
b) At some point an exception has occurred and the transaction has been rolled back.
c) An Entity bean accessed in the scope of the transaction marked the transaction for rollback.
d) The Session bean method that starts the transaction was never called.
d)
---
27)
An application makes a findAll() call on the Home Interface of an Order CMP Entity Bean. The application wants to have
findAll() return
all committed orders including those which may have been committed (by another transaction) concurrent with the transaction
invoking the
findAll() method. What transaction isolation setting is NOT appropriate to apply to the Order CMP Entity bean if it is to
satisfy the
above condition?
a) Read uncommitted
b) Read committed
c) Repeatable read
d) Serializable
d)
---
28)
While testing a Session bean configured with "Bean Managed", a developer discovers that a TransactionRolledBackException is
being thrown
by a call to a method on an Entity Bean. The Session bean, prior to calling the method, explicitly started the transaction.
Possible causes for the exception are that the:
a) entity bean method is throwing a checked exception.
b) entity bean method is throwing an un-checked exception.
c) entity bean is configured with a transaction attribute of "Not Supported".
d) entity bean method is throwing an exception and the entity bean is configured with a transaction attribute of
"Requires New".
b, d
---
29)
While testing a BMP Entity Bean, a developer discovers that a transaction rollback does not cause a rollback of the changes
made to the
bean as it should. Which of the following should the developer suspect?
a) The ejbPassivate() method has a bug.
b) The ejbStore() method has a bug.
c) The ejbCreate() method has a bug.
d) The datastore does not support JTA.
e) The transaction does not implement javax.transaction.UserTransaction.
b, d
---
----------------------------------------------------------------------------
F. Develop J2EE components with IBM WebSphere Studio Application Developer for Windows, V4.0.3 8 6 75.0
5)
A developer needs to create a web site that displays information about a user's BankAccount. The information is contained in
a BankAccount
entity bean and is guaranteed to be accurate to within 1 day of account activity. Which of the following Access beans is the
BEST to use to
represent the BankAccount in this scenario?
a) RowSet
b) ColumnSet
c) Copy Helper
d) Proxy Wrapper
e) JavaBean Wrapper
c)
[not sure, if belongs to that section]
---
31)
What is the MOST direct way of exporting an enterprise application to WebSphere Application Server Advanced Edition from
Application
Developer?
a) Export EAR file from Application Developer and deploy using the Administration Console.
b) Export J2EE modules from Application Developer and use AAT to assemble and deploy.
c) Publish the EAR file to local or remote WAS AE.
d) Publish the EAR file to local or remote WAS AE and use AAT to deploy.
c)
---
32)
Which of the following tasks MUST a developer carry out, in order to map the "address" property of an EJB to columns in a
database?
Assume that the "address" field is an object of type Address with street, city, and postalCode as attributes.
a) Use the EJB converter/composer wizard to create a new composer.
b) Use the EJB converter/composer wizard to create a new converter.
c) Use the Mapping Editor to define the correspondence between the address field's attributes and the database columns.
a)
---
33)
A developer launches the EJB Test Client by selecting the EJB in the J2EE View and selecting "Run on Server." After the
server starts,
the following message is observed:
a) not perform lookup with JNDI name: a/b/MyEJB
b) hould the developer do to diagnose the problem?
c) Look at the Bindings page of the EJB Extension Editor.
d) Use netstat to identify port conflicts.
e) Look at the LoggingUtil.log file in the workspace's .metadata folder.
f) Look at the server's console to search for "Error starting" message for the MyEJB bean.
g) Look at the trace.log file under the workspace's .metadata\.plugins\com.ibm.etools.websphere.tools\logs directory.
c, f, g
[question might be BROKEN, am I right?]
---
34)
A bank's branches and the accounts held within a branch are modeled as CMP Entity Beans with 1:M relationship, that is,
every branch has
multiple accounts maintained in it. It is important that the Account EJB exposes a getBranch() accessor. Assuming that
Application
Developer's EJB development tools are used to implement the relationship, what are the different attributes that need to be
set?
a) The multiplicity on the Branch side of the relationship is 1..*.
b) The multiplicity on the Account side of the relationship is 0..*.
c) The Navigable property on the Branch side of the relationship.
d) The Navigable property on the Account side of the relationship.
b, c
---
35)
Which of the following EJB inheritance techniques are supported by the Application Developer EJB development tools?
a) root/leaf-inheritance map
b) single-table inheritance map
c) multiple-table inheritance map
a, b
---
36)
Which of the following statements are TRUE regarding the EJB validator in Application Developer?
a) It can validate against EJB 1.0 specification.
b) It can validate against EJB 1.1 specification.
c) It verifies the latest edition of the .class files.
d) It verifies the latest edition of the .java files.
e) It validates the application.xml file.
b, c
---
37)
When using Application Developer's "Create an Enterprise Bean" wizard to generate a CMP EJB, which of the following can be
generated for
the developer?
a) The Enterprise Bean class
b) The Home and Remote interfaces
c) The Primary Key class
d) The Finder Helper interface
e) Custom Finder methods
a, b, c
----------------------------------------------------------------------------
G. Assemble enterprise applications and deploy them in IBM WebSphere Application Server 7 6 85.0
---
22)
In order to permit an EJB client to lookup the EJB's home interface, the bean must publicize its JNDI name. Which of the
following are
ways a developer can establish the JNDI name for an EJB?
a) By the choice of the EJB Home interface name.
b) By the choice of the EJB Remote interface name.
c) Configuring name in the EJB deployment descriptor
d) Modifying the name during application installation
c), d)
---
39)
There are two web applications which share a set of common classes. The classes are packaged into a separate JAR file. The
WAR files
representing the two web applications do NOT refer to this common JAR file in their MANIFEST Class-Paths. The WAR files and
the JAR file
are packaged into an EAR file. In order for the applications to work when deployed in IBM WebSphere, what should the
Application Server's
"Module Visibility" attribute be set to?
a) SERVLET ENGINE
b) SERVER
c) MODULE
d) APPLICATION
b, d
---
40)
A self-service airline application needs to define a JDBC resource reference for a DB2 travel database in the deployment
descriptor.
Assuming that the logical name of the resource is "travel", what is the correct declaration?
a) java:comp/env/jdbc/travel
b) java:comp/env/travel
c) java:jdbc/env/db2/travel
d) java:comp/env/jdbc/db2/travel
b)
---
41)
When an Web module (WAR file) accesses an EJB module, what is the BEST way for a 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 Class-path of the Web module.
b) Specify the EJB JAR file in the MANIFEST Class-path 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 Class-path property of the EAR deployment
descriptor.
b)
---
42)
In the Application Assembly Tool of IBM WebSphere Application Server, Advanced Single Server Edition for Multiplatforms, V4,
defining a
CMP EJB method's "Access intent" as "read" has what effects on the application?
a) CMP fields cannot be modified in the read-only method.
b) CMP fields can be changed but are not written by the container to the database when the method completes.
c) The ejbStore() method is not called.
d) The ejbLoad() method is not called.
b, c [not sure]
---
44)
A Web application consists of HTML pages, Servlets, JSPs and JavaBeans. When creating the web module using Application
Assembly Tool's
"Create Web Module Wizard", which of the following MUST be done?
a) Specify the containing enterprise application EAR file.
b) Select the "File serving enabled" option.
c) Specify the "Context root".
d) Identify all HTML pages, Servlets and JSPs to be included in the web module.
e) Select the "Directory browsing enabled" option.
c,d
---
43)
A B2B application employs Servlets, JSPs, HTML pages, images, EJBs and Java classes. These Java classes are common to both
Servlets and
EJBs. What is the BEST way to package these components into J2EE modules?
a) Package the Servlets and JSPs into a WAR file, the Enterprise Beans into an EJB jar and the Java classes in a
separate JAR. After which package these archives along with the JSPs, HTML pages and images into an EAR file.
b) Package the Servlets, HTML pages, images and JSPs into a WAR file, the Enterprise Beans into an EJB jar and the Java
classes in a separate JAR. After which package these archives into an EAR file.
c) Package the Servlets, Java Classes, HTML pages, images and JSPs into a WAR file, the Enterprise Beans and the Java
classes into an EJB jar. After which package these archives into an EAR file.
d) Package the Servlets and JSPs into a WAR file, the Enterprise Beans into an EJB jar and the Java classes in a
separate JAR. Publish the JSPs, HTML pages and images to the Web Server document root and package the Java archives into an
EAR file.
b)
----------------------------------------------------------------------------
H. Use IBM WebSphere tools to validate aspects of the application server, such as security, performance, connection pools,
and session management 8 8 100.0
38)
Before exporting a Web project, for performance reasons, a developer would like to configure the application such that the
Web Server
serves the static content (such as .html and .gif), and the servlet container serves dynamic content (such as JSPs).
Which of the following actions MUST be performed?
a) Set the load-html-on-startup element in web.xml to false.
b) Set the fileServingEnabled attribute to false in ibm-web-ext.xmi file.
c) Set the fileServingEnabled attribute to false in ibm-web-bnd.xmi fil.
d) Do Nothing, because, by default, HTML pages are served by the web server and JSPs are served by the servlet
container.
b)
---
45)
Refer to the exhibit to answer the question.
Consider adding the Customer EJB to a TravelApplication Enterprise Application. If the findCustomersByPhoneNumber() is to be
accessible to
the Agent role, which method permission needs to be created? Assume the Application Assembly Tool (AAT) is being used.
a) Create a "Method Permission" mapping the Agent role to all the methods in the Customer EJB.
b) Create a "Method Permission" mapping the Agent role to all the finder methods in the Customer EJB.
c) Create a "Method Permission" mapping the Agent role to the findCustomersByPhoneNumber() methods in the Customer EJB.
d) Create a "Method Permission" mapping the Agent role to all the methods in the home interface of the Customer EJB.
c)
---
46)
Which of the following are effective ways of handling errors in Web applications when using IBM WebSphere Application
Server, Advanced
Single Server Edition for Multiplatforms, V4?
a) Invalidate the session and forward the request to login page.
b) Define an error page for each web module configured using the Application Assembly Tool.
c) Call the sendError() method in HttpServletResponse from the Servlet where the error occurred.
d) Configure an error page to be triggered by each unique Application exception using the Application Assembly Tool.
b, c
---
47)
A developer noticed that the performance of the Application Server has degraded since a new web application was installed.
Further
examination reveals that more than one instance of the same servlet is currently loaded in this web application. A possible
cause for
this performance problem is that:
a) a custom ClassLoader has been defined for the installed WebApplication.
b) the servlet implements the SingleThreadModel interface.
c) components of the installed application appear to invoke the servlet both by name and by class name.
b)
---
48)
Which of the following mechanisms can be employed to modify the trace settings of the WebSphere Admin Server?
a) By using the OLT client.
b) By editing the server-cfg.xml file.
c) By using the Administrator's Console.
d) By editing the bootstrap.properties file.
b, c
---
49)
When designing a primary key generator for your J2EE application, which of the following would be the BEST option?
a) Depend on database specific key generation support, accessible through stored procedure
b) Build custom key generation engine deployed to database, accessible through stored procedure
c) Use a local primary key generation algorithm to eliminate synchronization delays
d) Use local management and delivery of centrally generated primary keys
d) [not sure if this is right section, might be a. Not sure if I am wright]
53)
Given the design goal of having an application be able to be configured as robust as possible, which techniques should the
developer
AVOID in their design?
a) Use persistent HttpSessions to manage application state data.
b) Use Stateful Session EJBs to manage application state data.
c) Make references to node specific resources.
d) Make all resource references via either java:comp/ JNDI references or EJB environment values.
b, c
[ May 28, 2002: Message edited by: Axel Janssen ]