对Enterprise Java Bean有点不清楚
登录 | 论坛导航 -> 华新鲜事 -> 社会百科 | 本帖共有 2 楼,当前显示第 2 楼 : 从楼主开始阅读 : 本帖树形列表 : 返回上一页
作者:鱽鳓 (等级:2 - 初出茅庐,发帖:259) 发表:2003-08-19 23:26:16  2楼  评分: 
EJB
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!
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表

本帖共有 2 楼,当前显示第 2 楼,本文还有 N-1 层楼,要不你试试看:点击此处阅读更多 >>



请登录后回复:帐号   密码