10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Enterprise Bean Example Applications<br />

826<br />

To map the role of BeanUser that is defined for this application to the group with the name of<br />

user in the file realm of the Application Server, specify the security-role-mapping element as<br />

shown below. Make sure that the role-name and group-name elements are specified exactly as<br />

they are used (the mapping is case-sensitive).<br />

To specify username-password login and a secure connection, use the ior-security-config<br />

element. <strong>The</strong> IOR security elements are described in more detail in “Configuring IOR Security”<br />

on page 814.<br />

<strong>The</strong> following sun-ejb-jar.xml file demonstrates how to specify a secure connection,<br />

username-password login, and security role mapping. <strong>The</strong> completed version of this file can be<br />

found in<br />

tut-install/javaeetutorial5/examples/ejb/converter-secure/converter-secure-ejb/<br />

src/conf/sun-ejb-jar.xml.<br />

<br />

<br />

<br />

<br />

BeanUser<br />

user<br />

<br />

<br />

0<br />

<br />

ConverterBean<br />

ConverterBean<br />

false<br />

<br />

<br />

supported<br />

supported<br />

<br />

supported<br />

<br />

<br />

supported<br />

<br />

<br />

<br />

username_password<br />

file<br />

true<br />

<br />

<strong>The</strong> <strong>Java</strong> <strong>EE</strong> 5<strong>Tutorial</strong> • June 2010

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

Saved successfully!

Ooh no, something went wrong!