• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

long post IBM.158

 
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Axel,
Thank you very much for your long list. It helps a lot!
I got 100% on session 1, so pick up two answers different from yours.
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)
-----------------------
Answer is: a
Since the controller servlet uses the Command/Mediator pattern to process the requests. In Jsp file, the response data can be trasfer to xml format. If passing the data as an xml file by servlet, its functionality is too much.
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!!!]
-----------------------------------
The answer should be a & b.
database connection reference should never be persisted since it is machine dependent.

For session 7:
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)
---------------
answer is a)
java:comp/env/jdbc/ is a recommended place to put jndi reference for jdbc driver.
I will check other questions soon.
And thanks again to answer my transaction questions!

Bruce
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bruce,
thank you very much, too.
I will progress in small steps now.
Only changed question 1. You were right!
With question 40 I am quite sure that my original answer was right.
comp/env/jdbc/ is the recommended space, but its not more than a recomendation. And as the logical name of the ressource is travel and not "jdbc/travel" the correct declaration is comp/env/travel.
Will check 4) later.
regards Axel
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bruce Yu:

4)
[AJ:] c), e)
[not sure, please explain!!!]
-----------------------------------
[BY:] The answer should be a & b.
database connection reference should never be persisted since it is machine dependent.


Bruce,
thats what I thought first, too.
But: Transient does not work in EJB. In EJB transient fields do n.o.t to be set to their initial values after deserialization. They can contain arbitrary values, when the bean is activated! (Monson-Haenffel 3, p 361f.)
Are connections serializable? This might explain why method should throw NotSerializableException.

Axel
 
Bruce Yu
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Axel Janssen:

But: Transient does not work in EJB. In EJB transient fields do n.o.t to be set to their initial values after deserialization. They can contain arbitrary values, when the bean is activated! (Monson-Haenffel 3, p 361f.)
Are connections serializable? This might explain why method should throw NotSerializableException.



I think the connection reference can be acquired in ejbActivate() method -- set the tranient field in this method. I remember that the connection should set transient in entity bean in an article some time ago, but forgot which article I read.
Anyway, I will check Monson-Haenffel's tonight.

Bruce
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bruce,
you are right. You know why?
 
Bruce Yu
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Axel Janssen:
Bruce,
thank you very much, too.
I will progress in small steps now.
Only changed question 1. You were right!
With question 40 I am quite sure that my original answer was right.
comp/env/jdbc/ is the recommended space, but its not more than a recomendation. And as the logical name of the ressource is travel and not "jdbc/travel" the correct declaration is comp/env/travel.
Will check 4) later.
regards Axel


Axel,
Did you find correct answer is "jdbc/travel" ? The logical name of the resource means data source name, so you should put data source name under comp/env/jdbc as the best choice for this question.
And glad that you realized the correct answer for Question 4. your insight is appreciated.
Bruce
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got 98% 52/53 Thanx to Axel!!!
And the question that is wrong is the broken
question (question 34)javascript: x()
Big Grin
However:
b is funny!
d is not good
( the metadata\.plugins\com.ibm.etools.websphere.tools\logs)
does not exist)
answering by (c, e and f) or (d, e, f) are not valid either ...
Here's my anwers
Robert

1) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: d
*******************************
2) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: a
*******************************
3) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: a
*******************************
4) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: d
*******************************
5) 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.
answers: a, c, d, e
*******************************
6) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: c
*******************************
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
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: c, d
*******************************
8) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: a, b
*******************************
9) 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" / >
Single Select - Please select the best answer (one and only one choice must be selected).
answer: d
*******************************
10) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: b
*******************************
11) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: c
*******************************
12) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: a, b
*******************************
13) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: a
*******************************
14) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: a, b
*******************************
15) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, c
*******************************
16) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: d
*******************************
17) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: d
*******************************
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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: b
*******************************
19) 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.
Multiple Select - Please select all of the correct answers (this question has 3 correct choices).
answers: a, c, d
*******************************
20) 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
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: c, d
*******************************
21) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: d
*******************************
22) 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
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: a, e
*******************************
23) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: a
*******************************
24) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: b
*******************************
25) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: d
*******************************
26) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: c
*******************************
27) 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".
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b,d
*******************************
28) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, d
*******************************
29) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: d
*******************************
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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: a, c
*******************************
31) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: a
*******************************
32) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: a
*******************************
33) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, c
34) 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.
Multiple Select - Please select all of the correct answers (this question has 3 correct choices).
answers: c, e, f
*******************************
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
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: a, b
*******************************
36) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: b
*******************************
37) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, c
*******************************
38) 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
Multiple Select - Please select all of the correct answers (this question has 3 correct choices).
answers: a, b, c
*******************************
39) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, c
*******************************
40) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: c, d
*******************************
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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: a
*******************************
42) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: a
*******************************
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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: b
*******************************
44) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: c
*******************************
45) 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
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, d
*******************************
46) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, d
*******************************
47) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answers: b
*******************************
48) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answers: b
*******************************
49) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answers: c
*******************************
50) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, c
*******************************
51) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: a
*******************************
52) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, c
*******************************
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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, c
*******************************
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unfortunately, this is 92%. I tried those answers carefully twice and got the same result.

