Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common problems of EJB

2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

What are the common problems of EJB, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

Here are a few common questions about EJB.

I. what's the difference between EJB and J2EE

A: both J2EE and EJB are server specifications. But EJB is actually a subset of J2EE. In other words, the J2EE server must include an EJB container. Each J2EE server must contain an EJB container, in addition to a web container that can run servlet and jsp. A very vivid analogy, EJB is to J2EE what Mickey Mouse is to Disney.

two。 Can you use EJB components without an EJB-compatible application server

A: absolutely not. EJB components cannot "survive" outside the EJB container. The EJB component does not have a main method, and even if you deliberately add such a main method to your bean class, the bean is of little use in itself. Most of the methods in the enterprise bean are called by the container itself, and these methods do not make any sense without the server. Keep in mind that the most important thing about EJB server is that it can provide you with all the important services (transactions, security, etc.). Without a server, you will have nothing but your basic logic. Moreover, if your business logic depends on the container, even if it is only your business logic, it will fail without a server.

three。 What is the difference between regular Javabean and enterprise Javabean

A: the word javabean means reusable components. A regular non-enterprise javabean is a reusable component that follows a naming convention, and these regular javabean are available to development tools. Enterprise javabean is also a reusable component, but what it has in common with regular javabean is limited to this. The term "bean" in regular javabean mainly means that it can be reused at development time, so that it can be simplified or accelerated when establishing the association between the events of one bean and the methods of another bean, or it can be more convenient to set the property value. Regular javabean runs in JVM, just like all normal java classes. In contrast, "bean" in enterprise bean means that it can be reused at run time, and the enterprise bean must run under the control of the EJB container.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report