.net人员用Java 之Java EE-阿里云开发者社区

开发者社区> 狗尾巴呢> 正文

.net人员用Java 之Java EE

简介: 上篇文章对Java的基本概念作了简要总结(http://www.cnblogs.com/2018/archive/2011/04/05/1993163.html),本文把对java EE的学习过程总结一下。
+关注继续查看

上篇文章对Java的基本概念作了简要总结(http://www.cnblogs.com/2018/archive/2011/04/05/1993163.html),本文把对java EE的学习过程总结一下。

基础

https://javaeetutorial.dev.java.net/files/documents/7232/141115/javaeetutorial6.zip

这个里面有介绍文档和例子代码,这些例子在netbeans可直接打开,参考文档部署和运行

这个文档介绍了整个Java EE的基本概念和示范例子,熟悉这个基本对Java EE的概念就比较了解了。

Java EE的基本概念

实际的开发中,只要理解了下面的几个图表和规范,只要针对具体的规范和标准进行学习即可。因为本身Java EE规范范围很大,我们实际中用的只是其中的部分。

【以下是做的一些图书资料记录,我认为很重要】

Java EE is based on standards.

Containers are Java EE runtime environments that provide certain services to the components they host such as life-cycle management, dependency injection, and so on. These components use well-defined contracts to communicate with the Java EE infrastructure and with the other components.

 

containers

Applet containers are provided by most web browsers to execute applet components. When you develop applets, you can concentrate on the visual aspect of the application while the container givesou a secure environment. The applet container uses a sandbox security model where code executed inhe “sandbox” is not allowed to “play outside the sandbox.” This means that the container prevents anyode downloaded to your local computer from accessing local system resources, such as processes oriles.

The application client container (ACC) includes a set of Java classes, libraries, and other files required to bring injection, security management, and naming service to Java SE applications (Swing,atch processing, or just a class with a main() method). ACC communicates with the EJB container usingRMI-IIOP and the web container with HTTP (e.g., for web services).

The web container provides the underlying services for managing and executing web componentsservlets, EJBs Lite, JSPs, filters, listeners, JSF pages, and web services). It is responsible for instantiating,nitializing, and invoking servlets and supporting the HTTP and HTTPS protocols. It is the containersed to feed web pages to client browsers.

The EJB container is responsible for managing the execution of the enterprise beans containing theusiness logic tier of your Java EE application. It creates new instances of EJBs, manages their life cycle, and provides services such as transaction, security, concurrency, distribution, naming service, or theossibility to be invoked asynchronously.

image

Services

Containers provide underlying services to their deployed components.

Java Transaction API (JTA): This service offers a transaction demarcation API usedby the container and the application. It also provides an interface between thetransaction manager and a resource manager at the Service Provider Interface(SPI) level.

Java Persistence API (JPA): Standard API for object-relational mapping (ORM). With its Java Persistence Query Language (JPQL), you can query objects stored in the underlying database.

Validation: Bean Validation provides a class level constraint declaration and validation facility.

Java Message Service (JMS): This allows components to communicate asynchronously through messages. It supports reliable point-to-point (P2P) messaging as well as the publish-subscribe (pub-sub) model.

Java Naming and Directory Interface (JNDI): This API, included in Java SE, is used to access naming and directory systems. Your application uses it to associate (bind) names to objects and then to find these objects (lookup) in a directory. You can look up datasources, JMS factories, EJBs, and other resources. Omnipresent in your code until J2EE 1.4, JNDI is used in a more transparent way through injection.

JavaMail: Many applications require the ability to send e-mails, which can be implemented through use of the JavaMail API.

JavaBeans Activation Framework (JAF): The JAF API, included in Java SE, provides a framework for handling data in different MIME types. It is used by JavaMail.

XML processing: Most Java EE components can be deployed with optional XML deployment descriptors, and applications often have to manipulate XML documents. The Java API for XML Processing (JAXP) provides support for parsing documents with SAX and DOM APIs, as well as for XSLT. The Streaming API for XML (StAX) provides a pull-parsing API for XML.

• Java EE Connector Architecture (JCA): Connectors allow you to access EIS from a Java EE component. These could be databases, mainframes, or Enterprise Resource Planning (ERP) programs.

• Security services: Java Authentication and Authorization Service (JAAS) enables services to authenticate and enforce access controls upon users. The Java Authorization Service Provider Contract for Containers (JACC) defines a contract between a Java EE application server and an authorization service provider, allowing custom authorization service providers to be plugged into any Java EE product.

• Web services: Java EE provides support for SOAP and RESTful web services. The Java API for XML Web Services (JAX-WS), replacing the Java API for XML-based RPC (JAX-RPC), provides support for web services using the SOAP/HTTP protocol. The Java API for RESTful Web Services (JAX-RS) provides support for web services using the REST style.

• Dependency injection: Since Java EE 5, some resources (datasources, JMS factories, persistence units, EJBs…) can be injected in managed components. Java EE 6 goes further by using CDI (Context and Dependency Injection) as well as the DI (Dependency Injection for Java) specifications.

• Management: Java EE defines APIs for managing containers and servers using a special management enterprise bean. The Java Management Extensions (JMX) API is also used to provide some management support.

• Deployment: The Java EE Deployment Specification defines a contract between deployment tools and Java EE products to standardize application deployment.

clip_image002

image

参考资料

Java EE 6规范中文版.chm

Java+EE+6+API+Specifications.CHM

javadocee6.zip

servlet-2_3-fcs-docs.zip

javaeetutorial6.zip[The Java EE 6Tutorial]

The Java EE 6 Tutorial Basic Concepts, 4th Edition

Beginning Java EE 6 with GlassFish 3, 2nd Edition

这些资料在网上都可以找到

例子实战

http://netbeans.org/kb/docs/javaee/ecommerce/design.html

很实用的一个例子,覆盖了多个方面的内容,理解了这个基本对如何实施一个Java EE的项目就有一个比较清晰的概念了。

Java EE发展了十几年,相关的资料和开源框架等浩如烟海,我们只要把握这些基础的概念,然后结合相应的实例学习和开发改造,在项目中就可以顺利应用了。

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
阿里云服务器端口号设置
阿里云服务器初级使用者可能面临的问题之一. 使用tomcat或者其他服务器软件设置端口号后,比如 一些不是默认的, mysql的 3306, mssql的1433,有时候打不开网页, 原因是没有在ecs安全组去设置这个端口号. 解决: 点击ecs下网络和安全下的安全组 在弹出的安全组中,如果没有就新建安全组,然后点击配置规则 最后如上图点击添加...或快速创建.   have fun!  将编程看作是一门艺术,而不单单是个技术。
4479 0
阿里云和微软共同开源的 OAM 对 Kubernetes 开发人员意味着什么?
上周,微软和阿里巴巴共同推出了开放应用模型(OAM),用于定义部署在任何地方的应用模型的一种规范。Rudr是Microsoft基于Kubernetes环境的OAM标准实现。 我用了一个周末来了解OAM试图解决的问题,为此我还以Rudr为基础重构了一些我喜欢的基础微服务的应用程序。
891 0
.net人员用Java 之Java EE
上篇文章对Java的基本概念作了简要总结(http://www.cnblogs.com/2018/archive/2011/04/05/1993163.html),本文把对java EE的学习过程总结一下。
925 0
容器服务kubernetes与堡垒机按应用人员设置权限
1.前言:  aliyun 上采用容器服务 kubernetes 部署某业务的所有应用,每个应用有不同的Owner, 开发人员, 运维,需要根据应用分配不同的人访问权限。 需求: 运维人员(集群管理人员)---> 所有应用配置读写; 应用owner与运维 --> 所属应用的配置读写; 应用开发测试等人员 --> 只读访问应用的配置,并可以进入 POD 维护; 所有人员通过堡垒机运维线上系统,堡垒机审计功能记录运维人员的操作过程。
660 0
开发人员都应该了解的 7 种 JavaScript 设计模式
开发人员将 JavaScript 设计模式作为解决问题的模板是很合适的,但并不是说这些模式可以代替开发人员的工作。
841 0
阿里云服务器远程登录用户名和密码的查询方法
阿里云服务器远程连接登录用户名和密码在哪查看?阿里云服务器默认密码是什么?云服务器系统不同默认用户名不同
443 0
一起谈.NET技术,MVC开发人员必须拥有的五大工具
  1.Chirpy Zippy:Chirpy Zippy是一个Visual Studio插件,它可以混合,缩小和验证JavaScript,样式表和带点文件,它还能够自动更新T4MVC和其它T4模板。   下载地址:http://down.
741 0
Java程序员年薪40W,他1年走了别人5年的路(技术提炼)
介绍一下,这一次笔者笔下的这位大牛,lison,复旦大学工程硕士,专注技术十年,产品控、代码控,拥有丰富的项目经验,主持研发了多个成功上线的大型互联网项目。热爱互联网,热衷于各种web技术,精通JAVA、J2EE和前端开发,擅长互联网高并发、高可靠架构设计,有丰富的实战经验。
2520 0
+关注
狗尾巴呢
从事研发20年 涉及桌面软件、嵌入式设备、C/S分层系统、B/S业务系统、互联网系统等等各类系统 语言涉及C/C++ .net系统 java系列 前端系列等等不同的类别 主控和主导了国家863项目,企业业务应用系统,自然语言翻译系统,数据库审计等系列的软件研发
435
文章
2
问答
文章排行榜
最热
最新
相关电子书
更多
文娱运维技术
立即下载
《SaaS模式云原生数据仓库应用场景实践》
立即下载
《看见新力量:二》电子书
立即下载