16.10.2015 Views

Getting Started with WebSphere Application Server

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix A – Solutions to review questions 213<br />

8. D<br />

9. D<br />

10. C<br />

Chapter 5 – EJB<br />

1. ejbd://localhost:4201<br />

2. [EJB name] + Local and [EJB name] + Remote<br />

3. First, refer to the EJB in the servlet; then, add the EJB to the dependency list of the<br />

servlet.<br />

4. First, import or copy the interface file of an EJB to the application client; second, find<br />

the EJB <strong>with</strong> JNDI; finally, invoke the methods in the EJB interface<br />

5. First, create a database pool in Community Edition; second, create the JPA project<br />

in Eclipse; then, create a database connection in Eclipse; finally, generate JPA<br />

entities<br />

6. A, B, C<br />

7. B, E<br />

8. A, B<br />

9. A, B<br />

10. B<br />

Chapter 6 – Messaging<br />

1. Http is synchronous while message is asynchronous.<br />

2. Point-to-Point messaging model and Publish/Subscribe messaging model<br />

3. Use the following steps to develop a JMS client application that produces<br />

message:<br />

- Use JNDI to get Connection Factory and Destination in a created JMS resource<br />

Group.<br />

- Use Connection Factory to create a Connection.<br />

- Use Connection to create a Session.<br />

- Use the Session to create a MessageProducer to the Destination.<br />

- Use the MessageProducer to send message.<br />

4. Create JMS resource group including Connection Factory and Destinations in<br />

Community Edition.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!