国外的一些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的笔试题
May 31 面试题
构造方法和其他方法的区别?怎么调用父类的构造方法
Sep 22 面试题
我想声明一个指针并为它分配一些空间, 但却不行。这些代码有什么 问题?char *p; *p = malloc(10);
Oct 06 面试题
亿阳信通股份有限公司笔试题(C#)
Mar 04 面试题
sealed修饰符是干什么的
Oct 23 面试题
Linux面试经常问的文件系统操作命令
Oct 04 面试题
介绍一下EJB的分类及其各自的功能及应用
Aug 23 面试题
启动一个线程是用run()还是start()
Dec 25 面试题
什么时候需要进行强制类型转换
Sep 03 面试题
Java的类与C++的类有什么不同
Jan 18 面试题
介绍一下javax.servlet.Servlet接口及其主要方法
Nov 30 面试题
一套Delphi的笔试题一
Feb 14 面试题
J2EE模式面试题
Oct 11 #面试题
J2ee常用的设计模式?说明工厂模式
May 21 #面试题
J2EE相关知识面试题
Aug 26 #面试题
J2EE中常用的名词进行解释
Nov 09 #面试题
创联软件面试题笔试题
Oct 07 #面试题
解释下面关于J2EE的名词
Nov 15 #面试题
一个J2EE项目团队的主要人员组成是什么
Jun 04 #面试题
You might like
一次编写,随处运行
2006/10/09 PHP
windows下升级PHP到5.3.3的过程及注意事项
2010/10/12 PHP
php通过文件流方式复制文件的方法
2015/03/13 PHP
thinkphp跨库操作的简单代码实例
2016/09/22 PHP
php利用imagemagick实现复古老照片效果实例
2017/02/16 PHP
利用phpexcel对数据库数据的导入excel(excel筛选)、导出excel
2017/04/27 PHP
a标签的css样式四个状态
2021/03/09 HTML / CSS
为jquery.ui.dialog 增加“自动记住关闭时的位置”的功能
2009/11/24 Javascript
javascript让setInteval里的函数参数中的this指向特定的对象
2010/01/31 Javascript
JavaScript获取页面上某个元素的代码
2011/03/13 Javascript
js 静态动态成员 and 信息的封装和隐藏
2011/05/29 Javascript
jQuery中 noConflict() 方法使用
2013/04/25 Javascript
jquery左右滚动焦点图banner图片鼠标经过显示上下页按钮
2013/10/11 Javascript
点击页面其它地方隐藏该div的两种思路
2013/11/18 Javascript
解析微信JS-SDK配置授权,实现分享接口
2016/12/09 Javascript
jQuery Ajax请求后台数据并在前台接收
2016/12/10 Javascript
bootstrapValidator表单验证插件学习
2016/12/30 Javascript
Angular2中select用法之设置默认值与事件详解
2017/05/07 Javascript
jQuery.ajax向后台传递数组问题的解决方法
2017/05/12 jQuery
bootstrap table实现x-editable的行单元格编辑及解决数据Empty和支持多样式问题
2017/08/10 Javascript
js基于FileSaver.js 浏览器导出Excel文件的示例
2017/08/15 Javascript
ES6知识点整理之对象解构赋值应用示例
2019/04/17 Javascript
vue 清空input标签 中file的值操作
2020/07/21 Javascript
python开发的小球完全弹性碰撞游戏代码
2013/10/15 Python
urllib2自定义opener详解
2014/02/07 Python
Python编程修改MP3文件名称的方法
2017/04/19 Python
Python实用技巧之利用元组代替字典并为元组元素命名
2018/07/11 Python
Sanic框架基于类的视图用法示例
2018/07/18 Python
python字典的setdefault的巧妙用法
2019/08/07 Python
锐步美国官方网站:Reebok美国
2018/01/10 全球购物
Can a struct inherit from another struct? (结构体能继承结构体吗)
2016/09/25 面试题
轻金属冶金专业毕业生自荐信
2013/11/02 职场文书
贫困证明书范文
2015/06/16 职场文书
MySQL 如何分析查询性能
2021/05/12 MySQL
Redis基于Bitmap实现用户签到功能
2021/06/20 Redis
MySQL学习必备条件查询数据
2022/03/25 MySQL