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

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

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

■ <strong>The</strong> method element uses the ejb-name, method-name, and method-params elements to<br />

denote one or more methods of an enterprise bean’s business interface, home interface,<br />

component interface, and/or web service endpoints.<br />

<strong>The</strong>re are three legal styles for composing the method element:<br />

■ <strong>The</strong> first style is used for referring to all of the business interface, home interface,<br />

component interface, and web service endpoints methods of a specified bean.<br />

<br />

EJB_NAME<br />

*<br />

<br />

■ <strong>The</strong> second style is used for referring to a specified method of the business interface, home<br />

interface, component interface, or web service endpoints methods of the specified enterprise<br />

bean. If the enterprise bean contains multiple methods with the same overloaded name, the<br />

element of this style refers to all of the methods with the overloaded name.<br />

<br />

EJB_NAME<br />

METHOD<br />

<br />

■ <strong>The</strong> third style is used for referring to a specified method within a set of methods with an<br />

overloaded name. <strong>The</strong> method must be defined in the business interface, home interface,<br />

component interface, or web service endpoints methods of the specified enterprise bean. If<br />

there are multiple methods with the same overloaded name, however, this style refers to all<br />

of the overloaded methods. All of the parameters are the fully-qualified <strong>Java</strong> types, for<br />

example, java.lang.String.<br />

<br />

EJB_NAME<br />

METHOD<br />

<br />

PARAMETER_1<br />

PARAMETER_2<br />

<br />

<br />

<strong>The</strong> following example illustrates how security roles are assigned method permissions in the<br />

deployment descriptor:<br />

...<br />

<br />

employee<br />

<br />

EmployeeService<br />

*<br />

<br />

Securing Enterprise Beans<br />

Chapter 29 • Securing <strong>Java</strong> <strong>EE</strong> Applications 807

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

Saved successfully!

Ooh no, something went wrong!