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

面试题 相关文章推荐
JAVA中的关键字有什么特点
Mar 07 面试题
以下的初始化有什么区别
Dec 16 面试题
C++:memset ,memcpy和strcpy的根本区别
Apr 27 面试题
Sql面试题
Mar 20 面试题
西部世纪面试题
Dec 05 面试题
XML文档面试题
Aug 05 面试题
Can a struct inherit from another struct? (结构体能继承结构体吗)
Sep 25 面试题
通用C#笔试题附答案
Nov 26 面试题
四川internet信息高速公路(C#)笔试题
Feb 29 面试题
软件缺陷的分类都有哪些
Aug 22 面试题
实体的生命周期
Aug 31 面试题
MySQL面试题目集锦
Apr 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
php使用mb_check_encoding检查字符串在指定的编码里是否有效
2013/11/07 PHP
C#静态方法与非静态方法实例分析
2014/09/22 PHP
php获取文件类型和文件信息的方法
2015/07/10 PHP
Windows 下安装 swoole 图文教程(php)
2017/06/05 PHP
PHP多进程通信-消息队列使用
2019/03/08 PHP
PHP通过文件保存和更新信息的方法分析
2019/09/12 PHP
阿里对象存储OSS在laravel框架中的使用方法
2019/10/13 PHP
Laravel 之url参数,获取路由参数的例子
2019/10/21 PHP
用js生产批量批处理执行命令
2008/07/28 Javascript
5个最佳的Javascript日期处理类库分享
2012/04/15 Javascript
ie下jquery.getJSON的缓存问题的处理方法
2013/03/29 Javascript
js获取及判断键盘按键的方法
2015/12/01 Javascript
javascript作用域链与执行环境详解
2017/03/25 Javascript
React+react-dropzone+node.js实现图片上传的示例代码
2017/08/23 Javascript
解决angularJS中input标签的ng-change事件无效问题
2018/09/13 Javascript
vue解决一个方法同时发送多个请求的问题
2018/09/25 Javascript
解决微信小程序中转换时间格式IOS不兼容的问题
2019/02/15 Javascript
vue 实现Web端的定位功能 获取经纬度
2019/08/08 Javascript
一行JavaScript代码如何实现瀑布流布局
2020/12/11 Javascript
[00:47]DOTA2荣耀之路6:天火,天火!
2018/05/30 DOTA
Python使用gensim计算文档相似性
2016/04/10 Python
python3实现163邮箱SMTP发送邮件
2018/05/22 Python
python实现简单多人聊天室
2018/12/11 Python
详解PyTorch中Tensor的高阶操作
2019/08/18 Python
python文件处理fileinput使用方法详解
2020/01/02 Python
Django之全局使用request.user.username的实例详解
2020/05/14 Python
python3实现将json对象存入Redis以及数据的导入导出
2020/07/16 Python
django和flask哪个值得研究学习
2020/07/31 Python
Python爬取数据并实现可视化代码解析
2020/08/12 Python
HEMA英国:荷兰原创设计
2018/08/28 全球购物
什么是接口(Interface)?
2013/02/01 面试题
高三语文教学反思
2014/01/15 职场文书
2016八一建军节慰问信
2015/11/30 职场文书
小学信息技术教学反思
2016/02/16 职场文书
用python修改excel表某一列内容的操作方法
2021/06/11 Python