国外的一些J2EE面试题一


Posted in 面试题 onOctober 13, 2012
Question: What is J2EE?
Answer: J2EE Stands for Java 2 Enterprise Edition. J2EE is an environment for developing and deploying enterprise applications. J2EE specification is defined by Sun Microsystems Inc. The J2EE platform is one of the best platform for the development and deployment of enterprise applications. The J2EE platform is consists of a set of services, application programming interfaces (APIs), and protocols, which provides the functionality necessary for developing multi-tiered, web-based applications. You can download the J2EE SDK and development tools from http://java.sun.com/.

Question: What do you understand by a J2EE module?
Answer: A J2EE module is a software unit that consists of one or more J2EE components of the same container type along with one deployment descriptor of that type. J2EE specification defines four types of modules:
a) EJB
b) Web
c) application client and
d) resource adapter

In the J2EE applications modules can be deployed as stand-alone units. Modules can also be assembled into J2EE applications.

Question: Tell me something about J2EE component?
Answer: J2EE component is a self-contained functional software unit supported by a container and configurable at deployment time. The J2EE specification defines the following J2EE components:

* Application clients and applets are components that run on the client.
* Java servlet and JavaServer Pages (JSP) technology components are Web components that run on the server.
* Enterprise JavaBeans (EJB) components (enterprise beans) are business components that run on the server. J2EE components are written in the Java programming language and are compiled in the same way as any program in the language. The difference between J2EE components and “standard” Java classes is that J2EE components are assembled into a J2EE application, verified to be well formed and in compliance with the J2EE specification, and deployed to production, where they are run and managed by the J2EE server or client container.

Source: J2EE v1.4 Glossary

Question: What are the contents of web module?
Answer: A web module may contain:
a) JSP files
b) Java classes
c) gif and html files and
d) web component deployment descriptors

Question: Differentiate between .ear, .jar and .war files.
Answer: These files are simply zipped file using java jar tool. These files are created for different purposes. Here is the description of these files:
.jar files: These files are with the .jar extenstion. The .jar files contains the libraries, resources and accessories files like property files.
.war files: These files are with the .war extension. The war file contains the web application that can be deployed on the any servlet/jsp container. The .war file contains jsp, html, javascript and other files for necessary for the development of web applications.
.ear files: The .ear file contains the EJB modules of the application.

Question: What is the difference between Session Bean and Entity Bean?
Answer:
Session Bean: Session is one of the EJBs and it represents a single client inside the Application Server. Stateless session is easy to develop and its efficient. As compare to entity beans session beans require few server resources.

A session bean is similar to an interactive session and is not shared; it can have only one client, in the same way that an interactive session can have only one user. A session bean is not persistent and it is destroyed once the session terminates.

Entity Bean: An entity bean represents persistent global data from the database. Entity beans data are stored into database.

Question: Why J2EE is suitable for the development distributed multi-tiered enterprise applications?
Answer: The J2EE platform consists of multi-tiered distributed application model. J2EE applications allows the developers to design and implement the business logic into components according to business requirement. J2EE architecture allows the development of multi-tired applications and the developed applications can be installed on different machines depending on the tier in the multi-tiered J2EE environment . The J2EE application parts are:

a) Client-tier components run on the client machine.
b) Web-tier components run on the J2EE server.
c) Business-tier components run on the J2EE server and the
d) Enterprise information system (EIS)-tier software runs on the EIS servers

Question: Why do understand by a container?
Answer: Normally, thin-client multi-tiered applications are hard to write because they involve many lines of intricate code to handle transaction and state management, multithreading, resource pooling, and other complex low-level details. The component-based and platform-independent J2EE architecture makes J2EE applications easy to write because business logic is organized into reusable components. In addition, the J2EE server provides underlying services in the form of a container for every component type. Because you do not have to develop these services yourself, you are free to concentrate on solving the business problem at hand (Source: http://java.sun.com/j2ee/1.3/docs/tutorial/doc/Overview4.html ).

In short containers are the interface between a component and the low-level platform specific functionality that supports the component. The application like Web, enterprise bean, or application client component must be assembled and deployed on the J2EE container before executing.

Question: What are the services provided by a container?
Answer: The services provided by container are as follows:
a) Transaction management for the bean
b) Security for the bean
c) Persistence of the bean
d) Remote access to the bean
e) Lifecycle management of the bean
f) Database-connection pooling
g) Instance pooling for the bean

