站内搜索: 请输入搜索关键词
当前页面: 图书首页 > JavaServer Pages, Second Edition

JavaServer Pages, Second Edition

[ directory ] Previous Section Next Section

3.8 Future Directions

As noted earlier in this chapter, there is more to beans than the names of the properties. One other feature beans provide is the ability to notify one another when certain events have occurred. For example, a bean used on one page could notify a bean used on another that a user had just visited that page, provided some input on a form, or any of a million other things. JSPs have no built-in facility to connect beans in this way, so this ability will not be discussed in any further detail. However, it would not be surprising to see this as a feature in a future version of the JSP spec, so stay tuned. In the meantime, there is no reason interested programmers or page authors cannot use this ability manually.

A number of products that make beans even more powerful and useful are available. Sun provides a set of classes, called the Infobus, that further extends the way beans can communicate with one another. The Java Activation Framework package adds the ability for beans to discover dynamically the type of pieces of data and the available methods related to that type.

Finally, the Java 2 Enterprise Edition makes extensive use of some additional types of beans, collectively known as Enterprise JavaBeans, or EJBs. EJBs provide a suite of methods for managing persistent data, ensuring that beans are kept in a consistent state, and using beans in distributed environments, where different beans may reside on different computers on a network. EJBs are beyond the scope of this book, but it is likely that they will more and more converge with JSPs.

    [ directory ] Previous Section Next Section