29.01.2013 Views

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

SHOW MORE
SHOW LESS

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

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

Note: The JNDI name is case sensitive, so make sure you match what is<br />

specified in the code. If you have a connection problem, the messages on<br />

the server console will give you enough information to correct the problem.<br />

The option at the bottom to use the data source in container-managed<br />

persistence (CMP) is not relevant for <strong>WebSphere</strong> <strong>Application</strong> <strong>Server</strong> -<br />

Express since it does not support an EJB environment. Selecting this has no<br />

effect.<br />

Note: In 6.2.7, “Database connections” on page 194, you saw that the<br />

Database Web Pages wizard generated connection code that specified a<br />

user ID and password retrieved from the servlet initiation parameters to<br />

authenticate to the database.<br />

An alternative to this is to define the database connection user ID and<br />

password in a JAAS authentication entry in the server configuration (under<br />

the Security tab) and then specify this entry in the Component-managed<br />

authentication alias field in the data source. See 16.5, “JAAS security” on<br />

page 570, for an example.<br />

11.Click Next. In the next window select the databaseName property. In the<br />

value field, enter SALESAPP.<br />

Chapter 6. Accessing databases 207

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

Saved successfully!

Ooh no, something went wrong!