Test
Category
Number of
Questions
Number of
Correct
Average
Score

3. Develop clients that access the enterprise components 4 4 100.0
6. Develop J2EE components with IBM WebSphere Studio Application Developer for Windows, V4.0.3 8 7 87.0
4. Demonstrate understanding of database connectivity and connection pooling within IBM WebSphere Application Server 2 2 100.0
2. Design and build web components for JavaServer Pages (JSPs) and Servlets including IBM WebSphere specific features 10 10 100.0
1. Design and build reusable enterprise components 8 8 100.0
5. Handle EJB transaction issues 6 5 83.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 7 87.0


# Questions: 53 Passing Score: 62.0
Number Correct Needed: 33 Your Score: 92.0
You Answered Correct: 49 Grade: Pass


Originally posted by rlaflamme:
I got 98% 52/53 Thanx to Axel!!!

 
Robert Laflamme
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Please, excuse-me but SanjayJ was wright. There
are 3 error from my last post. Here's a new version of the long post 158:
1) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: d
*******************************
2) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: a
*******************************
3) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: a
*******************************
4) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: d
*******************************
5) 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.
answers: a, c, d, e
*******************************
6) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: c
*******************************
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
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: c, d
*******************************
8) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: a, b
*******************************
9) 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" / >
Single Select - Please select the best answer (one and only one choice must be selected).
answer: d
*******************************
10) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: b
*******************************
11) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: c
*******************************
12) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: a, b
*******************************
13) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: a
*******************************
14) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: a, b
*******************************
15) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, c
*******************************
16) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: d
*******************************
17) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: d
*******************************
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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: b
*******************************
19) 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.
Multiple Select - Please select all of the correct answers (this question has 3 correct choices).
answers: a, c, d
*******************************
20) 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
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: c, d
*******************************
21) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: d
*******************************
22) 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
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: a, e
*******************************
23) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: a
*******************************
24) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: b
*******************************
25) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: d
*******************************
26) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: c
*******************************
27) 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".
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b,d
*******************************
28) A developer is writing an Account EJB in order 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, d
*******************************
29) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: d
*******************************
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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: a, b
*******************************
31) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: a
*******************************
32) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: a
*******************************
33) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, c
34) 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.
Multiple Select - Please select all of the correct answers (this question has 3 correct choices).
answers: d, e, g
*******************************
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
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: a, b
*******************************
36) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: b
*******************************
37) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, c
*******************************
38) 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
Multiple Select - Please select all of the correct answers (this question has 3 correct choices).
answers: a, b, c
*******************************
39) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, c
*******************************
40) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: c, d
*******************************
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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: b
*******************************
42) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: a
*******************************
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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: b
*******************************
44) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: c
*******************************
45) 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
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, d
*******************************
46) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, d
*******************************
47) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answers: b
*******************************
48) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answers: b
*******************************
49) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answers: c
*******************************
50) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, c
*******************************
51) 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
Single Select - Please select the best answer (one and only one choice must be selected).
answer: d
*******************************
52) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, c
*******************************
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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, c
*******************************
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bruce, Alex and Robert,
what? all these questions are from sample test or the actual test? just curious
 
Robert Laflamme
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by padma:
Hi Bruce, Alex and Robert,
what? all these questions are from sample test or the actual test? just curious



