aspose file tools*
The moose likes Product and Other Certifications and the fly likes 287 Pre-assessment test questions - Please answer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "287 Pre-assessment test questions - Please answer" Watch "287 Pre-assessment test questions - Please answer" New topic
Author

287 Pre-assessment test questions - Please answer

aakash punnamaneni
Greenhorn

Joined: Apr 01, 2005
Posts: 2
Following are the questions which I think I couldn't answer correctly, please help me. Thanks.


Item 1
What is the best practice for implementing the business logic in a message-driven bean (MDB) that needs to interact with other EJBs in the system?

A. Implement the business logic in the onMessage() method of the MDB.
B. Factor the business logic into one or more JavaBeans to increase their reuse.
C. Use a session EJB to implement the business logic and interact with the other EJBs.
D. Use a Java bean wrapper access bean to encapsulate the business logic.

My answer : C

Item 2
When setting up the JMS server, in a test environment which is already running message-driven beans (MDB), which of the following properties MUST be configured to correctly communicate messages to a new MDB?

(Select 2)

A. Queue JNDI name
B. Initial state to: Started
C. Queue name
D. Connection factory JNDI name
E. Listener port name

My answer :




Item 3
A developer implements a web-based business process which spans multiple steps. The developer should prefer maintaining state between the steps with stateful session beans instead of HttpSession objects IF:

(Select 3)

A. there are also non-Web-based clients
B. a single HTTP request maps a business method call
C. transactions can span multiple business process steps
D. the client-specific state data is small
E. a single HTTP request involves several calls to entity beans


My answer : A,C,E



Item 4
A developer is going to use an existing class named DataContainer. This class has a lot of fine-grained attributes and the data represented will be only used as a whole. When designing an entity bean that declares a persistent field of type DataContainer with IBM WebSphere Studio V5 the developer:

(Select 3)

A. makes use of dependent value class concept
B. can use an EJB composer to map the attributes to database columns
C. should declare the DataContainer class as serializable and abstract
D. is able to query the attributes of DataContainer class with EJB QL


Item 5
Which of the following MUST be provided in a tag library descriptor XML file?

(Select 2)

A. The version of JSP custom tags being used.
B. The version of J2EE for the custom tag library.
C. The definition of at least one custom tag.
D. The short name of the web application in which the library is used.
E. The prefix for the custom tags defined in the library.




Item 6
A developer wishes to hide the name of a servlet class from users of a web application for security reasons. Which of the following are the BEST ways to accomplish this?

(Select 2)

A. Modify the mapping in the New Servlet Wizard when creating the servlet.
B. Modify the mapping in the Web Deployment Descriptor editor.
C. Use a proxy translator to map the external URL to the servlet class.
D. Configure the mapping in the configuration editor for the WebSphere V5.0 Test Environment.
E. Modify the mapping in the properties dialog for the servlet.

My Answer : B, -


Item 7
What items MUST be specified when defining a custom web service XML-to-Java mapping during the creation of a web service SOAP client?

(Select 2)

A. a Java class to map to
B. a deserializer class
C. a marshaller method
D. an unmarshaller method




Item 8
A developer wants to generate access beans for session EJBs that have remote interfaces. Which type of access bean, generated by WebSphere Studio, is appropriate to meet this requirement?

A. Java bean wrapper
B. Copy helper
C. Row set
D. Data class



Item 9
A developer has finished writing a message-driven bean to handle messages arriving from a business partner. WebSphere Application Server has been installed on a test machine and a connection factory and destination have been configured for the embedded JMS provider using the Administrative Console, but no other configuration has been performed. What other configuration task MUST be completed before the MDB can be tested on the test server?

A. Add a new message listener port
B. Enable the message listener service
C. Specify a message passivation directory
D. Specify the native library directory


Item 10
A DataSource named "MyDatasource" has been created and configured (in WebSphere Test Environment) to have an "Unused timeout" of 30 and a "Minimum connections" 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 Unused 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.




Item 11
Which of the following statements are TRUE about tuning Data Source connection pools?

(Select 2)

A. For better performance, set the Maximum Connections value for the connection pool lower than the value for the Max Connections in the Web container.
B. For better performance, set the Reap Time interval to a very small value.
C. Set the Reap time interval to a value less than that of Unused Timeout and Aged Timeout settings.
D. Maximum connections defines the total number of connections that are created by all servers in a cluster.