Question: What are types of J2EE clients?
Answer: J2EE clients are the software that access the services components installed on the J2EE container. Following are the J2EE clients:
a) Applets
b) Java-Web Start clients
c) Wireless clients
d) Web applications

Tags in this post...

面试题 相关文章推荐
什么是smarty? Smarty的优点是什么?
Aug 11 面试题
比较基础的php面试题及答案-填空题
Apr 26 面试题
面向对象编程OOP的优点
Jan 22 面试题
在C语言中"指针和数组等价"到底是什么意思?
Mar 24 面试题
这段代码难道不该打印出56吗
Feb 27 面试题
将一个文本文件的内容按倒序打印出来
Jan 05 面试题
广州迈达威.net面试题目
Mar 10 面试题
override和overload的区别
Mar 09 面试题
Linux开机引导的步骤是什么
Oct 19 面试题
Linux面试题LINUX系统类
Nov 19 面试题
介绍一下Ruby的特点
Jan 20 面试题
DELPHI面试题研发笔试试卷
Nov 08 面试题
J2EE模式面试题
Oct 11 #面试题
J2ee常用的设计模式?说明工厂模式
May 21 #面试题
J2EE相关知识面试题
Aug 26 #面试题
J2EE中常用的名词进行解释
Nov 09 #面试题
创联软件面试题笔试题
Oct 07 #面试题
解释下面关于J2EE的名词
Nov 15 #面试题
一个J2EE项目团队的主要人员组成是什么
Jun 04 #面试题
You might like
PHP循环语句笔记(foreach,list)
2011/11/29 PHP
在WINDOWS中设置计划任务执行PHP文件的方法
2011/12/19 PHP
浅析PHP的ASCII码转换类
2013/07/05 PHP
利用浏览器的Javascript控制台调试PHP程序
2014/01/08 PHP
PHP实现基于mysqli的Model基类完整实例
2016/04/08 PHP
js/jquery获取浏览器窗口可视区域高度和宽度以及滚动条高度实现代码
2012/12/17 Javascript
使用jquery实现以post打开新窗口
2014/03/19 Javascript
jQuery 隐藏和显示 input 默认值示例
2014/06/03 Javascript
Vue-Router进阶之滚动行为详解
2017/09/13 Javascript
jQuery实现弹窗下底部页面禁止滑动效果
2017/12/19 jQuery
jQuery动态操作表单示例【基于table表格】
2018/12/06 jQuery
Vue页面切换和a链接的本质区别详解
2019/11/12 Javascript
基于jquery实现彩色投票进度条代码解析
2020/08/26 jQuery
JS highcharts实现动态曲线代码示例
2020/10/16 Javascript
[01:25:09]2014 DOTA2国际邀请赛中国区预选赛 5 23 CIS VS DT第二场
2014/05/24 DOTA
[03:01]完美世界DOTA2联赛PWL S2 集锦第二期
2020/12/03 DOTA
python将xml xsl文件生成html文件存储示例讲解
2013/12/03 Python
python的类方法和静态方法
2014/12/13 Python
Python中 Lambda表达式全面解析
2016/11/28 Python
对numpy中布尔型数组的处理方法详解
2018/04/17 Python
python 基本数据类型占用内存空间大小的实例
2018/06/12 Python
对Python 窗体(tkinter)文本编辑器(Text)详解
2018/10/11 Python
用Python编写一个简单的CS架构后门的方法
2018/11/20 Python
Tretorn美国官网:瑞典外套和鞋类品牌,抵御风雨
2018/07/19 全球购物
adidas菲律宾官网:adidas PH
2020/02/07 全球购物
50岁生日感言
2014/01/23 职场文书
教学器材管理制度
2014/01/26 职场文书
2015年元旦文艺汇演主持词
2014/03/26 职场文书
健康教育评估方案
2014/05/25 职场文书
工商管理专业毕业生求职信
2014/05/26 职场文书
质量月活动总结
2014/08/26 职场文书
公司感谢信范文
2015/01/22 职场文书
2015年建党94周年演讲稿
2015/03/19 职场文书
项目战略合作意向书
2015/05/08 职场文书
队名及霸气口号大全
2015/12/25 职场文书
Java字符缓冲流BufferedWriter
2022/04/09 Java/Android