Hi padma,
These are from the sample test (IBM ICE).
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. The answer to the question below might be RowSet instead of Copy Helper. Here is a link and some info that may mean RowSet is the access bean to use here.
Question: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?
http://www.transarc.ibm.com/Library/documentation/websphere/appserv35/atswfg/atswfg20.htm#FIGROWSETFIG
"All of the enterprise beans are wrapped with access beans. Access beans simplify the programming model for the user by concealing an enterprise bean's home and remote interfaces, allowing the bean to be treated as a local JavaBeans component. For example, the WebCommands in the sample application do not directly access the enterprise beans. Instead, they use access beans to simplify their interactions with the enterprise beans. Three different types of access beans -- wrapped bean, copy helper, and rowset -- are used in the enterprise bean implementations of the sample application.
The session bean, BankTasks, uses a wrapped bean. This type of access bean is used with a session bean instance. Figure 68 shows how a client can access methods on a session bean that uses a wrapped bean access bean.
The entity Beans, Customer, TranRecord, and BankAccount all use CopyHelper access beans. This type of access bean maintains a local copy of the enterprise bean, reducing the number of remote requests when attributes are retrieved from the object. Figure 69 shows how a client can get information from an entity bean that is wrapped with a CopyHelper access bean.
The BankAccount and TranRecord objects also use a rowset access bean. This type of access bean allows you to work with multiple instances of an entity bean without having to instantiate them individually. It also maintains local copies of the enterprise beans. The access bean returns indexed results to make it easier for a JSP page to display the returned data. Figure 70 shows how a JSP client can loop through a rowset access bean.
For more information on access beans, see Access beans. The VisualAge for Java documentation describes how to create and use access beans.
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Reed,
without checking it by starting WSAD I am quite sure it can't be RowSet, because it does not exist in WSAD. This exam is about WSAD, not VAJ.
regards Axel
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, the broken question should be read in this way:
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:
not perform lookup with JNDI name: a/b/MyEJB
What should the developer do to diagnose the problem?
a) Look at the Bindings page of the EJB Extension Editor.
b) Use netstat to identify port conflicts.
c) Look at the LoggingUtil.log file in the workspace's .metadata folder.
d) Look at the server's console to search for "Error starting" message for the MyEJB bean.
e) Look at the trace.log file under the workspace's .metadata\.plugins\com.ibm.etools.websphere.tools\logs directory.
Multiple Select - Please select all of the correct answers (this question has 3 correct choices).

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
not perform lookup with JNDI name: a/b/MyEJB
What should the developer do to diagnose the problem?
a) Look at the Bindings page of the EJB Extension Editor.
b) Use netstat to identify port conflicts.
c) Look at the LoggingUtil.log file in the workspace's .metadata folder.
d) Look at the server's console to search for "Error starting" message for the MyEJB bean.
e) Look at the trace.log file under the workspace's .metadata\.plugins\com.ibm.etools.websphere.tools\logs directory.
Multiple Select - Please select all of the correct answers (this question has 3 correct choices).
The right answers:
a,d,e
100% of all
Thanks everybody.

 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you!
mission completed
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
33) 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.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
answers: b, c
----------------------
Could (a) be correct? A branch can have many accounts.. right?
 
Howard Kung
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Another question, why c is correct? Here is what I see..
EJB: Branch EJB: Account
Role of Account: Account Role of Branch: Branch
Navigable: uncheck Navigable: check
Many: check Many: uncheck
Required: uncheck Required: check
Foreign Key: check Foregin Key: uncheck
Since Account EJB need to have getBranch(), thus navigable should be checked at the Account side. And an Account must belonged to a Branch, thus the Required at the Account side is also checked. I think the answer should be (a,d)..
Any idea?
 
Howard Kung
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry guys, discard my previous posts. I was reading VAJ's redbook instead of WSAD. Why ibm has to make things so different?
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello community,
i've just tried your long list.
and i've got this result :
3. Develop clients that access the enterprise components
4
4
100.0

6. Develop J2EE components with IBM WebSphere Studio Application Developer for Windows, V4.0.3
8
7
87.0

4. Demonstrate understanding of database connectivity and connection pooling within IBM WebSphere Application Server
2
2
100.0

2. Design and build web components for JavaServer Pages (JSPs) and Servlets including IBM WebSphere specific features
10
10
100.0

1. Design and build reusable enterprise components
8
8
100.0

5. Handle EJB transaction issues
6
6
100.0

7. Assemble enterprise applications and deploy them in IBM WebSphere Application Server
7
7
100.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.0

and i'don't know which question i answered wrong.
do you anybody has an idea ?
thanks

faithfully
commnunity man
 
Robert Laflamme
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by community man:

...
and i'don't know which question i answered wrong.
do you anybody has an idea ?
thanks

faithfully
commnunity man[/QB]


Hello "community man",
Question 34 was broken at the time I did the test (last July) on ICE. Maybe it's fixed now. Also, I don't have the correct answer on this one -- sorry .
Good Luck
-Robert
 
