CERTIFICATION OBJECTIVE 8.01 Introduction to J2EE The Java 2 Platform, Enterprise Edition (J2EE) offers a component-based framework for designing, developing, and deploying Web-based enterprise applications. J2EE defines the specification for EJBs. J2EE is a set of Java technologies, with each of them being designed for a specific purpose, such as providing security, enabling transactions, or sending email. Let’s start our review of J2EE with a short summary of the various J2EE components. J2EE ComponentsIn this section, the main J2EE components are explained. In addition, I explain how Oracle Application Server 10g supports each of these essential features. Java Authentication and Authorization ServiceThe Java Authentication and Authorization Service (JAAS) is Java’s security package, which provides user authentication and user access control capabilities. OC4J implements JAAS order to provide developers a way to offer secure access to J2EE applications. You can also integrate Oracle’s implementation of JAAS with the OracleAS Single Sign-On and the Oracle Internet Directory. Java Transaction APIJava Transaction API (JTA) is the specification of standard Java interfaces between a central transaction monitor and all the parties in a distributed transaction system. JTA is used by applications deployed in the OracleAS to demarcate transactions. For single database-based transactions, JTA helps provide the Single-Phase Commit to demarcate transactions and for transactions involving multiple databases, JTA provides the Two-Phase Commit mechanism. As you’ll see later, OracleAS lets you use non-emulated databases to provide support for the Two-Phase Commit mechanism. Java Naming and Directory InterfaceThe Java Naming and Directory Interface (JNDI) is an independent directory service that enables Java applications to access various naming and directory services with a common Application Programming Interface (API). OC4J implements the JNDI service to provide necessary naming and directory functionality to applications. Java Message ServiceThe Java Message Service (JMS) provides standard messaging API, which enables application components to pass data among themselves. Java programs use JMS to access enterprise message systems. JMS helps you integrate heterogeneous systems using the standard messaging API. Remote Method InvocationRemote Method Invocation (RMI) helps distributed applications communicate through invoking procedure calls. Using RMI, methods of Java objects can be invoked remotely from other Java Virtual Machines. OC4J provides RMI support over two protocols: the Oracle Remote Method Invocation (ORMI) protocol and the Internet Inter-ORB Protocol (IIOP). EJBs, by default, use the RMI/ORMI protocol to communicate, instead of the alternative RMI/IIOP protocol. Data SourcesData sources are encapsulations of database server connections that help provide database connectivity to your J2EE applications. OracleAS provides support for emulated and non-emulated data sources, which are discussed in detail later in this chapter. Java Transaction APIEJBs use Java Transaction API (JTA) 1.0.1 for managing transactions. These transactions involve single-phase and two-phase commits. J2EE Connector Architecture The J2EE Connector Architecture (J2CA) provides a standard architecture for connecting the J2EE platform to non-Java-based enterprise systems such as ERPs and relational database management systems and legacy applications. Java Object CacheThe Java Object Cache provides Java classes to improve performance by caching local copies of Java objects within a process. TerminologyBecause the main topic in this chapter, OC4J, is all about enabling J2EE-based applications, it’s important for the reader to understand the common terminology used when dealing with J2EE applications. The following sections are devoted to that. ServletsServlets are small programs that run on the server, and you use them to enable dynamic content in your Web pages or JSP documents. During their execution, servlets can access the Enterprise Java Beans (which are defined later). Java Server PagesJava Server Pages are HTML pages that contain embedded Java code. JavaBeansJavaBeans are reusable components that implement the functionality you need in J2EE applications. You can use various JavaBeans in your J2EE applications. J2EE ContainersA J2EE container contains the framework for running EJBs, such as starting an EJB, and provides necessary support services for the EJB to perform its magic. OC4J is one type of J2EE container, and you’ll learn a lot about it later in this chapter.
blog comments powered by Disqus |
|
|
|
|
|
|
|