EJB
所在版块:社会百科 发贴时间:2003-08-19 23:26  评分:

用户信息
复制本帖HTML代码
高亮: 今天贴 X 昨天贴 X 前天贴 X 
Enterprise Java Bean (EJB) is the name for those Java Beans in Java 2 Enterprise Endition (j2ee) frame work. J2ee is the server side programming solution from SUN. The main idea is developers just write some java beans and deploy the beans to j2ee server. The j2ee server will help doing those multiple threading handling, and transaction handling. Some of powerful j2ee servers even supports load balancing. By doing this, J2EE developers don't need to worry too much about the server handling, such as concurrent access, they can just focus on the business logic programming.
EJB contains 3 types of beans, Session Bean, Entity Bean and Message Driven Bean. Session Bean is meanly to do those business logic, so most of the business logic is inside this. Entity bean is meanly for database modeling, Entity bean has two types, Bean Managed Entity Bean and Code Managed Entity Bean. in Bean managed entity bean, you can just define the Entity Bean object presentation of data base table, then the detailed database handling will be left to server. While, in Code Managed Entity Bean, user will have more freedom to handle the database details. Messsage Driven Bean is the bean type to handle the message from Java Message Service (JMS). MDB is registered to some JMS queue, so j2ee server will invoke MDB when there is any message from the corrosponding queue.
For J2ee servers, there are some powerful ones from those "big" vendors, such as WebSphere, WebLogic, Borland Enterprise Server etcs, almost every big venders like IBM, SUN, Borland, Oracle have their own J2EE server. These servers are powerful but lisence is needed. There are some free J2EE servers like JBOSS there. And there are some very helpful documents and samples from JBOSS website, www.Jboss.org. But there are some advanced features from JBOSS require charging, such as load balancing.
J2EE programming, you need to follow some specific standard, specially for Entity Bean, and it's very boring to repeat the same set of preparing code every time, so some of the developers write their own code generator by themselves, you can write one by yourself or search through web to see whether you can get any utilities.
As summary, J2EE programming is easy to do coding, but you will spend more time for server configuration and maintainance, And it's easier if you can start from some samples given.
.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!

Put your OWN COOL signature here!
 相关帖子 我要回复↙ ↗回到正文
对Enterprise Java Bean有点不清楚 很硬   (71 bytes , 373reads )
EJB 鱽鳓   (2368 bytes , 387reads )