Programming restrictions on EJB

Learn to write reliable and portable EJB 1.1 components

1 2 Page 2
Page 2 of 2
  1. Its dependency on usage of restricted features that are not enforced on a particular EJB container.
  2. Its dependency on nonstandard services availed from the container.

To guarantee portability and consistent behavior of the EJB component, you should test EJB components, using a container that has the security settings according to the Java 2 Platform Security policy sets, which are consistent with enforcing the programming restrictions.

Conclusion

EJB component developers should be aware of the recommended programming restrictions on EJB components, understand their significance, and follow them in the interest of component reliability and portability. Because those programming restrictions prevent you from using certain standard Java language features, any violation of them will not be known at compile time. It is also not mandatory for the EJB container to enforce those restrictions. That's all the more reason for you to take special care to adhere to those programming restrictions, which have been stipulated as an item in the component contract, and are important for building reliable and portable EJB components.

Sanjay Mahapatra is a Sun-certified Java programmer (1.1), developer (Java 2), and architect (Java 2). He currently works for Cook Systems International, a consulting and solutions company.

Learn more about this topic

1 2 Page 2
Page 2 of 2