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

面试题 相关文章推荐
C语言面试题
Oct 30 面试题
存储过程的优缺点是什么
Jan 10 面试题
WEB控件可以激发服务端事件,请谈谈服务端事件是怎么发生并解释其原理?自动传回是什么?为什么要使用自动传回?
Feb 21 面试题
shell程序中如何注释
Jan 28 面试题
linux面试题参考答案(6)
Aug 29 面试题
EJB的几种类型
Aug 15 面试题
AJAX的全称是什么
Nov 06 面试题
META-INF文件夹中的MANIFEST.MF的作用
Jun 21 面试题
火山动力Java笔试题
Jun 26 面试题
Exception类的常用方法
Jun 16 面试题
Servlet的生命周期
Aug 25 面试题
Java面试题冲刺第十八天--Spring框架3
Aug 07 面试题
J2EE模式面试题
Oct 11 #面试题
J2ee常用的设计模式?说明工厂模式
May 21 #面试题
J2EE相关知识面试题
Aug 26 #面试题
J2EE中常用的名词进行解释
Nov 09 #面试题
创联软件面试题笔试题
Oct 07 #面试题
解释下面关于J2EE的名词
Nov 15 #面试题
一个J2EE项目团队的主要人员组成是什么
Jun 04 #面试题
You might like
php 解压rar文件及zip文件的方法
2014/05/05 PHP
浅谈PHP中Stream(流)
2015/06/08 PHP
浅析PHP7 的垃圾回收机制
2019/09/06 PHP
Laravel 连接(Join)示例
2019/10/16 PHP
Javascript 刷新全集常用代码
2009/11/22 Javascript
JQuery1.4+ Ajax IE8 内存泄漏问题
2010/10/15 Javascript
jquery+css+ul模拟列表菜单具体实现思路
2013/04/15 Javascript
js获取php变量的实现代码
2013/08/10 Javascript
Javascript技术栈中的四种依赖注入详解
2016/02/23 Javascript
jQuery实现微信长按识别二维码功能
2016/08/26 Javascript
JavaScript动态数量的文件上传控件
2016/11/18 Javascript
Angular.js中下拉框实现渲染html的方法
2017/06/18 Javascript
细说webpack源码之compile流程-rules参数处理技巧(1)
2017/12/26 Javascript
详解NODEJS的http实现
2018/01/04 NodeJs
Bootstrap开发中Tab标签页切换图表显示问题的解决方法
2018/07/13 Javascript
微信小程序自定义头部导航栏和导航栏背景图片 navigationStyle问题
2019/07/26 Javascript
vue实现全屏滚动效果(非fullpage.js)
2020/03/07 Javascript
解决vue init webpack 下载依赖卡住不动的问题
2020/11/09 Javascript
Python中格式化format()方法详解
2017/04/01 Python
在python3环境下的Django中使用MySQL数据库的实例
2017/08/29 Python
python学生管理系统代码实现
2020/04/05 Python
python 利用for循环 保存多个图像或者文件的实例
2018/11/09 Python
对Python生成器、装饰器、递归的使用详解
2019/07/19 Python
基于Python新建用户并产生随机密码过程解析
2019/10/08 Python
关于pandas的离散化,面元划分详解
2019/11/22 Python
python中常见错误及解决方法
2020/06/21 Python
英国男士时尚网站:Dandy Fellow
2018/02/09 全球购物
牵手50台湾:专为黄金岁月的单身人士而设的交友网站
2021/02/18 全球购物
俄罗斯品牌服装和鞋子在线商店:BRIONITY
2020/03/26 全球购物
如何判断计算机可能已经中马
2013/03/22 面试题
JAVA语言如何进行异常处理,关键字:throws,throw,try,catch,finally分别代表什么意义?在try块中可以抛出异常吗?
2013/07/02 面试题
毕业生求职简历的自我评价
2013/10/07 职场文书
生产部主管岗位职责
2014/01/06 职场文书
卖房协议书
2014/04/11 职场文书
时尚女魔头观后感
2015/06/04 职场文书
指导教师推荐意见
2015/06/05 职场文书