国外的一些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...

面试题 相关文章推荐
Yahoo-PHP面试题2
Dec 06 面试题
Java中实现多态的机制是什么?
Dec 07 面试题
天逸系统(武汉)有限公司Java笔试题
Dec 29 面试题
这段代码难道不该打印出56吗
Feb 27 面试题
西部世纪.net笔试题面试题
Apr 03 面试题
外企测试工程师面试题
Feb 01 面试题
一套软件开发工程师笔试题
May 18 面试题
如何整合JQuery和Prototype
Jan 31 面试题
Java语言程序设计测试题判断题部分
Jan 06 面试题
设置器与访问器的定义以及各自特点
Jan 08 面试题
为什么说Ruby是一种真正的面向对象程序设计语言
Oct 30 面试题
如何定义一个可复用的服务
Sep 30 面试题
J2EE模式面试题
Oct 11 #面试题
J2ee常用的设计模式?说明工厂模式
May 21 #面试题
J2EE相关知识面试题
Aug 26 #面试题
J2EE中常用的名词进行解释
Nov 09 #面试题
创联软件面试题笔试题
Oct 07 #面试题
解释下面关于J2EE的名词
Nov 15 #面试题
一个J2EE项目团队的主要人员组成是什么
Jun 04 #面试题
You might like
php中文本操作的类
2007/03/17 PHP
PHP获取ip对应地区和使用网络类型的方法
2015/03/11 PHP
用PHP的socket实现客户端到服务端的通信实例详解
2017/02/04 PHP
thinkPHP实现签到功能的方法
2017/03/15 PHP
Laravel框架路由设置与使用示例
2018/06/12 PHP
thinkphp5 + ajax 使用formdata提交数据(包括文件上传) 后台返回json完整实例
2020/03/02 PHP
iis6+javascript Add an Extension File
2007/06/13 Javascript
通过event对象的fromElement属性解决热区设置主实体的一个bug
2008/12/22 Javascript
js实现全国省份城市级联下拉菜单效果代码
2015/09/07 Javascript
js获取及修改网页背景色和字体色的方法
2015/12/29 Javascript
JavaScript核心语法总结(推荐)
2016/06/02 Javascript
浅析ES6的八进制与二进制整数字面量
2016/08/30 Javascript
js 输入框 正则表达式(菜鸟必看教程)
2017/02/19 Javascript
JavaScript 函数的定义-调用、注意事项
2017/04/16 Javascript
使用ionic播放轮询广告的实现方法(必看)
2017/04/24 Javascript
AngularJS中使用three.js的实例详解
2017/07/21 Javascript
基于百度地图api清除指定覆盖物(Overlay)的方法
2018/01/26 Javascript
vue 的keep-alive缓存功能的实现
2018/03/22 Javascript
JavaScript深拷贝和浅拷贝概念与用法实例分析
2018/06/07 Javascript
JS实现显示当前日期的实例代码
2018/07/03 Javascript
JavaScript展开操作符(Spread operator)详解
2019/07/20 Javascript
如何搭建一个完整的Vue3.0+ts的项目步骤
2020/10/18 Javascript
vue开发chrome插件,实现获取界面数据和保存到数据库功能
2020/12/01 Vue.js
Vue包大小优化的实现(从1.72M到94K)
2021/02/18 Vue.js
[01:21:58]守擂赛DOTA2第一周决赛
2020/04/22 DOTA
利用Python脚本在Nginx和uwsgi上部署MoinMoin的教程
2015/05/05 Python
python下实现二叉堆以及堆排序的示例
2017/09/29 Python
浅谈Python2、Python3相对路径、绝对路径导入方法
2018/06/22 Python
windows7 32、64位下python爬虫框架scrapy环境的搭建方法
2018/11/29 Python
python 的 scapy库,实现网卡收发包的例子
2019/07/23 Python
在python3.64中安装pyinstaller库的方法步骤
2020/06/02 Python
django美化后台django-suit的安装配置操作
2020/07/12 Python
Haglöfs瑞典官方网站:haglofs火柴棍,欧洲顶级户外品牌
2018/10/18 全球购物
Notino希腊:购买香水和美容产品
2019/07/25 全球购物
精彩的英文自荐信
2014/01/30 职场文书
Linux、ubuntu系统下查看显卡型号、显卡信息详解
2022/04/07 Servers