Resource injection using the rational application Developer V7.5 version

Source: Internet
Author: User
Tags continue error code event listener resource

Overcoming challenges that the Java persistence API structure cannot support out parameters in stored procedures

Introduction: The Java™ Platform Enterprise Edition (Java Platform, Enterprise Edition,jee) simplifies the deployment of full enterprise programs. Using resource injection with annotations, you can reduce standard code, which helps you write maintainable code. Your company may have a large number of complex stored procedures already in existence. You can continue to develop programs that use stored procedures and take advantage of the Java platform. Ibm®rational®application Developer provides a rich development environment and is tightly integrated with IBM websphere®application Server. With Rational application Developer, you can begin to transform agile development.

Overview

This article provides a brief introduction to Java™platform,enterprise Edition and shows how the platform can help you reduce development difficulties. To make a typical development task easier, you can use the Ibm®rational®application Developer v7.5 for websphere®.

A concrete example will demonstrate how to quickly create a complete Java platform, Enterprise Edition programs, and deploy them to WebSphere v7.0.

Java platform,enterprise Edition

Java Platform, Enterprise Edition, or JEE, is a standard tool for implementing and deploying enterprise programs in the Java programming language. The newest tool is the Java platform, Enterprise Edition version 6. With JEE and its features and functionality, developers can focus on the business logic of components without having to worry about the basics and integration tasks. With JEE, annotation functionality reduces the error code and makes deployment descriptors more freely available.

The persistence structure introduced in JEE 5 is the Java Persistence API (JPA) architecture. JPA has a very important limitation: JPA does not fully support access to stored procedures with out parameters.

Most organizations store their data in relational databases, and for many reasons consider designing their information systems based on stored procedures. In general, it is forbidden for workers to debug stored procedures over the ages, discarding the original scheme and developing a better scheme. The Java programming language provides a JDBC API that defines how to access a relational database. In an enterprise program, the data source object is obtained through a JNDI lookup operation. When a data source object can be obtained, the program can continue to do JDBC access. Even if you already know the sequence of doing a jndi lookup, handling the JNDI exception adds a series of standard code.

Resource injection, also called relationship injection, is a specific form of control transformation. By using annotations, you can reference references to sources, EJBS, and where you need them. This annotation reduces the standard code and solves the inconvenience mentioned above.

When the following container-management artifacts use injection, JEE 5 can transparently process the injection:

Servlet (Servlets, servlet filter, Event listener)

JSP (Tag processor, tagged event listener)

JSF (Beans of scope management)

EJB (beans, intercept)

Java API for XML Web Services (JAX-WS; end processors)

Java Platform (primary (static), login feedback processor)

Injection limits only the first class constructs defined in the Java platform, including the following constructs:

Sessioncontext objects

DataSource objects

Entitymanager interface

Timerservice interface

Other business Beans

WEB Services

Information Inquiry and Topic

Source adapter's link library

Environment entries are limited to String, Character, Byte, short, Integer, Long, Boolean, Double, and Float.

The injection portion of JEE 5 does not apply to any ordinary old Java object (POJO).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.