SCEA之路--4. Applicability of J2EE

General.The most commonly used J2EE technologies (in order of use) are :? Java Servlets / JSPs? JDBC? JNDI? EJB? JMS? Java XML Pack? Java Mail? Java IDL / RMI-IIOP? JTA / JTS

Identify application aspects that are suited to implementation using J2EE technology (i.e. why J2EE ?)An enterprise environment / application with the following qualities would be suitable for J2EEtechnologies:? Heterogeneous environmentAny medium to large sized organisation will have a variety of servers/platforms in use in theenterprise (e.g. Windows, Linux, Solaris, AS400). As JVMs are available for most platforms, Javaprovides Write Once Run Anywhere. Consequently use of J2EE enables code reuse, skillsconsolidation, etc. across the enterprise.? Requirement for vendor neutrality and/or enterprise integration.A primary function of Java and J2EE is to provide generic interfaces for both developers (usingAPIs) and service providers (using SPIs). This enables an organisation to pick and choose productsas they see fit without the fear of vendor lock-in. In addition, integration between enterprisecomponents is quicker and easier.? ProductivityJ2EE provides a feature-rich set of high quality APIs (and some default/reference implementations).Developers can use the APIs to reduce the time spent coding. E.g. sending email from anapplication used to be time-consuming as a developer had to write a cut-down email client orintegrate classes from a third party; email support can now be added using Java Mail in a fewminutes.? Future-proofingWhenever there’s a core demand in the development / service provider community, Sun works inpartnership with other suppliers of enterprise components to provide Java and J2EE APIs andimplementations that support the demand. By using J2EE, an organisation can be reasonably certainthat any developments within the industry will : 1) be available in J2EE and 2) be available in atimely-fashion. E.g. support for web services was added to J2EE as soon as it became apparent thatthere was a demand in the community.? Requirement for Enterprise class components.J2EE is high quality and provides fully integrated support for enterprise concepts – e.g. security,transactions, etc.

Identify application aspects that are suited to implementation using EJB (i.e. why use EJB ?)EJB draws on the use of Java to provide a generic interface for both developers and service providers.EJB provides a standard execution and packaging environment which enables the development ofcomponents that are distributed, container managed and fault tolerant. In addition, EJB provides support fordeclarative programming – for transactions, security, etc.An enterprise environment / application with the following qualities would be suitable for EJB technologies:? Large scale deployment.The application has to service a large number of users whilst maintaining high levels of performanceand availability. EJB facilitates such requirements through support for clustering (multipleinstances; location transparency via JNDI and smart stubs), demand-based instance pooling, caching,etc.? Transactional in nature.EJB provides ACID support for distributed transactions either automatically using CMT (ContainerManaged Transactions) or programmatically using BMT (Bean Managed Transactions withJTA/JTS). If the application is transactional in nature (e.g. transferring amount between bankaccounts) it is suitable for EJB? Requirement for fine-grained security.EJB has integrated support for declarative, fine-grained security? Requirement for supporting a variety of clients.EJB splits the architecture in to n-tiers – typically client tier, web tier, EJB tier and EIS tier.The business logic is centralized in the EJB tier. Consequently, there is a greater level of reuse andapplication clients are thinner.? Requirement for enhanced productivity / reliability.EJB follows the “iceberg” model – the majority of the low-level functionality (e.g. threading,pooling, CMT, CMP/R, etc.) has been developed by experts and is automatically bestowed upon theapplication developers. Consequently the developers can concentrate on writing the business logic.However, the productivity benefits may be mixed – EJBs take longer to write; an application mayhave to integrate with an existing database or a non-DB source so has to use BMP (Bean ManagedPersistence), etc.? Re-use.Components can be written that can be re-used across several projects.? Component provider.If the business of the organisation is providing components for others (e.g. a SAP library), it makessense to harness the strengths of EJB as a component model and packaging mechanism.

18215660330
179001057@qq.com