SCJP Certification

Sun Certified Java Programmer Certification exam essentials

August 24th, 2010

How to build an enterprise bean that allows only local access?

SCBCD, Uncategorized, by Daisy Williams.

Local accessibility is the default accessibility of an enterprise bean. If the bean’s business interface is not decorated with @Local or @Remote, and the bean class does not specify the interface using @Local or @Remote, the business interface is by default a local interface. An enterprise bean that allows only local access can be created in any of the following two ways:

By annotating the business interface of the enterprise bean as a @Local interface:

@Local
public interface InterfaceName { … }

By decorating the bean class with @Local and specifying the interface name.

@Local(InterfaceName.class)
public class BeanName implements InterfaceName { … }

Share

Back Top

Responses to “How to build an enterprise bean that allows only local access?”

Comments (0) Trackbacks (0) Leave a comment Trackback url
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Your email address will not be published. Required fields are marked *

*