Web hosting companies - 48 Chapter 2 The response so far from
48 Chapter 2 The response so far from Sun is that this approach would not work because the semantics of the application change when switching between local interfaces and remote interfaces, due to the differences in pass-by-value versus pass-by-reference. It would be error-prone to allow developers to flip a switch in this respect. Personally, we don t agree with Sun. We think developers are smart enough to avoid these mistakes, and the potential benefits outweigh the drawbacks. Many EJB server vendors disagree as well. They actually support this local/remote flag idea through proprietary container tools or vendor-specific files that are separate from your bean. Thus, if you want to, you may be able to still take advantage of these flags without sacrificing portability. Deployment Descriptors To inform the container about your middleware needs, you as a bean provider must declare your components middleware service requirements in a deploy ment descriptor file. For example, you can use a deployment descriptor to declare how the container should perform lifecycle management, persistence, transaction control, and security services. The container inspects the deploy ment descriptor to fulfill the requirements that you lay out. The deployment descriptor is the key to implicit middleware. For example, you can use a deployment descriptor to specify the following requirements of your bean: Bean management and lifecycle requirements. These deployment descriptor settings indicate how the container should manage your beans. For example, you specify the name of the bean s class, whether the bean is a session, entity, or message-driven bean, and the home interface that generates the beans. Persistence requirements (entity beans only). Authors of entity beans use the deployment descriptors to inform the container about whether the bean handles its persistence on its own or delegates the persistence to the EJB container in which it s deployed. Transaction requirements. You can also specify transaction settings for beans in deployment descriptors. These settings specify the bean requirements for running in a transaction, such as a transaction must start whenever anyone calls this bean, and the transaction must end after my bean completes the method call. Security requirements. Deployment descriptors contain access control entries, which the beans and container use to enforce access to certain operations. For example, you can specify who is allowed to use which
Do you want truly affordable web hosting? With us, what you see is what you get, just click on affordable web hosting services.