什么时候用ejb ,什么时候不用ejb?
参考 enterprise javabeans 4 【程序编程相关:一个UDP(多播)局域聊天的简单实现】
【推荐阅读:有关JNLP中传SESSIONID为参数】
1 when to use ejbsheres a list of situations where ejbs are strong; we havent distinguished between 【扩展信息:使用连接池连接IBM DB2数据库】
这篇文章 讲述了何时使用ejb,何时不用ejb,以及用哪些可以替代ejb!
different types of ejbs.
single and multisystem business transactions
the ability to maintain transactional integrity for complex business entities is one of
an ejbs key strengths. ejbs arent alone in providing straightforward transactional
control over a single data repository. however, ejbs shine where multiple resources
(relational databases, messaging systems, etc.) are involved because they allow
transactions to spread across as many different resources as you like, so long as the
resources support distributed transactions.
distributed functionality
business services often live on a remote server. for example, a business enterprise will
have many different systems, ranging in degrees of inflexibility and entrenchment. one of
these systems may need to access another; ejbs, which are inherently distributed, are
often the simplest way to distribute remote services. ejb also allows you to provide
business services to remote clients more easily than some alternatives. remote access
through components is easier to maintain than direct database access, because the
component code can shield the client from database schema changes.
... 下一页