Item 12
The following sequence of method calls occurred on a CMP entity bean instance when a session bean invoked the CMP's businessMethod1() and businessMethod2() methods from the same session bean method entityBean.ejbActivate() entityBean.ejbLoad() entityBean.businessMethod1() entityBean.businessMethod2() entityBean.ejbStore() entityBean.ejbPassivate() Assuming that the session bean is configured with 'Required', what MUST be TRUE about the scenario that generated these method calls?

(Select 2)

A. The business methods are NOT configured with 'RequiresNew'
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.


My Answer : A, B


Item 13
Two enterprise applications use a third party software (like Apache Xerces). While the actual versions of the third party software used are different between the two applications, the name of the JAR files across different versions is the same. To ensure proper running of these enterprise applications, which of the following should be used in WebSphere Application Server, V5.0 for application classloading policy?

A. SERVLET ENGINE
B. SERVER
C. APPLICATION
D. MULTIPLE
E. SINGLE





Item 14
Which of the following may be performed when a packaged enterprise application (EAR file) is deployed or installed in WebSphere Application Server, V5.0?

(Select 2)

A. Generate the deploy code for enterprise beans in EJB modules.
B. Define the custom tag libraries used by the JSPs in the web module deployment descriptor.
C. Specify "Context Root" for each web module.
D. Generate Access beans for any enterprise beans.
E. Map entity beans to relational database schema.






Item 15

An "account" CMP bean has a container-managed relationship to a "customer" CMP bean. The account table reflects the relationship with a foreign key relating to the customer table. The foreign key is declared with a "NOT NULL" constraint. When creating a new account for a customer the developer MUST:

(Select 2)

A. set the customer in the ejbCreate method of the account bean
B. set the customer in the ejbPostCreate method of the account bean
C. set the account in the ejbPostCreate method of the customer bean
D. provide a local interface for the customer CMP entity bean

My Answer : B

Item 16

How can a developer set the port number for the web container while running an enterprise application using WebSphere V5 test environments in WebSphere Studio Application Developer, V5?

A. By defining the port number in the deployment descriptor of the web modules in the enterprise application.
B. By defining the port number in the deployment descriptor of the enterprise application.
C. By defining the port number in the deployment descriptor of the ejb modules in the enterprise application.
D. By defining the port number in the test environment Server Configuration.

My Answer : D


Item 17
Which of the following may be specified by the deployment descriptor of a web module?

A. The application EAR file that would contain this web module.
B. The "Context Root" for the web module
C. The list of servlets included in the web module.
D. The list of shared libraries the web module depends on.
E. The file system path in which the web module should be deployed.

My Answer : C


Item 18
The following are all true about Message Listener ports configured in the application server to support message-driven beans EXCEPT:

A. The same listener port can be used for more than one message-driven bean.
B. The listener port is bound to a specific JMS provider and a specific queue or topic managed by that JMS provider.
C. Listener ports can be configured to be started explicitly or automatically started when the Application Server starts.
D. Listener ports will ignore any messages posted to the queue or topic for which they are configured prior to being started.



Item 19

Which of the following is NOT a benefit of marking a resource reference to a DataSource in the server configuration as SHAREABLE?

A. Multiple connection handles can be mapped to the same physical database connection.
B. Applications do not tie up physical database connections when they are not accessing the database.
C. The isolation level for each connection handle can be set by an application as needed.
D. Connection handles can be cached and then reused after the application has completed it's database transaction.

My Answer :



Item 20
In addition to using the server configuration editor, which of the following methods can be employed to modify the trace specifications of a server running the WebSphere test environment in WebSphere Studio?

(Select 2)

A. Programatically, calling the setTraceSpec(String) method of the com.ibm.etools.Trace class.
B. Edit the server-cfg.xml file.
C. Through the Administration Console.
D. Edit the bootstrap.properties file.




Item 21
Given the design goal of having an application be as robust as possible, which techniques should the developer AVOID in the design?

(Select 2)

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 java:comp/env JNDI references.

My Answer : B, C


Item 22
An application uses BMP to manage the persistence of Customer and Address entity beans. Customers must have exactly one Address. Given this composition relationship and assuming that Customer holds the primary key for Address in a persistent field, which methods might be part of the implementation for Customer?

(Select 2)

A. The ejbRemove() method of Customer invokes the remove() method of Address.
B. The ejbLoad() method of Customer invokes the findByPrimaryKey() method of AddressHome.
C. The ejbLoad() method of Customer invokes the ejbLoad() method of Address.
D. The ejbStore() method of Customer invokes the ejbStore() method of Address.
E. The ejbPassivate() method of Customer invokes the ejbPassivate() method of Address.


My Answers : A, C
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: 287 Pre-assessment test questions - Please answer