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

面试题 相关文章推荐
PHP开发的一般流程
Aug 13 面试题
JAVA中的关键字有什么特点
Mar 07 面试题
Java多态性的定义以及类型
Sep 16 面试题
精伦电子Java笔试题
Jan 16 面试题
第二层交换机和路由器的区别?第三层交换机和路由器的区别?
May 23 面试题
空指针到底是什么
Aug 07 面试题
SQL里面如何插入自动增长序列号字段
Mar 29 面试题
北京天润融通.net面试题笔试题
Feb 20 面试题
星空联盟C# .net笔试题
Dec 05 面试题
linux面试题参考答案(8)
Aug 11 面试题
系统管理员的职责包括那些?管理的对象是什么?
Jan 18 面试题
Java的类与C++的类有什么不同
Jan 18 面试题
J2EE模式面试题
Oct 11 #面试题
J2ee常用的设计模式?说明工厂模式
May 21 #面试题
J2EE相关知识面试题
Aug 26 #面试题
J2EE中常用的名词进行解释
Nov 09 #面试题
创联软件面试题笔试题
Oct 07 #面试题
解释下面关于J2EE的名词
Nov 15 #面试题
一个J2EE项目团队的主要人员组成是什么
Jun 04 #面试题
You might like
php命令行(cli)下执行PHP脚本文件的相对路径的问题解决方法
2015/05/25 PHP
PHP7正式版测试,性能惊艳!
2015/12/08 PHP
PHP的邮件群发系统phplist配置方法详细总结
2016/03/30 PHP
jQuery 各种浏览器下获得日期区别
2008/12/22 Javascript
用Javascript实现Sleep暂停功能代码
2010/09/03 Javascript
javascript firefox 自动加载iframe 自动调整高宽示例
2013/08/27 Javascript
js点击事件链接的问题解决
2014/04/25 Javascript
判断iframe里的页面是否加载完成
2014/06/06 Javascript
浅谈NodeJS中require路径问题
2015/05/07 NodeJs
js控制元素显示在屏幕固定位置及监听屏幕高度变化的方法
2015/08/11 Javascript
BootStrap+Angularjs+NgDialog实现模式对话框
2016/08/24 Javascript
DataTables添加额外的查询参数和删除columns等无用参数实例
2017/07/04 Javascript
bootstrap table插件的分页与checkbox使用详解
2017/07/23 Javascript
JavaScript实现无刷新上传预览图片功能
2017/08/02 Javascript
js 判断一个数字是不是2的n次方幂的实例
2017/11/26 Javascript
详解node.js 下载图片的 2 种方式
2018/03/02 Javascript
详解Javascript中new()到底做了些什么?
2018/03/29 Javascript
微信小程序实现人脸识别
2018/05/25 Javascript
JavaScript基于用户照片姓名生成海报
2020/05/29 Javascript
Vue多选列表组件深入详解
2021/03/02 Vue.js
Python常见文件操作的函数示例代码
2011/11/15 Python
python实现倒计时的示例
2014/02/14 Python
django自定义Field实现一个字段存储以逗号分隔的字符串
2014/04/27 Python
python分析nignx访问日志脚本分享
2015/02/26 Python
python匿名函数的使用方法解析
2019/10/10 Python
PyCharm使用Docker镜像搭建Python开发环境
2019/12/26 Python
深入浅析Python 函数注解与匿名函数
2020/02/24 Python
完美解决IE8下不兼容rgba()的问题
2017/03/31 HTML / CSS
Timberland澳大利亚官网:全球领先的户外品牌
2019/12/10 全球购物
TUMI香港官网:国际领先的行李箱、背囊品牌
2021/03/01 全球购物
介绍一下Linux内核的排队自旋锁
2014/08/27 面试题
大学生期末自我鉴定
2014/02/01 职场文书
大型营销活动计划书
2014/04/28 职场文书
民间个人借款协议书
2014/09/30 职场文书
2015医德医风个人工作总结
2015/04/02 职场文书
20180830晚上第一届KSL半决赛 雨神vs解冻(二龙 三炮解说)
2022/04/01 星际争霸