Ranch Hand
Posts: 2378
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this exam's difficulty level similar to this sample test? And did you feel time pressure, 53 ques in 90 minutes?
 
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the good work! it makes passing easier for others!
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To clarify question 40) JNDI stuff...
Excerpt from IBM site: http://publib7b.boulder.ibm.com/wasinfo1/en/info/ee/ae/rdat_jnditips.html
"For WebSphere Application Server specifically, when you create a data source the default JNDI name is set to jdbc/data_source_name. When you create a connection factory, its default name is eis/j2c_connection_factory_name. You can, of course, override these values by specifying your own."
However,
"When creating a connection factory or data source, a JNDI name is given by which the connection factory or data source can be looked up by a component. Generally an "indirect" name with the java:comp/env prefix should be used."
[ May 30, 2003: Message edited by: Asifur Rahman ]
[ May 31, 2003: Message edited by: Asifur Rahman ]
[ May 31, 2003: Message edited by: Asifur Rahman ]
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi All,
After reviewing the answers, posted, to the questions from the ICE test, I think the answer to the question '28' should be 'b'.
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".
The answer 'd' can not be true as the client (Session Bean) is receiving the TransactionRolledBackException exception. The 'TransactionRolledBackException' is thrown only when the bean executes in the client's transactional context and the bean has one of the following transactional attributes,
1.Required
2.Mandatory
3.Supports
Other way of looking at the option 'd' is,
if the bean has the 'Requires New' as the transactional context , container will always
suspend the client's transaction (if client has started one) and start a new transaction for the bean's method.
In case of a system exception, the container will,
1. roll back the bean's transaction.
2. throw RemoteException exception.
3. The client's transaction can resume and is un-affected.
Reference : Table 8, section : 12.3.1 (page: 191) in ejb_1.1_spec doc).
Please correct me, if I am wrong.
Thank you,
-Manish
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Manish, it makes sense but i'm naa too sure. i'll attempt to look into my ref ASAP and try to answer,,
by the way do we have more mock tests other than IBM?
 
Manish Sarlashkar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Mano,
I have verified, by creating the same scenario, for Q. 28 (one BMT session bean and a CMP entity bean with 'RequiresNew' Tx context[throws RemoteException] ; and also 'Required' Tx context[throws TransactionRolledBackException]), that it exactly happens, as I have mentioned in my previous posting.
And if ICE gives the result of Q.28 as 'b','d' instead of just 'b', then it has a bug.
Thanks,
-Manish
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone please explain why the answer is a here ? Any reference article?
23) 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.
Single Select - Please select the best answer (one and only one choice must be selected).
answer: a
 
Manish Sarlashkar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Debalina,
Let me try to answer your question.
The IDLE_TIMEOUT defines the time out time from the 'Pooled' state to 'Does not exist' state for a connection in a pool. For this the state has to be 'Pooled' and not 'In use'. So this time out will not affect the connection which is in, 'In Use' state (by servlet).
Also, the MIN_POOL_SIZE value is 10, which is acceptable and the question does not have any further details on it.
So, let's evaluate eac option,
a) The servlet's connection will be unaffected by the idle timeout.
--> As metnioned earlier, the idle_timeout setting does not affect the connection in use. **Possible right choice.
b) The pool size will be increased by 10 when some other servlet needs a connection.
---> The min_pool_size is 10, but we do not know what is the current pool size, and also, even if the pool size is less than 10, the server never creates the pool with min size or increments the pool size with min size. But it keeps on creating one connection per request until the pool size reaches the min size and this is done only if, there is no connection in the pool that can satisfy the current connection request.
**So in any case this is a wrong choice.
c) After 30 seconds, WebSphere can return the connection to the connection pool.
---> Same explanation as given for choice 'a'. The idle_timeout does not affect the in use connection. This could have true only if, ORPHAN_TIMEOUT would have been set to 15 secs and the connection was not involved in a transaction.
** So this is not a right choice.
d) The servlet's service() method will throw a javax.sql.PooledConnectionException if the servlet attempts to use its connection.
--->There is no exception class by name, javax.sql.PooledConnectionException.
Also, the server will throw only StaleConnectionException in this case, only if the connection was orphaned or the connection was cleaned-up after a transaction (if DISABLE_AUTO_CONN_CLEANUP is false).
** So a wrong choice.
So option 'a' is the right answer.
For Webpshere Connection pooling refer to ,
(can search on google.com)
WebSphere Connection Pooling
by
Deb Erickson
Shawn Lauzon
Melissa Modjeski
Hope it helps.
-Manish
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic