j2ee简介-毕业外文文献翻译
J2EE开发框架外文翻译文献

中英文资料外文翻译文献J2EE开发框架Java2企业版为中间件领域思想的统一上发挥了很大的作用。
比如,J2EE为分布式事务管理、目录服务和消息服务提供了一套标准的编程接口。
J2EE的基础——Java2标准版(J2SE) ,成功地为Java提供了一套访问关系数据库的标准。
但是,就像本文中“J2EE缺乏对编程的支持”提到的一样,J2EE这个平台没有能够提供一个令人满意的应用程序编程模型。
Sun公司和一些大的应用服务器供应商都想用开发工具来降低J2EE开发的复杂性,但是这些工具没有其他的JA V A 开发工具优秀,后者有先进的重构工具,和.NET平台相比,J2EE的工具支持显得很逊色。
很多J2EE开发工具自动产生的代码像这些工具本身同样复杂。
在开源社区很多小型J2EE开发者选择了另外一种开发方式——一些可以降低J2EE开发难度的开发框架,较为流行的比如:Struts, Hibernate, 和Spring Framework,他们当今很多J2EE项目种扮演着重要角色。
为什么要采用框架?框架是一由一些类组成,正式这些类为应用程序提供了一个可重用的设计――或者我们经常提到的——应用程序种的一层。
应用程序代码访问类库从而执行任务,而框架是调用应用程序代码,从而管理程序的流程。
这就是经常说道的好莱坞原则:“不要试图联系我们,我们到时候自会通知你。
”开发者写的程序在运行时由框架调用。
设计一个在各种未知背景下都可以使用的框架是很有挑战性的。
框架很适合在复杂的J2EE开发中使用,它可以为开发者提供一个简单易用的模型。
采用一个经过良好设计的开源框架有很多好处:1、在好的框架下,开发者只需要写一些必须的代码;他们不需要直接接触底层的API。
这一点很重要。
2、经过良好设计的框架可以为程序提供清晰的结构并且提高程序的内聚性。
好清晰的结构使得其他人可以更容易加入项目。
3、一个容易使用的框架可以通过一些例子和文档为用户提供最佳实践。
基于web的学生成绩与管理系统计算机毕业设计英文文献及中文翻译

文档从互联网中收集,已重新修正排版,word格式支持编辑,如有帮助欢迎下载支持。
实用文档毕业设计说明书英文文献及中文翻译学专JA V A programming language and JA V A platform The Java programming language and platform have emerged as major technologies for performing e-business functions. Java programming standards have enabled portability of applications and the reuse of application components across computing platforms. Sun Microsystems' Java Community Process continues to be a strong base for the growth of the Java infrastructure and language standards. This growth of open standards creates new opportunities for designers and developers of applications and services .Applications of JavaJava uses many familiar programming concepts and constructs and allows portability by providing a common interface through an external Java Virtual Machine (JVM). A virtual machine is a self-contained operating environment, created by a software layer that behaves as if it were a separate computer. Benefits of creating virtual machines include better exploitation of powerful computing resources and isolation of applications to preventcross-corruption and improve security.The JVM allows computing devices with limited processors or memory to handle more advanced applications by calling up software instructions inside the JVM to perform most of the work. This also reduces the size and complexity of Java applications because many of the core functions and processing instructions were built into the JVM. As a result, software developers no longer need to re-create the same application for every operating system. Java also provides security by instructing the application to interact with the virtual machine, which served as a barrier between applications and the core system, effectively protecting systems from malicious code.Among other things, Java is tailor-made for the growing Internet because it makes it easy to develop new, dynamic applications that could make the most of the Internet's power and capabilities. Java is now an open standard, meaning that no single entity controls its development and the tools for writing programs in the language are available to everyone. The power of open standards like Java is the ability to break down barriers and speed up progress.Today, you can find Java technology in networks and devices that range from the Internet and scientific supercomputers to laptops and cell phones, from Wall Street market simulators to home game players and credit cards. There are over 3 million Java developers and now there are several versions of the code. Most large corporations have in-house Java developers. In addition, the majority of key software vendors use Java in their commercial applications (Lazaridis, 2003).ApplicationsJava on the World Wide WebJava has found a place on some of the most popular websites in the world and the uses of Java continues to grow. Java applications not only provide unique user interfaces, they also help to power the backend of websites. Everybody is probably familiar with eBay and Amazon have been Java pioneers on the World Wide Web.eBayFounded in 1995, eBay enables e-commerce on a local, national and international basis with an array of Web sites.You can find it on eBay, even if you didn't know it existed. On a typical day, more than 100 million items are listed on eBay in tens of thousands of categories. on eBay; the world's largest online marketplace.eBay uses Java almost everywhere. To address some security issues, eBay chose Sun Microsystems' Java System Identity Manager as the platform for revamping its identity management system. The task at hand was to provide identity management for more than 12,000 eBay employees and contractors.Now more than a thousand eBay software developers work daily with Java applications. Java's inherent portability allows eBay to move to new hardware to take advantage of new technology, packaging, or pricing, without having to rewrite Java code.Amazon has created a Web Service application that enables users to browse their product catalog and place orders. uses a Java application that searches the Amazon catalog for books whose subject matches a user-selected topic. The application displays ten books that match the chosen topic, and shows the author name, book title, listprice, Amazon discount price, and the cover icon. The user may optionally view one review per displayed title and make a buying decision.Java in Data Warehousing & MiningAlthough many companies currently benefit from data warehousing to support corporate decision making, new business intelligence approaches continue to emerge that can be powered by Java technology. Applications such as data warehousing, data mining, Enterprise Information Portals and Knowledge Management Systems are able to provide insight into customer retention, purchasing patterns, and even future buying behavior.These applications can not only tell what has happened but why and what may happen given certain business conditions; As a result of this information growth, people at all levels inside the enterprise, as well as suppliers, customers, and others in the value chain, are clamoring for subsets of the vast stores of information to help them make business decisions. While collecting and storing vast amounts of data is one thing, utilizing and deploying that data throughout the organization is another.The technical challenges inherent in integrating disparate data formats, platforms, and applications are significant. However, emerging standards such as the Application Programming Interfaces that comprise the Java platform, as well as Extendable Markup Language technologies can facilitate the interchange of data and the development of next generation data warehousing and business intelligence applications. While Java technology has been used extensively for client side access and to presentation layer challenges, it is rapidly emerging as a significant tool for developing scaleable server side programs. The Java2 Platform, Enterprise Edition (J2EE) provides the object, transaction, and security support for building such systems.Metadata IssuesOne of the key issues that business intelligence developers must solve is that of incompatible metadata formats. Metadata can be defined as information about data or simply "data about data." In practice, metadata is what most tools, databases, applications, and other information processes use to define, relate, and manipulate data objects within their own environments. It defines the structure and meaning of data objects managed by an applicationso that the application knows how to process requests or jobs involving those data objects. Developers can use this schema to create views for users. Also, users can browse the schema to better understand the structure and function of the database tables before launching a query.To address the metadata issue, a group of companies have joined to develop the Java Metadata Interface (JMI) API. The JMI API permits the access and manipulation of metadata in Java with standard metadata services. JMI is based on the Meta Object Facility (MOF) specification from the Object Management Group (OMG). The MOF provides a model and a set of interfaces for the creation, storage, access, Metamodel and metadata interchange is done via XML and uses the XML Metadata Interchange (XMI) specification, also from the OMG. JMI leverages Java technology to create an end-to-end data warehousing and business intelligence solutions framework.Enterprise JavaBeansA key tool provided by J2EE is Enterprise JavaBeans (EJB), an architecture for the development of component-based distributed business applications. Applications written using the EJB architecture are scalable, transactional, secure, and multi-user aware. These applications may be written once and then deployed on any server platform that supportsJ2EE. The EJB architecture makes it easy for developers to write components, since they do not need to understand or deal with complex, system-level details such as thread management, resource pooling, and transaction and security management. This allows for role-based development where component assemblers, platform providers and application assemblers can focus on their area of responsibility further simplifying application development.Data Storage & AccessData stored in existing applications can be accessed with specialized connectors. Integration and interoperability of these data sources is further enabled by the metadata repository that contains metamodels of the data contained in the sources, which then can be accessed and interchanged uniformly via the JMI API. These metamodels capture the essential structure and semantics of business components, allowing them to be accessed and queried via the JMI API or to be interchanged via XML. Through all of these processes, the J2EEinfrastructure ensures the security and integrity of the data through transaction management and propagation and the underlying security architecture.To consolidate historical information for analysis of sales and marketing trends, a data warehouse is often the best solution. In this example, data can be extracted from the operational systems with a variety of Extract, Transform and Load tools (ETL). The metamodels allow EJBs designed for filtering, transformation, and consolidation of data to operate uniformly on data from diverse data sources as the bean is able to query the metamodel to identify and extract the pertinent fields. Queries and reports can be run against the data warehouse that contains information from numerous sources in a consistent, enterprise-wide fashion through the use of the JMI API.Java in Industrial SettingsMany people know Java only as a tool on the World Wide Web that enables sites to perform some of their fancier functions such as interactivity and animation. However, the actual uses for Java are much more widespread. Since Java is an object-oriented language, the time needed for application development is minimal.In addition, Java's automatic memory management and lack of pointers remove some leading causes of programming errors. Most importantly, application developers do not need to create different versions of the software for different platforms. The advantages available through Java have even found their way into hardware. The emerging new Java devices are streamlined systems that exploit network servers for much of their processing power, storage, content, and administration.Benefits of JavaThe benefits of Java translate across many industries, and some are specific to the control and automation environment. Java's ability to run on any platform enables the organization to make use of the existing equipment while enhancing the application.IntegrationWith few exceptions, applications running on the factory floor were never intended to exchange information with systems in the executive office, but managers have recently discovered the need for that type of information. Before Java, that often meant bringingtogether data from systems written on different platforms in different languages at different times. Integration was usually done on a piecemeal basis, once it worked, was unique to the two applications it was tying together. Additional integration required developing a brand new system from scratch, raising the cost of integration.ScalabilityAnother benefit of Java in the industrial environment is its scalability. Even when internal compatibility is not an issue, companies often face difficulties when suppliers with whom they share information have incompatible systems. This becomes more of a problem as supply-chain management takes on a more critical role which requires manufacturers to interact more with offshore suppliers and clients. The greatest efficiency comes when all systems can communicate with each other and share information seamlessly. Since Java is so ubiquitous, it often solves these problems.Dynamic Web Page DevelopmentJava has been used by both large and small organizations for a wide variety of applications beyond consumer oriented websites. Sandia, a multiprogram laboratory of the U.S. Department of Energy's National Nuclear Security Administration, has developed a unique Java application. The lab was tasked with developing an enterprise-wide inventory tracking and equipment maintenance system that provides dynamic Web pages.ConclusionOpen standards have driven the e-business revolution. As e-business continues to develop, various computing technologies help to drive its evolution. The Java programming language and platform have emerged as major technologies for performing e-business functions. the time needed for application development is minimal. Java also encourages good software engineering practices with clear separation of interfaces and implementations as well as easy exception handling. Java's automatic memory management and lack of pointers remove some leading causes of programming errors. The advantages available through Java have also found their way into hardware. The emerging new Java devices are streamlined systems that exploit network servers for much of their processing power, storage, content, and administration.。
j2ee外文翻译文献

j2ee外文翻译Infrastructure for Automatic Dynamic DeploymentOf J2EE Application in Distributed EnvironmentsAnatoly Akkerman, Alexander Totok, and Vijay KaramchetiAbstract: in order to achieve such dynamic adaptation, we need an infrastructure for automating J2EE application deployment in such an environment. This need is quite evident to anyone who has ever tried deploying a J2EE application even on a single application server, which is a task that involves a great deal of configuration of both the system services and application components.Key words: j2ee; component; Distributed; Dynamic Deployment;1 IntroductionIn recent years, we have seen a significant growth in component-based enterprise application development. These applications are typically deployed on company Intranets or on the Internet and are characterized by high transaction volume, large numbers of users and wide area access. Traditionally they are deployed in a central location, using server clustering with load balancing (horizontal partitioning) to sustain user load. However, horizontal partitioning has been shown very efficient only in reducing application-related overheads of user-perceived response times, without having much effect on network-induced latencies. Vertical partitioning (e.g., running web tier and business tier in separate VMs) has been used for fault isolation and load balancing but it is sometimes impractical due to significant run-time overheads (even if one would keep the tiers on a fast local-area network) related to heavy use of remote invocations. Recent work [14] in the context of J2EE component based applications has shown viability of vertical partitioning in wide-area networks without incurring the aforementioned overheads. The key conclusions from that study can be summarized as follows:• Using properly designed applications, vertical distribution across wide-area networks improves user-perceived latencies.• Wide-area vertical layering requires replication of application components and maintaining consistency between replicas.• Additional replicas may be deployed dynamically to handle new requests.• Different replicas may, in fact, be different implementations of the same component based on usage (read-only, read-write).• New request paths may reus e components from previously deployed paths.Applying intelligent monitoring [6] and AI planning [2, 12] techniques in conjunction with the conclusions of that study, we see a potential for dynamic adaptation in industry-standard J2EE component-based applications in wide area networksThrough deployment of additional application components dynamically based on active monitoring. However, in order to achieve such dynamic adaptation, we need an infrastructure for automating J2EE application deployment in such an environment. This need is quite evident to anyone who has ever tried deploying a J2EE application even on a single application server, which is a task that involves a great deal of configuration of both the system services and application components. For example one has to set up JDBC data sources, messaging destinations and other resource adapters before application components can be configured and deployed. In a wide area deployment that spans multiple server nodes, this proves even more complex, since more system services that facilitate inter-node communications need to be configured and started and a variety of configuration data, like IP addresses, port numbers, JNDI names and others have to be consistently maintained in various configuration files on multiple nodes.This distributed deployment infrastructure must be able to:• address inter-component connectivity specification and define its effects on component configuration and deployment,• address application component dependencies on applicati on server services, their configuration and deployment,• provide simple but expressive abstractions to control adaptation through dynamic deployment and undeployment of components,• enable reuse of services and components to maintain efficient use of network nodes’ resources,• provide these facilities without incurring significant additional design effort on behalf of application programmers.In this paper we propose the infrastructure for automatic dynamic deployment of J2EE applications, which addresses all of the aforementioned issues. The infrastructure defines architecture description languages (ADL) for component and link description and assembly. The Component Description Language is used to describe application components and links. It provides clear separation of application components from system components. A flexible type system is used to define compatibility of component ports and links. A declaration and expression language for configurable component properties allows for specification of inter-component dependencies and propagation of properties between components. The Component (Replica) Assembly Language allows for assembly of replicas of previously defined components into application paths byConnecting appropriate ports via link replicas and specifying the mapping of these component replicas onto target application server nodes. The Component Configuration Process evaluates an application path’s correctness, identifies the dependenciesof application components on system components, and configures component replicas for deployment. An attempt is made to match and reuse any previously deployed replicas in the new path based on their configurations. We implement the infrastructure as a part of the JBoss open source Java application server [11] and test it on severalSample J2EE applications –Java Pets tore [23], Rubies [20] and TPC-W-NYU [32]. The infrastructure implementation utilizes the JBoss’s extendable micro-kernel architecture, based on the JMX [27] specification. Componentized architecture of JBoss allows incremental service deployments depending on the needs of deployed applications. We believe that dynamic reconfiguration of application servers through dynamic deployment and undeployment of system services is essential to building a resource-efficient framework for dynamic distributed deployment of J2EE applications. The rest of the paper is organized as follows. Section 2 provides necessary background for understanding the specifics of the J2EE component technology which are relevant to this study. Section 3 gives a general description of the infrastructure architecture, while section 4 goes deeper in describing particularly important and interesting internal mechanisms of the infrastructure. Section 5 describes the implementation of the framework, and related work is discussed in section 6.2 J2EE Background2.1 IntroductionComponent frameworks. A component framework is a middleware system that supports applications consisting of components conforming to certain standards. Application components are “plugged” into the component framework, which establishes their environmental conditions and regulates the interactions between them. This is usually done through containers, component holders, which also provide commonly required support for naming, security, transactions, and persistence. Component frameworks provide an integrated environment for component execution, as a result significantly reduce the effort .it takes to design, implement, deploy, and maintain applications. Current day industry component framework standards are represented by Object Management Group’s CORBA Component Model [18], Sun Microsystems’ Java 2 Platform Enterprise Edition (J2EE) [25] and Microsoft’s .NET [17], with J2EE being currently the most popular and wide ly used component framework in the enterprise arena.J2EE. Java 2 Platform Enterprise Edition (J2EE) [25] is a comprehensive standard for developing multi-tier enterprise Java applications. The J2EE specification among other things defines the following:• Component programming model,• Component contracts with the hosting server,• Services that the platform provides to these components,• Various human roles,• Compatibility test suites and compliance testing procedures.Among the list of services that a compliant application server must provide are messaging, transactions, naming and others that can be used by the application components. Application developed using J2EE adhere to the classical 3-Tier architectures –Presentation Tier, Business Tier, and Enterprise Information System (EIS) Tier (see Fig. 1). J2EE components belonging to each tier are developed adhering to theSpecific J2EE standards.1. Presentation or Web tier.This tier is actually subdivided into client and server sides. The client side hosts a web browser, applets and Java applications that communicate with the server side of presentationtier or the business tier. The server side hosts Java Servlet components [30], Java Server Pages (JSPs) [29] and static web content. These components are responsible for presenting business data to the end users. The data itself is typically acquired from the business tier and sometimes directly from the Enterprise Information System tier. The server side of the presentation tier is typically accessed through HTTP(S) protocol.2. Business or EJB tier.This tier consists of Enterprise Java Beans (EJBs) [24] that model the business logic of the enterprise application. These components provide persistence mechanisms and transactional support. The components in the EJB tier are invoked through remote invocations (RMI), in-JVM invocations or asynchronous message delivery, depending on the type of EJB component. The EJB specification defines several types of components. They differ in invocation style (synchronous vs. asynchronous, local vs. remote) and statefulness: completely stateless (e.g., Message-Driven Bean), stateful non-persistent(e.g., Stateful Session Bean), stateful persistent (e.g., Entity Bean). Synchronously invocable EJB components expose themselves through a special factory proxy object (an EJB Home object, which is specific to a given EJB), which is typically bound in JNDI by the deployer of the EJB. The EJB Home object allows creation or location of an EJBObject, which is a proxy to a particular instance of an EJB 1.3. Enterprise Information System (EIS) or Data tier.This tier refers to the enterprise information systems, like relational databases, ERP systems, messaging systems and the like. Business and presentation tier component communicate with this tier with the help of resource adapters as defined by the Java Connector Architecture [26].The J2EE programming model has been conceived as a distributed programming model where application components would run in J2EE servers and communicate with each other. After the initial introduction and first server implementations, the technology, most notably, the EJB technology has seen some a significant shift away from purely distributed computing model towards local interactions 2. There were very legitimate performance-related reasons behind this shift, however theDistributed features are still available. The J2EE specification has seen several revisions, the latest stable being version 1.3, while version 1.4 is going through last review phases 3. Weshall focus our attention on the former, while actually learning from the latter. Compliant commercial J2EE implementations are widely available from BEA Systems [4], IBM [9], Oracle [21] and other vendors. Several open source implementations, including JBoss [11] and JOnAS [19] claim compatibility as well. ARecent addition to the list is a new Apache project Geronimo [1].2.2 J2EE Component Programming ModelBefore we describe basic J2EE components, let’s first address the issue of defining what a component is a software component is a unit of composition with contractually specified interfaces and explicit context dependencies only. A software component can be deployed independently and is subject to composition by third parties [31].According to this definition the following entities which make up a typical J2EE application would be considered application components (some exceptions given below):• EJBs (session, entity, message-driven),• Web components (servlets, JSPs),• messaging destinations,• D ata sources,EJB and Web components are deployed into their corresponding containers provided by the application server vendor. They have well-defined contracts with their containers that govern lifecycle, threading, persistence and other concerns. Both Web and EJB components use JNDI lookups to locate resources or other EJB components they want to communicate with. The JNDI context in which these lookups are performed is maintained separately for each component by its container. Bindings messaging destinations, such as topics and queues, are resources provided by a messaging service implementation. Data sources are resources provided by the application server for data access by business components into the enterprise information services (data) tier, and most commonly are exemplified by JDBC connection pools managed by the applicationServer. A J2EE programmer explicitly programs only EJBs and Web components. These custom-written components interact with each other and system services both implicitly and explicitly. For example, an EJB developer may choose explicit transaction demarcation (i.e., Bean-Managed Transactions) which means that the developer assumes the burden of writingexplicit programmatic interaction with the platform’s Transaction Manager Service through well-defined interfaces. Alternatively, the developer may choose Container-Managed transaction demarcation, where transactional behavior of a component is defined through its descriptors and handled completely by the EJB container, thus acting as an implicit dependency of the EJB on the underlying Transaction Manager service.2.3 Links Between Components2.3.1 Remote InteractionsJ2EE defines only three basic inter-component connection types that can cross application server boundaries, in all three cases; communication is accomplished through special Java objects.• Remote EJB invocation: synchronous EJB invocations through EJB Home and EJB Object interfaces.• Java Connector outbound connection: synchronous message receipt, synchronous and asynchronous message sending,Database query using Connection Factory and Connection interfaces.• Java Connector inbound connection: asynchronous message delivery into Message-Driven Beans (MDBs) only, utilizing Activation Spec objects. In the first two cases, an application component developer writes the code that performs lookup of these objects in the component’s run-time JNDI context as well as code that issues method invocations or sends and receives messages to and from the remote component. The componen t’s run-time JNDI context is created for each deployment of the component.Bindings in the context are initialized at component deployment time by the deployed (usually by means of component’s deployment descriptors). These bindings are assumed to be static, since the specification does not provide any contract between the container and the component to inform of any binding changes In the case of Java Connector inbound communication, Activation Spec object lookup and all subsequent interactions with it are done implicitly by the MDB container. The protocol for lookup has not been standardized, though it is reasonable to assume a JMX- or JNDI-based lookup assuming the underlying application server provides facilities to control each step of deployment process, establishment of a link between J2EE components would involve:• Deployment of target component classes (optional for some components, like destinations),• C reation of a special Java object to be used as a target component’s proxy,• Binding of this ob ject with component’s host naming service (JNDI or JMX),• Start of the target component,• Deployment of referencing component classes,• Creation and population of referencing component’s run-time context in its host naming service,• start of the refere ncing component.However, none of modern application servers allow detailed control of the deployment process for all component types beyond what is possible by limited options in their deployment descriptors 4. Therefore our infrastructure will use a simplified approach that relies on features currently available on most application servers:• Ability to deploy messaging destinations and data sources dynamically,• Ability to create and bind into JNDI special objects to access messaging destinations and data sources,• Ability to specify initial binding of EJB Home objects upon EJB component deployment,• Ability to specify a JNDI reference 5 in the referencing component’s run-time context to point to the EJB Home binding of the referenced EJB component. In our infrastructure which is limited to homogeneous application servers, these options are sufficient to control intercomponent links through simple deployment descriptor manipulation. However, in context of heterogeneous application servers, simple JNDI references and thus simple descriptor manipulation are insufficient due to cross-application-serverClassloading issues.2.3.2 Local InteractionsSome interactions between components can occur only between components co-located in the same application server JVM and sometimes only in the same container. In the Web tier, examples of such interactions are servlet-to-servlet request forwarding. In the EJB tier, such interactions are CMP Entity relations and invocations via EJB local interfaces. Such local deployment concerns need not be exposed at the level of a distributed deployment infrastructure other than to ensure collocation. Therefore, the infrastructure treats allcomponents requiring collocation as a single component.2.4 Deployment of J2EE Applications and System Services2.4.1 Deployment of Application ComponentsDeployment and undeployment of standard J2EE components has not yet been standardized (see JSR 88 [10] for standardization effort 6). Therefore, each application server vendor provides proprietary facilities for component deployment and undeployment. And while the J2EE specification does define packaging of standard components which includes format and location of XML-based deployment descriptors within the package, this package is not required to be deployable by an application server without proprietary transformation. Examples of such transformation are• Generation of additional proprietary descriptors that supplement or replace the standard ones,• Code generation of application server-specific classes.In order to proceed with building a dynamic distributed deployment infrastructure capable of deploying in heterogeneous networks, we propose a universal unit of deployment to be a single XML-based deployment descriptor or a set of such,Bundled into an archive. The archive may optionally include Java classes that implement the component and any other resources that the component may need. Alternatively, the deployment descriptors may simply have URL references to codebases. We assume presence of a dynamic deployment/undeployment service on all compliant J2EE servers and a robust application server classloading architecture capable of repeated deployment cycles without undesired classloading-related issues. Most modern application servers (e.g., JBoss [11] and Geronimo [1]) do provide such facilities.2.4.2 Deployment of System Components (Services)While lacking only in the area of defining a clear specification of deployment and undeployment when it comes to application components, the J2EE standard falls much shorter with respect to system services. Not only a standardized deployment facility for system services is not specified, the specification, in fact, places no requirements even on life cycle properties of these services, nor does it address the issue of explicit specification of application component dependencies on the underlying system services. Instead it defines arole of human deploy who is responsible for ensuring that the required services are running based on his/her understanding of dependencies of application components on system services as implied by the nature of components and their deployment descriptors.References[1] Matt Bishop. Computer Security: Art and Science. New York, 2002[2] Matt Bishop. Vulnerabilities Analysis. Proceedings of the Second International Symposium on RecentAdvances in Intrusion Detection.Los Angeles 2006[3] Balasubra maniyan. An Architecture for Intrusion Detection using Autonomous Agents[M]. Department of Computer Sciences, Purdue University, 1998.。
计算机 JSP web 外文翻译 外文文献

计算机 JSP web 外文翻译外文文献12.1 nEffective web n design involves separating business objects。
n。
and object XXX。
Although one individual may handle both roles on a small-scale project。
it is XXX.12.2 JSP ArchitectureIn this chapter。
XXX using JavaServer Pages。
servlets。
XXX of different architectures。
each building upon the us one。
The diagram below outlines this process。
and we will explain each component in detail later in this article.Note: XXX.)When Java Server Pages were introduced by Sun。
some people XXX。
While JSP is a key component of the J2EE n and serves as the preferred request handler and response mechanism。
it is XXX.XXX JSP。
the XXX that JSP is built on top of the servlet API and uses servlet XXX interesting ns。
such as whether we should XXX in our Web-enabled systems。
and if there is a way to combine servlets and JSPs。
J2EE 外文翻译原文

Design and Implementation of Distribution Network SCADA System Based onJ2EE FrameworkZhao Qiang, Chen DanyanDepartment of Computer Science and Technology, North China Electric Power University (NCEPU), Beijing 102206, Chinazhaoqiang01@ABSTRACT: In this paper, the problems exposed by the thirdgeneration of SCADA (Supervisory Control And Data Acquisition) based on the C/S(Client/Server) mode are analyzed. Then, a new distribution network SCADA based on the four-tier architecture of J2EE platform is built. Because of poor information sharing and interoperability of CORBA (Common Object Request Broker Architecture) as the integration bus among application systems of power enterprises, the seamless integration between SCADA heterogeneous data platform which is based on standard IEC (International Electrical Commission) 61970, and other systems is achieved by means of Web services, and such integration is standard and open. The combination of EJB (Enterprise JavaBean) and Hibernate to implement the business logic and make data be persistent separately also makes the SCADA much more scalable and flexible. Because of its flexibility and extensibility, this new SCADA has great benefit to the automation course of electric power systems.KEYWORDS: J2EE framework; SCADA; standard IEC 61970; Web servicesI. I NTRODUCTIONDistribution network SCADA (Supervisory Control and Data Acquisition) includes not only the models and methods of data acquisition and supervisory control but the models and methods of power network topology. The power system models provided by SCADA are consistent, complete and can be used directly [1].With the expansion and market-oriented operation of the power network, the operating and failure modes begin to increase, so does the data needed to be monitored and analyzed. Especially when devices are running down or under emergency conditions, the analysis and decision-making tasks are so pressing and heavy that the operator often can’t accomplish them perfectly [2]. Therefore, they have to depend on the efficient SCADA. The problems of the third generation of SCADA based on the C/S (Client/Server) mode have gradually appeared, such as being short of flexibility, high install cost, being difficult to share data with other systems, etc. Power network SCADA in China has stepped into the fourth generation and its main characters includes standard IEC (International Electrical Commission) 61970 based, object-oriented and continuing to expand the integration between the SCADA system and other systems [3].J2EE platform, as the mainstream enterprise-class platform for distributed applications, is a component-basedand standards-based platform. Developing SCADA with advanced J2EE technologies can resolve a series of problems existing in the traditional SCADA. J2EE platform is the ideal platform to develop the fourth generation of SCADA system.II.T HE DESIGN OF DISTRIBUTION NETWORK SCADABASED ON J2EE PLATFORMAccording to J2EE architecture, this SCADA is designed Figure 1. SCADA system based on J2EE platform.The new SCADA is based on B/S (Browser/Server) and C/S mixed mode: on the one hand, the browser supplies the users with rich graphic display and user interaction functions, including sequence-of-event report, primary electric wiring diagram, etc., on the other hand, independent Java applications, which run directly on the client operating system(or Java Virtual Machine), can make full use of client resources and computing ability, and the result is that it will offer richer functions for the master side, e.g., analyzing the real-time or historical data, monitoring the devices, etc. The monitor screens of the system are realized by SVG (Scalable Vector Graphics) which is recommended by standard IEC 61970. The system reads static map metadata firstly to create SVG screen, and then reads the real-time data according to pre-defined refresh cycle to refresh the screen partially.JSP (JavaServer Pages) and Java Servlet in the Web layer respond to the requests from the client. Having received2009 International Forum on Information Technology and Application 2009 International Forum on Information Technology and Applicationsthose requests, Servlet calls the EJB (Enterprise JavaBean) components in the business layer via factory delegate class, and then returns the processing results to the client. For the purpose of realizing data sharing between SCADA and other power systems, e.g., GIS (Geographic Information System), some business methods are further wrapped and published as Web services according to standard IEC 61970.The business logic is implemented by EJB component. EJB is the core of the whole design and it enables the system to meet the diverse requirements of power enterprises. The detailed business logic in the early SCADA systems is wrapped by EJB component, that is to say Entity Bean is responsible for building dynamic mapping with the database storing historical data [4]. But in this system, such an old structure is discarded. It uses Hibernate framework instead to build dynamic mapping and then Session Bean realizes the business logic by calling the Hibernate. The business logic encapsulated includes recording sequence-of-even, analyzing failures, etc. Hibernate not only allows the mapping of mapped tables with the domain objects, but also provides data query and recovery mechanisms. Hibernate can replace Entity Bean in the J2EE applications to complete the important task of data persistence [5].The real-time database and the relational database are both adopted. The data from substations are written into the former by the data acquisition module, and then it stores the date needed to record into the latter. The data stored mainly involves telemetry, telesignalling and electrical measurement. III.T HE IMPLEMENTATION OF DISTRIBUTION NETWORKSCADArmation expression and multi-system integrationbased on standard IEC 61970This distribution network SCADA system follows standard IEC 61970 to accomplish the information exchange and interoperation among systems. The integration platform encompasses CIM (Common Information Model), database, import and export tool for CIM/XML (eXtensible Markup Language), CIS (Component Interface Specification) interface implementation and Web services integration bus, as illustrated in Fig. 2.The CIM database mainly used to manage and maintain CIM model data and build bi-directional interface with real-time database. The packages needed to be implemented consist of the core package, topology package, wire package, measuring package and other packages related with CIS service interfaces. The structure of CIM database is built automatically in light of mdl files by conversion tool and the data source comes from SCADA real-time database. The CIM/XML import/export tool will import XML files into CIM database if the whole grid model changes.The CIS interface implementation implements GDA (Generic Data Access) interface and HSDA (High Speed Data Access) interface. The former provides conditional and unconditional queries, writing ability while the latter is used to transfer massive data efficiently [6]. This system offers to read and write data synchronously and asynchronously, subscribe data, etc. Systems like GIS can develop new applications or transfer data flexibly by calling GDA and HSDA implementations on the Web service integration bus. For example, the client can get grid model data by calling GDA methods or get measuring values by calling HSDA methods.The following steps show how to get the whole gird model.1)Get “ResourceID”: Get “ResourceID” for each class by calling method “get_uris”.2)Get record values: Get all record values in the tables by calling method “get_filtered_extent_values”.The system uses the iterator to allow the client to get an arbitrary amount of resources in one time. If the iterator has no resource when the client won’t use it any more, it will be recycled automatically.The traditional integration solutions for heterogeneous system are private and complex, that is to say, different components can’t exchange data directly. In this system, we adopt loosely coupled Web services. It is of great significance in promoting power enterprises to achieve wider application integration.The CIS provided by standard IEC 61970 is identified by IDL (Interface Description Language), which is only for CORBA (Common Object Request Broker Architecture). If want to develop Web services [7], we have to transform IDL CIS into WSDL (Web Service Definition Language) CIS according to conversion rules. Then the CIS Web services server can be built by using the JAX-RPC (Java APIs for XML-Based Remote Procedure Call) server-side model. Here some tools, such as Axis, will be used to mapping WSDL CIS into Java classes.The method using Web services to establish integration bus improves the reusability of the SCADA system and achieves overall information sharing. The third party can visits the SCADA’s run information and grid model in a standard manner.B.Visiting EJB component with design patternsAll the instances created by the factory method pattern usually implement a same interface, where all methods owned by the instances are identified, and these methods always have different implementation in different implementing classes. The present system combines factory method pattern and singleton pattern when creating EJBdelegate factory class. The singleton pattern will provideglobal access point, and the result is that the cost of creatingand destroying Java objects will decrease. The steps for theEJB factory to get EJB remote interface by JNDI (Java Naming and Directory Interface) are as follows.1) Create an EJB factory class: Create an EJB factory class named RemoteFactory, and declare an instance of HashMap for caching EJB remote interface and a private andstatic instance of RemoteFactory which will be returned by asynchronous method. 2) Declaration: Declare the constructor of RemoteFactory to be private. 3) Create a lookup method: Create a lookup method whose return type is EJBObject. In this method, lookup the object of EJBObject in the above HashMap cache pool firstly.If it does exist, then return it. Otherwise, lookup all the homeinterfaces’ parent interface by JNDI in the context, and then a new object of EJBObject which will be put into the existing HashMap later will be created by the interface.After the factory class being created, the client just needsto call the lookup method of it and transfer concreteparameters. Such a universal method can avoid a largenumber of repeat lookups and calls for the method “create”from the client.C. The integration of EJB and HibernateAs the object-relational mapping solution of Java,Hibernate provides a convenient framework for the mapping from object-oriented domain model to the traditional relational database. On the merits of Hibernate, the system will integrate EJB and Hibernate. Hibernate provides the operation to the database and it will be deployed to the Weblogic application server, while Session Bean is responsible for calling Hibernate. The steps of the integration are as follows.1) Deploy Hibernate: Deploy Hibernate to the WeblogicApplication Server. After the deployment, then Weblogic will generate a JNDI for Hibernate. 2) Create a StartUp class: In order to ensure the pre-creating of Hibernate’s SessionFactory, the system needs to create a StartUp class which implements the Weblogic T3StartUpDef interface. This class will begin to run in thebackground when the application server starts. The coremethod is as follows.public String startup(String name, Hashtable args) throwsException {Configuration con = newConfiguration().configure("/hibernate.cfg.xml");SessionFactory sf = con.buildSessionFactory();}3) Call Hibernate: Session Bean can get the Hibernate SessionFactory through the above-mentioned Hibernate JNDI. After getting the instance, Session Bean can operate the database through Hibernate.Context ctx = new InitialContext(); SessionFactory sf = (SessionFactory) ctx.lookup("hibernate/session_factory"); D. Real-time Java TechnologyBecause of Java’s inherent uncertainty such as thread management, garbage collection, class loading, etc., the standard Java applications that run on general JVM (JavaVirtual Machine) can only meet soft real-time demand in a few hundred milliseconds.For a real-time system, predictable execution is critical.In the SCADA systems, when the fault accidents happen, SCADA system should give reaction timely, but the conventional Java thread uses the time slice rotation scheduling mechanism. The mechanism doesn’t provide any priority protections to threads.By using fixed priority scheduling strictly, real-time thread scheduling of RTSJ (Real Time Specification for Java) is perceptible. The class HighResolutionTime and Clock provide high resolution clocks for real-time systems and canbe accurate to nanosecond [8]. The mechanisms that RTSJprovides can meet the needs of the real-time SCADA system.To provide real-time functions, the SCADA systemrequires the underlying operating system to support real-time,for example, Solaris 10 has a real-time scheduler. Also theprogram needs to import the javax.realtime package beforewe use any functions provided by RTSJ implementation. Follow following steps can create and start a real-time thread. 1) Initialize parameters: Initialize related parameters of the constructor of real-time thread. A typical constructor is like this: RealtimeThread(SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memory, MemoryArea area, ProcessingGroupParameters group, ng.Runnable logic). 2) Instantiating the real-time thread: Instantiating a real-time thread object using above constructor. 3) Start the thread: Call the “start” method of the real-time thread.Generally in the system, the common RealtimeThread will be used in the mission that can tolerate delays caused by the garbage collector. High-priority NoHeapRealtimeThreadis rarely interrupted or occupied, so they will be used in the most demanding tasks which can’t tolerate delays. IV. C ONCLUSION This paper applies the four-layer J2EE architecture to the development of the distribution network SCADA system. After analyzing the architecture of existing SCADA systems, the new system gets a lot of improvements by using many new software technologies that sprang up in recent years. With introduction of the EJB component, SVG, real-time Java technology, standard IEC 61970 and Web services, practices have proved that the new distribution network SCADA system has greater flexibility and scalability than the old system. It will play an important role in thedistribution network automation systems.R EFERENCES[1]Chen Tang, Zhao Zukang, and Chen Xingying, Distribution NetworkSystems and Their Automation Technologies. Beijing: China Electric Power Press, 2004.[2]Du Junhong, Le Quanming, and Tenghuan, “Design of powerdispatching automation systems based on J2EE and CORBA,”Automation of Electric Power Systems. Nanjing, vol. 28, pp. 78-81, March 2004.[3]Ma Zhengwu, “Summarize of SCADA&RTU in the course ofrealizing the enterprise automation,” Program-mable Controller & Factory Automation. Shenzhen, pp. 18-20, August 2005.[4]Yang Jian, Lv You, and Bao Yinghao, “Research and design of powerSCADA system based on B/S three-tier structure,” Science Mosaic.Nanchang, pp. 45-47, September 2007. [5]Gan Shuman, Open Source Framework Technologies and PracticesBased on Eclipse. Beijing: Publishing House of Electronics Industry, 2007.[6]Pan Jianyue, Zhu Chunjie, and Xia Xiang, “Research and applicationof CIM in power utility,” Zhejiang Electric Power. Hangzhou, pp. 9-12, March 2004.[7]Zhang Shenming, Liu Guoding, “Introduction of standard IEC61970,” Automation of Electric Power Systems. Nanjing, vol. 26, pp.1-6, July 2002.[8]Peter C.Dibble, Real-Time Java Platform Programming, Beijing:Machinery Industry Press, 2003.。
外文翻译---J2EE WEB应用架构分析

附录附录一:文献资料原文J2EE WEB应用架构分析1、架构概述J2EE体系包括java server pages(JSP) ,java SERVLET, enterprise bean,WEB service等技术。
这些技术的出现给电子商务时代的WEB应用程序的开发提供了一个非常有竞争力的选择。
怎样把这些技术组合起来形成一个适应项目需要的稳定架构是项目开发过程中一个非常重要的步骤。
完成这个步骤可以形成一个主要里程碑基线。
形成这个基线有很多好处:各种因数初步确定:为了形成架构基线,架构设计师要对平台(体系)中的技术进行筛选,各种利弊的权衡。
往往架构设计师在这个过程中要阅读大量的技术资料,听取项目组成员的建议,考虑领域专家的需求,考虑赞助商成本(包括开发成本和运行维护成本)限额。
一旦架构设计经过评审,这些因数初步地就有了在整个项目过程中的对项目起多大作用的定位。
定向技术培训:一旦架构师设计的架构得到了批准形成了基线,项目开发和运行所采用的技术基本确定下来了。
众多的项目经理都会对预备项目组成员的技术功底感到担心;他们需要培训部门提供培训,但就架构师面对的技术海洋,项目经理根本就提不出明确的技术培训需求。
怎不能够对体系中所有技术都进行培训吧!有了架构里程碑基线,项目经理能确定这个项目开发会采用什么技术,这是提出培训需求应该是最精确的。
不过在实际项目开发中,技术培训可以在基线确定之前与架构设计并发进行。
角色分工:有了一个好的架构蓝图,我们就能准确划分工作。
如网页设计,JSP 标签处理类设计,SERVLET 设计,session bean设计,还有各种实现。
这些任务在架构蓝图上都可以清晰地标出位置,使得项目组成员能很好地定位自己的任务。
一个好的架构蓝图同时也能规范化任务,能很好地把任务划分为几类,在同一类中的任务的工作量和性质相同或相似。
这样工作量估计起来有一个非常好的基础。
运行维护:前面说过各个任务在架构图上都有比较好的定位。
J2EE项目的选择与风险外文文献翻译、中英文翻译、外文翻译

浙江工业大学之江学院毕业设计(论文)外文翻译毕业设计(论文)题目:基于J2EE的企业电子投票系统开发与设计外文翻译(一)题目:J2EE体系结构外文翻译(二)题目:J2EE项目的选择与风险分院(系):信息工程分院专业:计算机科学与技术班级: 0402 姓名:徐栋杰学号: 200420100219 指导教师:冯志林毕业设计(论文)外文翻译要求1、毕业设计(论文)外文翻译应有两篇,总字符数不少于20000,其文献来源应由指导教师选定后以纸质(复印或打印件)形式随同毕业设计(论文)任务书一并发给学生。
复印或打印件上应有指导教师和专业教研室主任的签名和日期。
要求每位学生的外文翻译内容不重复。
2、翻译的外文文献应主要选自学术期刊、学术会议的文章、有关著作及其他相关材料,应与毕业论文(设计)主题相关,并列入毕业论文(设计)的参考文献;在每篇中文译文首页“页脚”处注明原文作者及出处,中文译文后应附外文原文(指导教师提供的原文,论文上应有指导教师和教研室主任签名)。
3、中文译文的基本撰写格式为:题目采用三号黑体字居中打印,正文采用宋体小四号字,行间距一般为固定值20磅,标准字符间距。
页边距为左3 cm,右2.5 cm,上下各2.5 cm,页面统一采用A4纸。
4、封面上的“外文翻译题目”指中文译文的题目;两篇外文文献,按“封面、译文一、外文原文(一)、译文二、外文原文(二)、外文翻译评阅表”的顺序统一装订。
赋予一个对该EJB的本地接口的引用,同时无需处理必不可少的JNDI查找。
●业务委托方法。
在这种方法中,业务接口的Web容器实现明确地托付给相应的EJB。
这具有允许高速缓存和允许故障操作在适当地点被重试的优点。
我们无需担心上述任一情况中的java.rmi.RemoteException捕获。
传输错误不会出现。
在这种体系结构中,和通过EJB来暴露一个远程接口的体系结构不同,EJB的使用仅仅是这种体系结构的一个实现选择而已,而不是一个基本特征。
【计算机专业文献翻译】JSP概述

JSP介绍J2EE(Java2企业版)已经承担起了曾经很混乱的建立互联网平台的任务,并使开发者们能够使用Java来高效地创建多层服务器端应用程序。
现今,Java企业版的API已经扩展为涵盖了众多领域:用于远程对象处理的RMI和CORBA,用于数据库交互的JDBC,用于访问命名和目录服务的JNDI,用于创建可重用商务组件的企业级JavaBeans(EJB),用于面向消息的中间件的JMS TM(Java Messaging Service,Java消息服务),用于XML处理的JAXP TM,以及用于执行原子性(atomic)事务的JTA TM(Java Transaction API,Java事务API)。
另外,J2EE还支持servlets是一种非常流行的用于替代CGI脚本的Java小程序。
这些技术的组合使得程序员可以为各种不同的任务创建分布式的商务解决方案。
在1999年末,Sun Microsystems公司向企业级Java工具集中加入了一个新的元素:Java Server Pages(JSP,Java服务器页面)。
JSP建立在Java servlet之上,它的设计目的是使程序员乃至非程序员都能高效地创建Web内容。
什么是JSP?简明扼要地说,JSP是一种用来开发含有动态内容网页的技术。
纯HTML页面只包含静态的内容,它的内容通常保持不变,而JSP页面则不同,它可以根据任意数量的变量来改变自己的内容,这些变量包括用户的身份信息,用户使用的浏览器类型,用户提供的信息,以及用户所做的选择等。
JSP页面就和常规的网页一样,包含标准的标记语言元素,例如HTML的标签。
然而,JSP页面还包含特殊的JSP元素,这些元素使得服务器可以把动态内容插入到网页中。
JSP 元素的用途非常广泛,例如从数据库取得信息,或记录用户的个性信息。
当用户请求一个JSP页面时,服务器先执行JSP元素,并把结果同网页的静态部分相结合,然后把动态合成后的页面送回到浏览器。
Java技术介绍-毕业论文外文翻译

Java Technical DescriptionJava as a Programming Platform.Java is certainly a good programming language. There is no doubt that it is one of the better languages available to serious programmers. We think it could potentially have been a great programming language, but it is probably too late for that. Once a language is out in the field, the ugly reality of compatibility with existing code sets in."Java was never just a language. There are lots of programming languages out there, and few of them make much of a splash. Java is a whole platform, with a huge library, containing lots of reusable code, and an execution environment that provides services such as security, portability across operating systems, and automatic garbage collection.As a programmer, you will want a language with a pleasant syntax and comprehensible semantics (i.e., not C++). Java fits the bill, as do dozens of other fine languages. Some languages give you portability, garbage collection, and the like, but they don't have much of a library, forcing you to roll your own if you want fancy graphics or networking or database access. Well, Java has everything—a good language, a high-quality execution environment, and a vast library. That combination is what makes Java an irresistible proposition to so many programmers.Features of Java.1.SimpleWe wanted to build a system that could be programmed easily without a lot of esoteric training and which leveraged today's standard practice. So even though we found that C++ was unsuitable, we designed Java as closely to C++ as possible in order to make the system more comprehensible. Java omits many rarely used, poorly understood, confusing features of C++ that, in our experience, bring more grief than benefit.The syntax for Java is, indeed, a cleaned-up version of the syntax for C++. There is no need for header files, pointer arithmetic (or even a pointer syntax), structures, unions, operator overloading, virtual base classes, and so on. (See the C++ notes interspersed throughout the text for more on the differences between Java and C++.) The designers did not, however, attempt to fix all of the clumsy features of C++. For example, the syntax of the switch statement is unchanged in Java. If you know C++, you will find the transition to the Java syntax easy.If you are used to a visual programming environment (such as Visual Basic), you will not find Java simple. There is much strange syntax (though it does not take long to get the hang of it). More important, you must do a lot more programming in Java. The beauty of Visual Basic is that its visual design environment almost automatically provides a lot of the infrastructure for an application. The equivalent functionality must be programmed manually, usually with a fair bit of code, in Java. There are, however, third-party development environments that provide "drag-and-drop"-style program development.Another aspect of being simple is being small. One of the goals of Java is to enable the construction of software that can run stand-alone in small machines. The size of the basic interpreter and class support is about 40K bytes; adding the basic standard libraries and thread support (essentially a self-contained microkernel) adds an additional 175K.2. Object OrientedSimply stated, object-oriented design is a technique for programming that focuses on the data (= objects) and on the interfaces to that object. To make an analogy with carpentry, an "object-oriented" carpenter would be mostly concerned with the chair he was building, and secondarily with the tools used to make it; a "non-object-oriented" carpenter would think primarily of his tools. The object-oriented facilities of Java are essentially those of C++.Object orientation has proven its worth in the last 30 years, and it is inconceivable that a modern programming language would not use it. Indeed, the object-oriented features of Java are comparable to those of C++. The major differencebetween Java and C++ lies in multiple inheritance, which Java has replaced with the simpler concept of interfaces, and in the Java metaclass model. The reflection mechanism and object serialization feature make it much easier to implement persistent objects and GUI builders that can integrate off-the-shelf components.3. DistributedJava has an extensive library of routines for coping with TCP/IP protocols like HTTP and FTP. Java applications can open and access objects across the Net via URLs with the same ease as when accessing a local file system. We have found the networking capabilities of Java to be both strong and easy to use. Anyone who has tried to do Internet programming using another language will revel in how simple Java makes onerous tasks like opening a socket connection. (We cover networking in Volume 2 of this book.) The remote method invocation mechanism enables communication between distributedobjects (also covered in Volume 2).There is now a separate architecture, the Java 2 Enterprise Edition (J2EE), that supports very large scale distributed applications.4. RobustJava is intended for writing programs that must be reliable in a variety of ways. Java puts a lot of emphasis on early checking for possible problems, later dynamic (run-time) checking, and eliminating situations that are error-prone.… The single biggest difference between Java and C/C++ is that Java has a pointer model that eliminates the possibility of overwriting memory and corrupting data.This feature is also very useful. The Java compiler detects many problems that, in other languages, would show up only at run time. As for the second point, anyone who has spent hours chasing memory corruption caused by a pointer bug will be very happy with this feature of Java.If you are coming from a language like Visual Basic that doesn't explicitly use pointers, you are probably wondering why this is so important. C programmers are not so lucky. They need pointers to access strings, arrays, objects, and even files. In Visual Basic, you do not use pointers for any of these entities, nor do you need to worry about memory allocation for them. On the other hand, many data structures aredifficult to implement in a pointerless language. Java gives you the best of both worlds. You do not need pointers for everyday constructs like strings and arrays. You have the power of pointers if you need it, for example, for linked lists. And you always have complete safety, because you can never access a bad pointer, make memory allocation errors, or have to protect against memory leaking away.5. SecureJava is intended to be used in networked/distributed environments. Toward that end, a lot of emphasis has been placed on security. Java enables the construction of virus-free, tamper-free systems.In the first edition of Core Java we said: "Well, one should 'never say never again,'" and we turned out to be right. Not long after the first version of the Java Development Kit was shipped, a group of security experts at Princeton University found subtle bugs in the security features of Java 1.0. Sun Microsystems has encouraged research into Java security, making publicly available the specification and implementation of the virtual machine and the security libraries. They have fixed all known security bugs quickly. In any case, Java makes it extremely difficult to outwit its security mechanisms. The bugs found so far have been very technical and few in number. From the beginning, Java was designed to make certain kinds of attacks impossible, among them:∙Overrunning the runtime stack—a common attack of worms and viruses Corrupting memory outside its own process space Reading or writing files without permission.∙A number of security features have been added to Java over time. Since version1.1, Java has the notion of digitally signed classesWith a signed class, you can be sure who wrote it. Any time you trust the author of the class, the class can be allowed more privileges on your machine.6. Architecture NeutralThe compiler generates an architecture-neutral object file format—the compiled code is executable on many processors, given the presence of the Java runtime system.The Java compiler does this by generating bytecode instructions which have nothing to do with a particular computerarchitecture. Rather, they are designed to be both easy to interpret on any machine and easily translated into native machine code on the fly.This is not a new idea. More than 20 years ago, both Niklaus Wirth's original implementation of Pascal and the UCSD Pascal system used the same technique. Of course, interpreting bytecodes is necessarily slower than running machine instructions at full speed, so it isn't clear that this is even a good idea. However, virtual machines have the option of translating the most frequently executed bytecode sequences into machine code, a process called just-in-time compilation. This strategy has proven so effective that even Microsoft's .NET platform relies on a virtual machine.The virtual machine has other advantages. It increases security because the virtual machine can check the behavior of instruction sequences. Some programs even produce bytecodes on the fly, dynamically enhancing the capabilities of a running program.7. PortableUnlike C and C++, there are no "implementation-dependent" aspects of the specification. The sizes of the primitive data types are specified, as is the behavior of arithmetic on them.For example, an int in Java is always a 32-bit integer. In C/C++, int can mean a 16-bit integer, a 32-bit integer, or any other size that the compiler vendor likes. The only restriction is that the int type must have at least as many bytes as a short int and cannot have more bytes than a long int. Having a fixed size for number types eliminates a major porting headache. Binary data is stored and transmitted in a fixed format, eliminating confusion about byte ordering. Strings are saved in a standard Unicode format.The libraries that are a part of the system define portable interfaces. For example, there is an abstract Window class and implementations of it for UNIX, Windows, and the Macintosh.As anyone who has ever tried knows, it is an effort of heroic proportions to write a program that looks good on Windows, the Macintosh, and 10 flavors of UNIX. Java1.0 made the heroic effort, delivering a simple toolkit that mapped common user interface elements to a number of platforms.Unfortunately, the result was a library that, with a lot of work, could give barely acceptable results on different systems. (And there were often different bugs on the different platform graphics implementations.) But it was a start. There are many applications in which portability is more important than user interface slickness, and these applications did benefit from early versions of Java. By now, the user interface toolkit has been completely rewritten so that it no longer relies on the host user interface. The result is far more consistent and, we think, more attractive than in earlier versions of Java.8. InterpretedThe Java interpreter can execute Java bytecodes directly on any machine to which the interpreter has been ported. Since linking is a more incremental and lightweight process, the development process can be much more rapid and exploratory.Incremental linking has advantages, but its benefit for the development process is clearly overstated. In any case, we have found Java development tools to be quite slow. If you are used to the speed of the classic Microsoft Visual C++ environment, you will likely be disappointed with the performance of Java development environments. (The current version of Visual Studio isn't as zippy as the classic environments, however. No matter what languageyou program in, you should definitely ask your boss for a faster computer to run the latest development environments. )9. High PerformanceWhile the performance of interpreted bytecodes is usually more than adequate, there are situations where higher performance is required. The bytecodes can be translated on the fly (at run time) into machine code for the particular CPU the application is running on.If you use an interpreter to execute the bytecodes, "high performance" is not the term that we would use. However, on many platforms, there is also another form ofcompilation, the just-in-time (JIT) compilers. These work by compiling the bytecodes into native code once, caching the results, and then calling them again if needed. This approach speeds up commonly used code tremendously because one has to do the interpretation only once. Although still slightly slower than a true native code compiler, a just-in-time compiler can give you a 10- or even 20-fold speedup for some programs and will almost always be significantly faster than an interpreter. This technology is being improved continuously and may eventually yield results that cannot be matched by traditional compilation systems. For example, a just-in-time compiler can monitor which code is executed frequently and optimize just that code for speed.10. MultithreadedThe enefits of multithreading are better interactive responsiveness and real-time behavior.if you have ever tried to do multithreading in another language, you will be pleasantly surprised at how easy it is in Java. Threads in Java also can take advantage of multiprocessor systems if the base operating system does so. On the downside, thread implementations on the major platforms differ widely, and Java makes no effort to be platform independent in this regard. Only the code for calling multithreading remains the same across machines; Java offloads the implementation of multithreading to the underlying operating system or a thread library. Nonetheless, the ease of multithreading is one of the main reasons why Java is such an appealing language for server-side development.11. DynamicIn a number of ways, Java is a more dynamic language than C or C++. It was designed to adapt to an evolving environment. Libraries can freely add new methods and instance variables without any effect on their clients. In Java, finding out run time type information is straightforward.This is an important feature in those situations in which code needs to be added to a running program. A prime example is code that is downloaded from the Internet to run in a browser. In Java 1.0, finding out runtime type information was anything but straightforward, but current versions of Java give the programmer full insight intoboth the structure and behavior of its objects. This is extremely useful for systems that need to analyze objects at run time, such as Java GUI builders, smart debuggers, pluggable components, and object databases.Java技术介绍Java是一种程序设计平台Java是一种优秀的程序设计语言。
Java、J2ee的Spring框架和大数据技术外文文献翻译

文献信息文献标题:Implementing and Analyzing Big Data Techniques with Spring Frame Work in Java & J2EE Based Application(基于Java/J2EE的Spring 框架实现和分析大数据技术)文献作者及出处:Saxena A, Kaushik N, Kaushik N. Implementing and Analyzing Big Data Techniques with Spring Frame Work in Java & J2EE Based Application[C]//Proceedings of the Second International Conference on Information and Communication Technology for Competitive Strategies. ACM, 2016:5.字数统计:英文2814单词,15570字符;中文4912汉字外文文献Implementing and Analyzing Big Data Techniques withSpring Frame Work in Java & J2EE Based ApplicationAbstract –In the time of big data techniques with spring framework on java, web servers or application server as the significant channel in big data should be updated to meet execution and force imperatives. Significant endeavors have been put resources into web server or application server conveyance and web storing procedures, but very few efforts have been paid to improve hardware-favored web type services. Big Data with spring framework in java is a promising business and computing model in web framework. Spring is the most popular open source Java application Framework. It combines all the industry-standard frameworks (for e.g. Struts and Hibernate) and approaches into one bundle. The expense and working costs of data centers have skyrocketed with the increase in computing capacity. Big data is a concept that defines the large volume of both structured and unstructured data – that inundates a business on a day-to-day environment. This research argues the need to provide novel method and tools to bolster programming engineers meaning toenhance vitality productivity and minimize the subsequent from outlining, creating, sending and running programming in Big Data with spring framework.Keywords –Java, J2ee, Hadoop Framework, spring, Big Data.I.INTRODUCTIONBig Data with spring framework based applications and innovation components are composed in java& J2ee. Java has inherent limitations that can keep endeavors from advancing execution and using vast in memory data sets. Organizations endeavor to work around these dormancy, versatility and memory size issues by utilizing separate caching frameworks or analyzing a subset of accessible data. Then again, this influences the quality and convenience of business choices and even lessens revenue.Objective of big data:•By giving a semantic end-to-end connection between clients and data sources.•Enabling clients to quickly define instinctive queries utilizing natural vocabularies and conceptualizations.•Seamlessly coordinating information spread over various distributed data sources, including streaming sources.•Exploiting gigantic parallelism for adaptability a long ways past traditional RDBMSs and along these lines lessening the turnaround time for information requests to minutes as opposed.Objectives for Spring Framework:•The potential favorable circumstances of utilizing Spring's dependency injection.•Dependency injection in XML, utilizing constructor.•Default scope for Spring beans.•How to declare an initialization method in a Spring bean.Java:Java is one of the most robust, mainly used and perfect programming languagefor creating enterprise applications. Over the years, Java development has evolved from applets run on a web browser (chrome, mozila) to large enterprise distributed applications run on multiple servers. Presently, Java has three different flavors, and each addresses certain programming requirements.Spring framework is the most well known application advancement structure for big business Java. A great many designers around the globe use Spring Framework to make high performing, effortlessly testable, reusable code.J2ee:J2ee utilizes a multi-level circulated application model. There are three levels in the commonplace J2EE application model: presentation tier, business logic tier and data tier.Framework:The framework is intended to streamline the full improvement cycle, from building, to sending, to looking after applications. it can be considered as an arrangement of capacities helping the designers in making the applications.II.Spring FrameworkSpring is a lightweight framework. It can be considered as a structure of systems in light of the fact that it gives backing to different structures, for example, Struts, Hibernate, Tapestry, EJB, JSF and so forth. The system, in more extensive sense, can be characterized as a structure where we discover arrangement of the different specialized issues.Features of SpringFramework:•Lightweight -Spring is lightweight as far as size and overhead. The whole spring system can be conveyed in a Jar file that weighs in at a little more than 1 MB.•Aspect-Oriented - Spring supports the features of aspect oriented programming approach that enables cohesive development.•Container -Spring is a compartment in light of the fact that it deals with the life cycle and configuration of application objects.•Framework -Spring accompanies MVC web application framework, based on core Spring functionality. This structure is profoundly configurable by means of methodology interfaces, and obliges various perspective innovations like JSP, Speed, Tiles.Aspect oriented programming:To permit clients to actualize custom perspectives, supplementing their utilization of OOP with AOP. Aspect oriented programming is regularly characterized as a programming strategy that advances partition of worries inside of a software framework. Frameworks are made out of a few parts, each in charge of a particular bit of usefulness.AOP gives you perspectives. Aspects empower modularization of concerns, for example, transaction management that cut across multiple types and objects.AOP is utilized as a part of theSpring Framework:•To give definitivedeclarative enterprise services, particularly as a substitution for EJB explanatory services. The most critical such service is explanatory transaction management.•To permit clients to actualize custom aspects, complementing their utilization of OOP with AOP.Inversion of Control:The IoC (Inversion of Control) pattern utilizes three diverse methodologies as a part of request to accomplish decoupling of control of services from your components:•Interface Injection : Your components expressly fit in with an arrangement of interfaces, with related setup metadata, keeping in mind the end goal to permit the system to oversee them accurately.•Setter Injection : External metadata is utilized to arrange how your segments can be cooperated with.•Constructor Injection: Your components are enrolled with the framework, including the parameters to be utilized when thecomponents are developed, and the structure gives instances of the component with the majority of the predeterminedfacilities applied.Dependency Injection:Dependency Injection (DI) is a design pattern that expels the dependency from the programming code with the goal that it can be anything but difficult to oversee and test the application. Dependency Injection makes our programming code inexactly coupled.III.Big DataBig Data is more and various types of data than is effectively taken care of traditional relational database management systems (RDBMSs). Another helpful point of view is to describe big data as having high volume, high speed, and high assortment.•High volume: the sum or amount of data.•High speed: the rate at which data is created.•High assortment: the distinctive sorts of data.Big Data is a technique that is utilized to portray data that is high volume and speed,requires new technologies and systems to catch, store, and analyze it; and is utilized to upgrade decision making, give understanding and disclosure, and bolster and advance technique. Normally, to analyze data, individuals used to make diverse data sets in view of one or more regular fields so examination turns out to be simple. Big data has numerous sources. For instance, each mouse event on a site can be caught in Web log files and examined keeping in mind the end goal to better comprehend customers' purchasing practices and to impact their shopping by powerfully suggesting products. Social media sources, for example, Facebook and Twitter create enormous measures of remarks and tweets. This data can be caught and broke down to comprehend, for instance, what individuals consider new item presentations. Machines, for example, savvy meters, produce data. These meters persistently stream information about power, water, or gas utilization that can be imparted to clients and consolidated with estimating arrangements to rouse clients to move some of their vitality utilization.Figure 1. Information flow of Big DataThis Figure 1shows different phases of Big Data Uses of Big Data.1.Fraud detection:In many cases, fraud is discovered long after the fact, and soon thereafter the harm has been done and all that is left is to minimize the harm and modify arrangements to keep it from happening once more. Big Data stages that can examine cases and exchanges continuously, recognizing huge scale designs crosswise over numerous exchanges or identifying abnormal conduct from an individual client, can change the fraud detection game.2.IT log analytics:IT arrangements and IT divisions create a colossal amount of logs and follow information. Without a Big Data arrangement, quite a bit of this information must go unexamined.3.Call center analyticsBig Data arrangements can distinguish repeating issues or client and staff conduct designs on the fly not just by comprehending time/quality determination measurements, additionally by catching and preparing call content itself.4.Social media analysisEveryone and their moms are on online networking nowadays, whether they're"preferring" organization pages on Facebook or tweeting protestations about items on Twitter. A Big Data arrangement fabricated to reap and analyze online networking movement, similar to IBM's Cognos Consumer Insights, a point arrangement running on IBM's BigInsights Big Data stage, can comprehend the jabber. Social mediacan give continuous experiences into how the business sector is reacting to items and battles. With those bits of knowledge, organizations can change their valuing, advancement, and battle arrangement on the fly for ideal results.Figure 2. Application area of Big DataCase of Big Data in Real world:•Consumer item organizations and retail associations are checking online networking like Facebook and Twitter to get an uncommon perspective into client conduct, inclinations, and item observation.•Manufacturers are observing moment vibration information from their hardware, which changes somewhat as it wears out, to foresee the ideal time to supplant or keep up.•Manufacturers are likewise observing informal organizations, however with an alternate objective than advertisers: They are utilizing it to identify reseller's exchangebolster issues before a guarantee disappointment turns out to be openly adverse.•The government is making information open at both the national, state, and city level for clients to grow new applications that can produce open great.•Financial Services associations are utilizing information mined from client connections to cut up their clients into finely tuned fragments.•Advertising and showcasing offices are following online networking to comprehend responsiveness to campaigns, advancements, and other promoting mediums.•Insurance organizations are utilizing Big Data investigation to see which home protection applications can be instantly prepared, and which ones need an approving in-individual visit from an operators.•By grasping social media, retail associations are drawing in brand promoters, changing the impression of brand rivals, and not with standing empowering eager clients to offer their items.•Hospitals are investigating medicinal information and patient records to predict those patients that are prone to look for readmission inside of a couple of months of release. The doctor's facility can then mediate with expectations of anticipating another expensive doctor's facility sit tight.•Web-based organizations are creating data items that consolidate information assembled from clients to offer additionally engaging proposals and more fruitful coupon programs.•Sports groups are utilizing information for following ticket deals and even for tracking team strategies.Figure 3. Architecture of Big DataThis figure 3 first extracts the social, archive, service data some part of operational data then transforms with new techniques then load in to server and finally Big Data analytic with latest technique.Figure 4. stages of Big DataThis figure 4 divides the data in to three stages.1.Data Acquisition form:this stage of data cover with streams, internet data, cloud data source, mobile data source, desktop data source and server data source.2.Data refining and processing form:this stage covers refining and processing the data of corporate Hub. Corporate data hub is combination of refining workloads and local workloads.3.Data Shipping form:this stage of architecture extract the data from different sources.IV.HADOOP ARCHITECTURESpring for Apache Hadoop streamlines providing so as to create Apache Hadoopa brought together design model and simple to utilize APIs for utilizing HDFS, MapReduce, Pig, and Hive. It likewise furnishes coordination with other Spring eco –system venture, for example, Spring Incorporation and Spring Cluster empowering you to create answers for enormous information ingest/fare and Hadoop work process organization.Apache Hadoop is a software patternfor preparing a lot of information over conceivably greatly parallel groups of servers. The key segment of Hadoop is the Hadoop Distributed File System,which deals with the data shared over the different servers. It is a direct result of HDFS that such a variety of servers can be overseen in parallel. HDFS is file based and does not require any data model to save and process data. It can store data of any structure, however is not a RDBMS. HDFS can deal with the capacity and access of an Web logs, XML documents type of data and the length of the data can be placed in a file and replicated into HDFS. The Hadoop base regularly runs MapReduce programs in parallel. MapReduce takes substantial datasets, extricates and changes valuable data, conveys the data to the different servers where handling happens, and amasses the outcomes into a smaller,easier-to-examine file. It doesn't perform analytics fundamentally; rather, it gives the system that controls the projects that perform the analytics. As of now, jobs can be run just a in batch, which restrains the utilization of Hadoop/MapReduce for real-time applications. In spite of the fact that Hadoop and MapReduce are talked about and regularly utilized together, they can be utilized independently. That is, Hadoop can be utilized without MapReduce and the other way around.Figure 5 outlines how process is carried out by using Hadoop/MapReduce. This is a basic process that should likewise be possible with SQL based query and a RDBMS, yet gives a decent sample of Hadoop/MapReduce handling. At the left is an information document with records containing Deer, Bear , River, and Car. The goal is to tally the quantity of times every word happens. The initial step is to part the records and then prepared by the clusters of servers, for example, Java and R language on the servers. The target in this case is to assemble the data by a split depending on the words. The MapReduce pattern then consolidations the mix/sort results for information to the reducer program, which thencalculates the number of times every word happens. This yield can then be input to an data warehouse where it might be consolidated with other information for analysis or accessed straight for wardly by different BI instruments .Figure 5. Hadoop ArchitectureV.RESULT AND DISCUSSIONBig data processing with spring framework results in distributed data store: spring framework enables resource and data aggregation on java. Java helps in improvement in execution efficiency by distributing application execution at different levels. Due to reducing costs of devices and networks data from real world is getting collected in data centres. A system that implements big data processing on spring framework is a combination of components like servers for judgment, accumulation and analysis to solve real life problems like traffic management and human resource management. Distributed parallel processing is required to perform statistical analysis of different vehicles at different or same place in one city or a comparison of different cities. In comparing with other distributed batch methods the performance increaseei ght times. Let us use this prototype to match any individual’s location and preference with product inventory of stores and malls and to generate the bills and deliver the product at the doorstep of customer in shortest possible time. The process shown in the figure can be explained in steps:Step 1: Individual’s location and preference is retrieved (Query 1)Step 2: Stores and malls details within a certain distance is retrieved (Query 2) Step 3: Individual’s information and store’s product information is matched (Query 3)Step 4: A bill is generated if they match.The processing load in step 2 and 3 is directly proportional to number of people. Dynamic load balancing by increasing dedicated servers reduces CPU usage and ensures high speed processing. Hence ensuring optimization of improvement in performance, resource efficiency and delivery synchronization.Figure 6. Architecture of big data with Spring FrameworkIn this figure 6 query 1, query 2, query 3 is based on spring framework of java that means all the query based code is stored in the given XML File, individual information is stored in oracle database. Finally coupon issued in the base of big data based query of spring framework of java and J2ee under the supervision Hadoop Architecture of Big Data follow in figure 7 shown below.Figure 7. Spring Framework with big dataVI. CONCLUSION AND FUTURE SCOPEIn this research article, we described the ongoing research to design and implement a big data with spring Framework.This model administers big data to ceaselessly trade asset cuts among machines, granting assets to those occupants requiring or qualified for additional, while having the capacity to figure out where the asset diminishment will be all the more financially compelling, i.e., will contribute in lesser degree to execution debasement.In future we have to implement big data with struts, spring and hibernate integration to reduce cost on infrastructure in java & J2ee base applications.中文译文基于Java/J2EE的Spring框架实现和分析大数据技术摘要—在JAVA Spring框架下的大数据技术时代,作为大数据中重要通道的Web服务器或应用服务器应该进行更新,以满足执行和强制要求。
J2EE简介-毕业论文外文文献翻译

英文原文:J2EE synopsis:J2EE is a set is completely different in the traditional application development technical frame, contains many modules, mainly may simplify, and the standard application system's development and the deployment, then enhance the probability, the security and use the value again.The J2EE core is a group of technology standard and the guide, contains each kind of module, the service construction and the technical level, has the common standard and the specification, lets each kind rely on the J2EE construction between the different platform, has the good compatibility, between information product each other who the solution behind the enterprise used in the past is unable compatibly, the enterprise interior or exterior exchanged with difficulty predicament.At present, the Java 2 platforms have 3 editions, they are suitable for the bantam and smart card Java 2 platform Micro version (Java 2 Platform Micro Edition, J2ME), are suitable for the tabletop system's Java 2 platform standard edition (Java 2 Platform Standard Edition, J2SE), are suitable for the foundation server application procedure and the service Java 2 platform enterprise version (Java 2 Platform Enterprise Edition, J2EE).J2EE is one kind simplifies the enterprise solution using the Java 2 platforms the development, the deployment and the management related complex question architecture. The J2EE technology's foundation was the core Java platform or the Java 2 platform standard edition, J2EE has not only consolidated in standard edition many merits, for example " compiled one time, everywhere moved " the characteristic, convenience deposit database JDBC API, the CORBA technology as well as can in the Internet application protect data safe mode and so on, meanwhile has provided to EJB (Enterprise JavaBeans), Java Servlets API, JSP (Java Server Pages) as well as the XML technology comprehensive support. Its final goal is becomes one to be able to cause the enterprise exploiters to reduce largely puts in the market hour the architecture.The J2EE architecture provides the intermediate level integration frame to usefor not to need too many expenses satisfiedly and to need the high usability, the redundant reliability as well as the extendibility application demand. Through provided the unification the development platform, J2EE reduced the development multi-layer application expense and the complexity, simultaneously provided to the existing application procedure integrates the powerful support, supported Enterprise JavaBeans completely, had the good guide to support packs and deploys the application, the increase table of contents support, strengthened the safety mechanism, enhanced the performance.The J2EE to building have scalability, flexibility, easy maintenance business system provides a good mechanism:1. Retain existing IT assets: because enterprise must adapt to the new commercial demand, by means of the existing enterprise information system in investment, rather than re-enacted overall scheme is very important. So, a gradual (not radical, completely negative) way above the existing system established the server platform mechanism is not fair that the company needs. Can make full use of the user J2EE, as some of the original investment companies use the Tuxedo, IBM CICS BEA, IBM VisiBroker Inprise Encina,, and Netscape apply Server. This is possible because the J2EE extensive industry supported and some important 'enterprise computing' field supplier to participate. Each supplier to existing customer provides no abandoned existing investment into portable J2EE field upgrade path. Based on the J2EE platform because the product can almost in any operating system and hardware configurations to run on existing operating system and hardware can also be retained use.2. Efficient development: the J2EE allows companies to some generic, very tedious tasks to a server to complete the middleware vendors. So that developers can focus on how to create business logic, correspondingly shorten the development time. Senior middleware vendors provide the following these complex middleware services:。
软件工程专业基于Hibernate和Struts的J2EE应用开发策略大学毕业论文外文文献翻译及原文

毕业设计(论文)外文文献翻译文献、资料中文题目:基于Hibernate和Struts的J2EE应用开发策略文献、资料英文题目:文献、资料来源:文献、资料发表(出版)日期:院(部):专业:班级:姓名:学号:指导教师:翻译日期: 2017.02.14咋一篇文章连个题目也没有啊???This text analysis the mechanism of Hibernate and Struts, put forward 1 kind EE according to the J2 of the Hibernate and the Struts application development strategy.In this kind of strategy, the model layer use a Hibernate realization and see diagram and controller to then use a Struts frame a realization.So can consumedly lower the development efficiency that the Ou of code match sex and exaltation system. The key word Hibernate, Struts, the MVC, hold out for long time a layer one preface along with the Java technique of gradual mature and perfect, Be establishment business enterprise class application of standard terrace, the J2 EE terrace got substantial of development.Several technique asked for help from to include in the J2 EE norm:Enterprise JavaBean(EJB), Java Servlets(Servlet), Java Server Pages(JSP), Java Message Service(JMS)...etc., development many application system.But, also appeared some problem in the tradition J2 the EE the application of the development the process:1)the antinomy of of data model and logic model.Currently the database of usage basically and all is relation type database, but the Java be essentially a kind of the language which face to object, object at saving with read usage SQL and JDBC carry on a database operation and lowered plait distance of efficiency and system of can maintenance;2)tradition of J2 EE application much the adoption is according to the EJB heavy weight frame, this kind of frame suitable for develop a large business enterprise application, but usage the EJB container carry on development and adjust to try to need to be waste a great deal of time.For lowering the Ou of code to match sex, exaltation system of development efficiency, this text put forward 1 kind EE according to the J2 of the Struts frame and the Hibernate frame application development strategy. 2 datas' holding out for long time layer and Hibernate is one piece according to hold out for long time layer frame, is a kind of realization object and relationof the tool which reflect to shoot(O/R Mapping), it carried on the object of the lightweight to pack to the JDBC and make procedure member can usage object plait distance thought to operation database.It not only provided to shoot from Java to reflect of data form, but also provided a data a search and instauration mechanism.Opposite in usage JDBC and SQL to operation database, use a Hibernate ability consumedly of exaltation realization of efficiency.The Hibernate frame use allocation document of the form come to the reflect of the definition Java object and data form to shoot relation, in the meantime at more deep of level of data form of relation explanation for the relations such as inherit of and containment etc. of Java object.Pass the usage HQL language sentence complications of relation the calculate way use the way of object description, to a large extent simplification logarithms according to of search, speed development of efficiency.Have in the Hibernate a simple but keep the API of view, used for to the database mean of object performance search.Want to establish or the modification be these objects, need in the procedure carry on with them to hand over with each other, then tell Hibernate to keep.So, a great deal of pack hold out for long time turn operation of business logic no longer demand write a trivial JDBC language sentence, make data last long thus the layer got biggest of simplification.3 use the Struts realization MVC structure MVC(Model-View-Controller) is put forward by the Trygve Reenskaug, first drive application in the environment SmallTalk-80, is many to hand over with each other with interface system of constitute foundation.According to the need of variable of the interface design, MVC hand over with each other constitute of system to resolve into model and see diagram, controller three part. Model(Model) is software processing problem logic at independence in outside manifestation undercontents and form circumstance of inside abstract, packed the core data, logic of problem and function of calculation relation, independence in concrete of interface expression and I/O operation.See diagram(View) mean information and particular form demonstration of model data and logic relation and appearance to the customer.It acquire a manifestation information from the model, there can be many for homology of information dissimilarity of manifestation form or see diagram.Thecontroller(Controller) is a processing the customer hand over with software with each other operation of, its job is control provide model in any variety of dissemination, insure a customer interface among the model of rightness should contact;It accept a customer of importation, give° the importation feedback model, then realization compute model control, is make model and see diagram to moderate work of ually 1 see a diagram rightness should a controller.Model, see separate of diagram and controller, make a model be able to have many manifestation to see diagram.If the customer pass a certain see the controller of diagram change the data of model, all other dependence in these see of data diagram all should reflection arrive these variety.When therefore and regardless occurrence what data variety, controller all would variety notice allly see diagram, cause manifestation of renewal.This is actually a kind of variety of model-dissemination mechanism.The Struts frame is to be the item of Apache Jakarta to constitute part to publish luck to do at the earliest stage, it inheritted MVC of each item characteristic, and did according to the characteristics of J2 EE correspond of variety with expand.The Struts frame was good to combine Jsp, Java Servlet, Java Bean, Taglib etc. technique.In the Struts, what to undertake the controller role in the MVC be an ActionServlet.The ActionServlet is an in general use control module.This control module provided a processing all HTTPclaim which send out Struts of entrance point.Its interception with distribute these claim to arrive correspond of action type.(these action all of type is Action son type)Moreover the control module is also responsible for using to correspond of claim the parameter fill Action Form(FromBean), and pass action type(ActionBean).Action type the business logic of the interview core, then interview Java Bean or adjust to use EJB.End action type control the power pass follow-up of JSP document, from JSP document born see diagram.All these control logic make use of Struts-config.xml the document come to allocation.See diagram in the Struts frame main from JSP born page completion, the Struts provide abundant of JSP label database, this is advantageous to separating performance logic and procedure logic.The model is with 1 or the form existence of several Java Bean.In the Struts, main existence three kinds of Bean, respectively BE:Action, ActionForm, EJB perhaps Java Bean. The Struts frame have no concrete definition model layer of realization, in actually the development, model layer usually is close with business logic connect with each other, and want to carry on operation to the first floor data.The underneath's introduction is a kind of development strategy, lead the Hibernate into the model layer of Struts frame, usage it to carry on a data to pack with reflect to shoot, provide hold out for long time turn of support. 4 usage Hibernate and the Struts development J2 EE application 4.1 system structure diagram 3 manifestation according to Hibernate and Struts development strategy of system structure diagram.4.2 Development practice underneath combine a development practice, with in the J2 the EE the application very widespread customer register process for example, elucidation above-mentioned system structure is how concrete usage.The process of register is very clear:Customer from register page login.jsp importation register information, system to register theinformation carry on verification, if exactitude success register, otherwise hint correspond mistake information. In the development process, the usage Eclipse be used as development environment and added to carry to provide to the Struts and the Hibernate in the meantime better control and support of three square plug-in MyEclipse, Web server usage Tomcat, the database chose to use Mysql. Carry on an allocation to the Hibernate first, need to the system auto the born hibernate.cfg.xml carry on modification, allocation good database conjunction of various parameter and definition the data reflect to shoot a document.Because the Hibernate take of conjunction pond main used for test, the function isn't very good, can pass JNDI will it modification is usage Tomcat of conjunction pond.本文分析了Hibernate和Struts的机制,提出了一种基于Hibernate和Struts的J2EE 应用开发策略。
计算机相关专业毕业设计外文翻译--移动设备的应用平台—J2ME简介

附件1:外文资料翻译译文移动设备的应用平台—J2ME简介1.什么是J2ME:J2ME(Java 2 Micro Edition)是Java 2的一个组成部分,它与J2SE、J2EE并称。
根据Sun的定义:J2ME是一种高度优化的Java运行环境,主要针对消费类电子设备的,例如蜂窝电话和可视电话、数字机顶盒、汽车导航系统等等。
J2ME 技术在1999年的JavaOne Developer Conference大会上正式推出,它将Java语言的与平台无关的特性移植到小型电子设备上,允许移动无线设备之间共享应用程序。
J2ME在设计其规格的时候,遵循着对于各种不同的装置而造出一个单一的开发系统是没有意义的事」这个基本原则。
于是J2ME 先将所有的嵌入式装置大体上区分为两种:一种是运算功能有限、电力供应也有限的嵌入式装置(比方说PDA 、手机);另外一种则是运算能力相对较佳、并请在电力供应上相对比较充足的嵌入式装置(比方说冷气机、电冰箱、电视机上盒(set-top box))。
因为这两种型态的嵌入式装置,所以Java 引入了一个叫做Configuration 的概念,然后把上述运算功能有限、电力有限的嵌入式装置定义Connected Limited Device Configuration(CLDC)规格之中;而另外一种装置则规范为Connected Device Configuration(CDC)规格。
也就是说,J2ME 先把所有的嵌入式装置利Configuration 的概念区隔成两种抽象的型态。
其实在这里大家可以把Configuration 当作是J2ME 对于两种类型嵌入式装置的规格,而这些规格之中定义了这些装置至少要符合的运算能力、供电能力、记忆体大小等规范,同时也定了一组在这些装置上执行的Java 程序所能使用的类别函式库、这些规范之中所定义的类别函式库为Java 标准核心类别函式库的子集合以及与该型态装置特性相符的扩充类别函式库。
毕业设计论文外文文献翻译

xxxx大学xxx学院毕业设计(论文)外文文献翻译系部xxxx专业xxxx学生姓名xxxx 学号xxxx指导教师xxxx 职称xxxx2013年3 月Introducing the Spring FrameworkThe Spring Framework: a popular open source application framework that addresses many of the issues outlined in this book. This chapter will introduce the basic ideas of Spring and dis-cuss the central “bean factory” lightweight Inversion-of-Control (IoC) container in detail.Spring makes it particularly easy to implement lightweight, yet extensible, J2EE archi-tectures. It provides an out-of-the-box implementation of the fundamental architectural building blocks we recommend. Spring provides a consistent way of structuring your applications, and provides numerous middle tier features that can make J2EE development significantly easier and more flexible than in traditional approaches.The basic motivations for Spring are:To address areas not well served by other frameworks. There are numerous good solutions to specific areas of J2EE infrastructure: web frameworks, persistence solutions, remoting tools, and so on. However, integrating these tools into a comprehensive architecture can involve significant effort, and can become a burden. Spring aims to provide an end-to-end solution, integrating spe-cialized frameworks into a coherent overall infrastructure. Spring also addresses some areas that other frameworks don’t. For example, few frameworks address generic transaction management, data access object implementation, and gluing all those things together into an application, while still allowing for best-of-breed choice in each area. Hence we term Spring an application framework, rather than a web framework, IoC or AOP framework, or even middle tier framework.To allow for easy adoption. A framework should be cleanly layered, allowing the use of indi-vidual features without imposing a whole worldview on the application. Many Spring features, such as the JDBC abstraction layer or Hibernate integration, can be used in a library style or as part of the Spring end-to-end solution.To deliver ease of use. As we’ve noted, J2EE out of the box is relatively hard to use to solve many common problems. A good infrastructure framework should make simple tasks simple to achieve, without forcing tradeoffs for future complex requirements (like distributed transactions) on the application developer. It should allow developers to leverage J2EE services such as JTA where appropriate, but to avoid dependence on them in cases when they are unnecessarily complex.To make it easier to apply best practices. Spring aims to reduce the cost of adhering to best practices such as programming to interfaces, rather than classes, almost to zero. However, it leaves the choice of architectural style to the developer.Non-invasiveness. Application objects should have minimal dependence on the framework. If leveraging a specific Spring feature, an object should depend only on that particular feature, whether by implementing a callback interface or using the framework as a class library. IoC and AOP are the key enabling technologies for avoiding framework dependence.Consistent configuration. A good infrastructure framework should keep application configuration flexible and consistent, avoiding the need for custom singletons and factories. A single style should be applicable to all configuration needs, from the middle tier to web controllers.Ease of testing. Testing either whole applications or individual application classes in unit tests should be as easy as possible. Replacing resources or application objects with mock objects should be straightforward.To allow for extensibility. Because Spring is itself based on interfaces, rather than classes, it is easy to extend or customize it. Many Spring components use strategy interfaces, allowing easy customization.A Layered Application FrameworkChapter 6 introduced the Spring Framework as a lightweight container, competing with IoC containers such as PicoContainer. While the Spring lightweight container for JavaBeans is a core concept, this is just the foundation for a solution for all middleware layers.Basic Building Blockspring is a full-featured application framework that can be leveraged at many levels. It consists of multi-ple sub-frameworks that are fairly independent but still integrate closely into a one-stop shop, if desired. The key areas are:Bean factory. The Spring lightweight IoC container, capable of configuring and wiring up Java-Beans and most plain Java objects, removing the need for custom singletons and ad hoc configura-tion. Various out-of-the-box implementations include an XML-based bean factory. The lightweight IoC container and its Dependency Injection capabilities will be the main focus of this chapter.Application context. A Spring application context extends the bean factory concept by adding support for message sources and resource loading, and providing hooks into existing environ-ments. Various out-of-the-box implementations include standalone application contexts and an XML-based web application context.AOP framework. The Spring AOP framework provides AOP support for method interception on any class managed by a Spring lightweight container.It supports easy proxying of beans in a bean factory, seamlessly weaving in interceptors and other advice at runtime. Chapter 8 dis-cusses the Spring AOP framework in detail. The main use of the Spring AOP framework is to provide declarative enterprise services for POJOs.Auto-proxying. Spring provides a higher level of abstraction over the AOP framework and low-level services, which offers similar ease-of-use to .NET within a J2EE context. In particular, the provision of declarative enterprise services can be driven by source-level metadata.Transaction management. Spring provides a generic transaction management infrastructure, with pluggable transaction strategies (such as JTA and JDBC) and various means for demarcat-ing transactions in applications. Chapter 9 discusses its rationale and the power and flexibility that it offers.DAO abstraction. Spring defines a set of generic data access exceptions that can be used for cre-ating generic DAO interfaces that throw meaningful exceptions independent of the underlying persistence mechanism. Chapter 10 illustrates the Spring support for DAOs in more detail, examining JDBC, JDO, and Hibernate as implementation strategies.JDBC support. Spring offers two levels of JDBC abstraction that significantly ease the effort of writing JDBC-based DAOs: the org.springframework.jdbc.core package (a template/callback approach) and the org.springframework.jdbc.object package (modeling RDBMS operations as reusable objects). Using the Spring JDBC packages can deliver much greater pro-ductivity and eliminate the potential for common errors such as leaked connections, compared with direct use of JDBC. The Spring JDBC abstraction integrates with the transaction and DAO abstractions.Integration with O/R mapping tools. Spring provides support classesfor O/R Mapping tools like Hibernate, JDO, and iBATIS Database Layer to simplify resource setup, acquisition, and release, and to integrate with the overall transaction and DAO abstractions. These integration packages allow applications to dispense with custom ThreadLocal sessions and native transac-tion handling, regardless of the underlying O/R mapping approach they work with.Web MVC framework. Spring provides a clean implementation of web MVC, consistent with the JavaBean configuration approach. The Spring web framework enables web controllers to be configured within an IoC container, eliminating the need to write any custom code to access business layer services. It provides a generic DispatcherServlet and out-of-the-box controller classes for command and form handling. Request-to-controller mapping, view resolution, locale resolution and other important services are all pluggable, making the framework highly extensi-ble. The web framework is designed to work not only with JSP, but with any view technology, such as Velocity—without the need for additional bridges. Chapter 13 discusses web tier design and the Spring web MVC framework in detail.Remoting support. Spring provides a thin abstraction layer for accessing remote services without hard-coded lookups, and for exposing Spring-managed application beans as remote services. Out-of-the-box support is inc luded for RMI, Caucho’s Hessian and Burlap web service protocols, and WSDL Web Services via JAX-RPC. Chapter 11 discusses lightweight remoting.While Spring addresses areas as diverse as transaction management and web MVC, it uses a consistent approach everywhere. Once you have learned the basic configuration style, you will be able to apply it in many areas. Resources, middle tier objects, and web components are all set up using the same bean configuration mechanism. You can combine your entireconfiguration in one single bean definition file or split it by application modules or layers; the choice is up to you as the application developer. There is no need for diverse configuration files in a variety of formats, spread out across the application.Spring on J2EEAlthough many parts of Spring can be used in any kind of Java environment, it is primarily a J2EE application framework. For example, there are convenience classes for linking JNDI resources into a bean factory, such as JDBC DataSources and EJBs, and integration with JTA for distributed transaction management. In most cases, application objects do not need to work with J2EE APIs directly, improving reusability and meaning that there is no need to write verbose, hard-to-test, JNDI lookups.Thus Spring allows application code to seamlessly integrate into a J2EE environment without being unnecessarily tied to it. You can build upon J2EE services where it makes sense for your application, and choose lighter-weight solutions if there are no complex requirements. For example, you need to use JTA as transaction strategy only if you face distributed transaction requirements. For a single database, there are alternative strategies that do not depend on a J2EE container. Switching between those transac-tion strategies is merely a matter of configuration; Spring’s consistent abstraction avoids any need to change application code.Spring offers support for accessing EJBs. This is an important feature (and relevant even in a book on “J2EE without EJB”) because the u se of dynamic proxies as codeless client-side business delegates means that Spring can make using a local stateless session EJB an implementation-level, rather than a fundamen-tal architectural, choice.Thus if you want to use EJB, you can within a consistent architecture; however, you do not need to make EJB the cornerstone of your architecture. This Spring feature can make devel-oping EJB applications significantly faster, because there is no need to write custom code in service loca-tors or business delegates. Testing EJB client code is also much easier, because it only depends on the EJB’s Business Methods interface (which is not EJB-specific), not on JNDI or the EJB API.Spring also provides support for implementing EJBs, in the form of convenience superclasses for EJB implementation classes, which load a Spring lightweight container based on an environment variable specified in the ejb-jar.xml deployment descriptor. This is a powerful and convenient way of imple-menting SLSBs or MDBs that are facades for fine-grained POJOs: a best practice if you do choose to implement an EJB application. Using this Spring feature does not conflict with EJB in any way—it merely simplifies following good practice.Introducing the Spring FrameworkThe main aim of Spring is to make J2EE easier to use and promote good programming practice. It does not reinvent the wheel; thus you’ll find no logging packages in Spring, no connection pools, no distributed transaction coordinator. All these features are provided by other open source projects—such as Jakarta Commons Logging (which Spring uses for all its log output), Jakarta Commons DBCP (which can be used as local DataSource), and ObjectWeb JOTM (which can be used as transaction manager)—or by your J2EE application server. For the same reason, Spring doesn’t provide an O/R mapping layer: There are good solutions for this problem area, such as Hibernate and JDO.Spring does aim to make existing technologies easier to use. For example, although Spring is not in the business of low-level transactioncoordination, it does provide an abstraction layer over JTA or any other transaction strategy. Spring is also popular as middle tier infrastructure for Hibernate, because it provides solutions to many common issues like SessionFactory setup, ThreadLocal sessions, and exception handling. With the Spring HibernateTemplate class, implementation methods of Hibernate DAOs can be reduced to one-liners while properly participating in transactions.The Spring Framework does not aim to replace J2EE middle tier services as a whole. It is an application framework that makes accessing low-level J2EE container ser-vices easier. Furthermore, it offers lightweight alternatives for certain J2EE services in some scenarios, such as a JDBC-based transaction strategy instead of JTA when just working with a single database. Essentially, Spring enables you to write appli-cations that scale down as well as up.Spring for Web ApplicationsA typical usage of Spring in a J2EE environment is to serve as backbone for the logical middle tier of a J2EE web application. Spring provides a web application context concept, a powerful lightweight IoC container that seamlessly adapts to a web environment: It can be accessed from any kind of web tier, whether Struts, WebWork, Tapestry, JSF, Spring web MVC, or a custom solution.The following code shows a typical example of such a web application context. In a typical Spring web app, an applicationContext.xml file will reside in the WEB-INF directory, containing bean defini-tions according to the “spring-beans” DTD. In such a bean definition XML file, business objects and resources are defined, for example, a “myDataSource” bean, a “myInventoryManager” bean, and a “myProductManager” bean. Spring takes care of their configuration, their wiring up, and their lifecycle.<beans><bean id=”myDataSource” class=”org.springframework.jdbc. datasource.DriverManagerDataSource”><property name=”driverClassName”> <value>com.mysql.jdbc.Driver</value></property> <property name=”url”><value>jdbc:mysql:myds</value></property></bean><bean id=”myInventoryManager” class=”ebusiness.DefaultInventoryManager”> <property name=”dataSource”><ref bean=”myDataSource”/> </property></bean><bean id=”myProductManager” class=”ebusiness.DefaultProductManage r”><property name=”inventoryManager”><ref bean=”myInventoryManager”/> </property><property name=”retrieveCurrentStock”> <value>true</value></property></bean></beans>By default, all such beans have “singleton” scope: one instance per context. The “myInventoryManager” bean will automatically be wired up with the defined DataSource, while “myProductManager” will in turn receive a reference to the “myInventoryManager” bean. Those objects (traditionally called “beans” in Spring terminology) need to expos e only the corresponding bean properties or constructor arguments (as you’ll see later in this chapter); they do not have to perform any custom lookups.A root web application context will be loaded by a ContextLoaderListener that is defined in web.xml as follows:<web-app><listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener>...</web-app>After initialization of the web app, the root web application context will be available as a ServletContext attribute to the whole web application, in the usual manner. It can be retrieved from there easily via fetching the corresponding attribute, or via a convenience method in org.springframework.web. context.support.WebApplicationContextUtils. This means that the application context will be available in any web resource with access to the ServletContext, like a Servlet, Filter, JSP, or Struts Action, as follows:WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(servletContext);The Spring web MVC framework allows web controllers to be defined as JavaBeans in child application contexts, one per dispatcher servlet. Such controllers can express dependencies on beans in the root application context via simple bean references. Therefore, typical Spring web MVC applications never need to perform a manual lookup of an application context or bean factory, or do any other form of lookup.Neither do other client objects that are managed by an application context themselves: They can receive collaborating objects as bean references.The Core Bean FactoryIn the previous section, we have seen a typical usage of the Spring IoC container in a web environment: The provided convenience classes allow for seamless integration without having to worry about low-level container details. Nevertheless, it does help to look at the inner workings to understand how Spring manages the container. Therefore, we will now look at the Spring bean container in more detail, starting at the lowest building block: the bean factory. Later, we’ll continue with resource setup and details on the application context concept.One of the main incentives for a lightweight container is to dispense with the multitude of custom facto-ries and singletons often found in J2EE applications. The Spring bean factory provides one consistent way to set up any number of application objects, whether coarse-grained components or fine-grained busi-ness objects. Applying reflection and Dependency Injection, the bean factory can host components that do not need to be aware of Spring at all. Hence we call Spring a non-invasive application framework.Fundamental InterfacesThe fundamental lightweight container interface is org.springframework.beans.factory.Bean Factory. This is a simple interface, which is easy to implement directly in the unlikely case that none of the implementations provided with Spring suffices. The BeanFactory interface offers two getBean() methods for looking up bean instances by String name, with the option to check for a required type (and throw an exception if there is a type mismatch).public interface BeanFactory {Object getBean(String name) throws BeansException;Object getBean(String name, Class requiredType) throws BeansException;boolean containsBean(String name);boolean isSingleton(String name) throws NoSuchBeanDefinitionException;String[] getAliases(String name) throws NoSuchBeanDefinitionException;}The isSingleton() method allows calling code to check whether the specified name represents a sin-gleton or prototype bean definition. In the case of a singleton bean, all calls to the getBean() method will return the same object instance. In the case of a prototype bean, each call to getBean() returns an inde-pendent object instance, configured identically.The getAliases() method will return alias names defined for the given bean name, if any. This mecha-nism is used to provide more descriptive alternative names for beans than are permitted in certain bean factory storage representations, such as XML id attributes.The methods in most BeanFactory implementations are aware of a hierarchy that the implementation may be part of. If a bean is not foundin the current factory, the parent factory will be asked, up until the root factory. From the point of view of a caller, all factories in such a hierarchy will appear to be merged into one. Bean definitions in ancestor contexts are visible to descendant contexts, but not the reverse.All exceptions thrown by the BeanFactory interface and sub-interfaces extend org.springframework. beans.BeansException, and are unchecked. This reflects the fact that low-level configuration prob-lems are not usually recoverable: Hence, application developers can choose to write code to recover from such failures if they wish to, but should not be forced to write code in the majority of cases where config-uration failure is fatal.Most implementations of the BeanFactory interface do not merely provide a registry of objects by name; they provide rich support for configuring those objects using IoC. For example, they manage dependen-cies between managed objects, as well as simple properties. In the next section, we’ll look at how such configuration can be expressed in a simple and intuitive XML structure.The sub-interface org.springframework.beans.factory.ListableBeanFactory supports listing beans in a factory. It provides methods to retrieve the number of beans defined, the names of all beans, and the names of beans that are instances of a given type:public interface ListableBeanFactory extends BeanFactory {int getBeanDefinitionCount();String[] getBeanDefinitionNames();String[] getBeanDefinitionNames(Class type);boolean containsBeanDefinition(String name);Map getBeansOfType(Class type, boolean includePrototypes,boolean includeFactoryBeans) throws BeansException}The ability to obtain such information about the objects managed by a ListableBeanFactory can be used to implement objects that work with a set of other objects known only at runtime.In contrast to the BeanFactory interface, the methods in ListableBeanFactory apply to the current factory instance and do not take account of a hierarchy that the factory may be part of. The org.spring framework.beans.factory.BeanFactoryUtils class provides analogous methods that traverse an entire factory hierarchy.There are various ways to leverage a Spring bean factory, ranging from simple bean configuration to J2EE resource integration and AOP proxy generation. The bean factory is the central, consistent way of setting up any kind of application objects in Spring, whether DAOs, business objects, or web controllers. Note that application objects seldom need to work with the BeanFactory interface directly, but are usu-ally configured and wired by a factory without the need for any Spring-specific code.For standalone usage, the Spring distribution provides a tiny spring-core.jar file that can be embed-ded in any kind of application. Its only third-party dependency beyond J2SE 1.3 (plus JAXP for XML parsing) is the Jakarta Commons Logging API.The bean factory is the core of Spring and the foundation for many other services that the framework offers. Nevertheless, the bean factory can easily be used stan-dalone if no other Spring services are required.Derivative:networkSpring 框架简介Spring框架:这是一个流行的开源应用框架,它可以解决很多问题。
j2ee外文翻译文献

j2ee外文翻译文献j2ee外文翻译Infrastructure for Automatic Dynamic DeploymentOf J2EE Application in Distributed EnvironmentsAnatoly Akkerman, Alexander T otok, and Vijay Karamcheti Abstract: in order to achieve such dynamic adaptation, we need an infrastructure for automating J2EE application deployment in such an environment. This need is quite evident to anyone who has ever tried deploying a J2EE application even on a single application server, which is a task that involves a great deal of configuration of both the system services and application components.Key words: j2ee; component; Distributed; Dynamic Deployment;1 IntroductionIn recent years, we have seen a significant growth in component-based enterprise application development. These applications are typically deployed on company Intranets or on the Internet and are characterized by high transaction volume, large numbers of users and wide area access. Traditionally they are deployed in a central location, using server clustering with load balancing (horizontal partitioning) to sustain user load. However, horizontal partitioning has been shown very efficient only in reducing application-related overheads of user-perceived response times, without having much effect on network-induced latencies. Vertical partitioning (e.g., running web tier and business tier in separate VMs) has been used for fault isolation and load balancing but it is sometimes impractical due to significant run-time overheads (even if one would keep the tierson a fast local-area network) related to heavy use of remote invocations. Recent work [14] in the context of J2EE component based applications has shown viability of vertical partitioning in wide-area networks without incurring the aforementioned overheads. The key conclusions from that study can be summarized as follows:Using properly designed applications, vertical distribution across wide-area networks improves user-perceived latencies.Wide-area vertical layering requires replication of application components and maintaining consistency between replicas.Additional replicas may be deployed dynamically to handle new requests.Different replicas may, in fact, be different implementations of the same component based on usage (read-only, read-write).New request paths may reus e components from previously deployed paths.Applying intelligent monitoring [6] and AI planning [2, 12] techniques in conjunction with the conclusions of that study, we see a potential for dynamic adaptation in industry-standard J2EE component-based applications in wide area networks Through deployment of additional application components dynamically based on active monitoring. However, in order to achieve such dynamic adaptation, we need an infrastructure for automating J2EE application deployment in such an environment. This need is quite evident to anyone who has ever tried deploying a J2EE application even on a single application server, which is a task that involves a great deal of configuration of both the system services and application components. For example one has to set up JDBC data sources, messaging destinations and other resource adapters before application components can beconfigured and deployed. In a wide area deployment that spans multiple server nodes, this proves even more complex, since more system services that facilitate inter-node communications need to be configured and started and a variety of configuration data, like IP addresses, port numbers, JNDI names and others have to be consistently maintained in various configuration files on multiple nodes.This distributed deployment infrastructure must be able to: address inter-component connectivity specification and define its effects on component configuration and deployment, address application component dependencies on applicati on server services, their configuration and deployment, provide simple but expressive abstractions to control adaptation through dynamic deployment and undeployment of components,enable reuse of services and components to maintain efficient use of network nodes’ resources,provide these facilities without incurring significant additional design effort on behalf of application programmers.In this paper we propose the infrastructure for automatic dynamic deployment of J2EE applications, which addresses all of the aforementioned issues. The infrastructure defines architecture description languages (ADL) for component and link description and assembly. The Component Description Language is used to describe application components and links. It provides clear separation of application components from system components. A flexible type system is used to define compatibility of component ports and links. A declaration and expression language for configurable component properties allows for specification of inter-component dependencies andpropagation of properties between components. The Component (Replica) Assembly Language allows for assembly of replicas of previously defined components into application paths byConnecting appropriate ports via link replicas and specifying the mapping of these component replicas onto target application server nodes. The Component Configuration Process evaluates an application path’s correctness, identifies the dependencies of application components on system components, and configures component replicas for deployment. An attempt is made to match and reuse any previously deployed replicas in the new path based on their configurations. We implement the infrastructure as a part of the JBoss open source Java application server [11] and test it on severalSample J2EE applications –Java Pets tore [23], Rubies [20] and TPC-W-NYU [32]. The infrastructure implementation utilizes the JBoss’s extendable micro-kernel architecture, based on the JMX [27] specification. Componentized architecture of JBoss allows incremental service deployments depending on the needs of deployed applications. We believe that dynamic reconfiguration of application servers through dynamic deployment and undeployment of system services is essential to building a resource-efficient framework for dynamic distributed deployment of J2EE applications. The rest of the paper is organized as follows. Section 2 provides necessary background for understanding the specifics of the J2EE component technology which are relevant to this study. Section 3 gives a general description of the infrastructure architecture, while section 4 goes deeper in describing particularly important and interesting internal mechanisms of the infrastructure. Section 5describes the implementation of the framework, and related work is discussed in section 6.2 J2EE Background2.1 IntroductionComponent frameworks. A component framework is a middleware system that supports applications consisting of components conforming to certain standards. Application components are “plugged” into the component framework, which establishes their environmental conditions and regulates the interactions between them. This is usually done through containers, component holders, which also provide commonly required support for naming, security, transactions, and persistence. Component frameworks provide an integrated environment for component execution, as a result significantly reduce the effort .it takes to design, implement, deploy, and maintain applications. Current day industry component framework standards are represented by Object Management Group’s CORBA Component Model [18], Sun Microsystems’ Java 2 Platform Enterprise Edition (J2EE) [25] and Microsoft’s .NET [17], wi th J2EE being currently the most popular and wide ly used component framework in the enterprise arena.J2EE. Java 2 Platform Enterprise Edition (J2EE) [25] is a comprehensive standard for developing multi-tier enterprise Java applications. The J2EE specification among other things defines the following:Component programming model,Component contracts with the hosting server,Services that the platform provides to these components,Various human roles,Compatibility test suites and compliance testing procedures.Among the list of services that a compliant application server must provide are messaging, transactions, naming and others that can be used by the application components. Application developed using J2EE adhere to the classical 3-Tier architectures –Presentation Tier, Business Tier, and Enterprise Information System (EIS) Tier (see Fig. 1). J2EE components belonging to each tier are developed adhering to theSpecific J2EE standards.1. Presentation or Web tier.This tier is actually subdivided into client and server sides. The client side hosts a web browser, applets and Java applications that communicate with the server side of presentation tier or the business tier. The server side hosts Java Servlet components [30], Java Server Pages (JSPs) [29] and static web content. These components are responsible for presenting business data to the end users. The data itself is typically acquired from the business tier and sometimes directly from the Enterprise Information System tier. The server side of the presentation tier is typically accessed through HTTP(S) protocol.2. Business or EJB tier.This tier consists of Enterprise Java Beans (EJBs) [24] that model the business logic of the enterprise application. These components provide persistence mechanisms and transactional support. The components in the EJB tier are invoked through remote invocations (RMI), in-JVM invocations or asynchronous message delivery, depending on the type of EJB component. The EJB specification defines several types of components. They differ in invocation style (synchronous vs. asynchronous, local vs. remote) and statefulness: completely stateless (e.g., Message-Driven Bean), stateful non-persistent(e.g., Stateful Session Bean), stateful persistent (e.g., Entity Bean). Synchronously invocable EJB components expose themselves through a special factory proxy object (an EJB Home object, which is specific to a given EJB), which is typically bound in JNDI by the deployer of the EJB. The EJB Home object allows creation or location of an EJBObject, which is a proxy to a particular instance of an EJB 1.3. Enterprise Information System (EIS) or Data tier.This tier refers to the enterprise information systems, like relational databases, ERP systems, messaging systems and the like. Business and presentation tier component communicate with this tier with the help of resource adapters as defined by the Java Connector Architecture [26].The J2EE programming model has been conceived as a distributed programming model where application components would run in J2EE servers and communicate with each other. After the initial introduction and first server implementations, the technology, most notably, the EJB technology has seen some a significant shift away from purely distributed computing model towards local interactions 2. There were very legitimate performance-related reasons behind this shift, however theDistributed features are still available. The J2EE specification has seen several revisions, the latest stable being version 1.3, while version 1.4 is going through last review phases 3. We shall focus our attention on the former, while actually learning from the latter. Compliant commercial J2EE implementations are widely available from BEA Systems [4], IBM [9], Oracle [21] and other vendors. Several open source implementations, including JBoss [11] and JOnAS [19] claimcompatibility as well. ARecent addition to the list is a new Apache project Geronimo[1].2.2 J2EE Component Programming ModelBefore we describe basic J2EE components, let’s first address the issue of defining what a component is a software component is a unit of composition with contractually specified interfaces and explicit context dependencies only. A software component can be deployed independently and is subject to composition by third parties [31].According to this definition the following entities which make up a typical J2EE application would be considered application components (some exceptions given below):EJBs (session, entity, message-driven),Web components (servlets, JSPs),messaging destinations,D ata sources,EJB and Web components are deployed into their corresponding containers provided by the application server vendor. They have well-defined contracts with their containers that govern lifecycle, threading, persistence and other concerns. Both Web and EJB components use JNDI lookups to locate resources or other EJB components they want to communicate with. The JNDI context in which these lookups are performed is maintained separately for each component by its container. Bindings messaging destinations, such as topics and queues, are resources provided by a messaging service implementation. Data sources are resources provided by the application server for data access by business components into the enterprise information services (data) tier, and most commonly are exemplified by JDBCconnection pools managed by the applicationServer. A J2EE programmer explicitly programs only EJBs and Web components. These custom-written components interact with each other and system services both implicitly and explicitly. For example, an EJB developer may choose explicit transaction demarcation (i.e., Bean-Managed Transactions) which means that the developer assumes the burden of writingexplicit programmatic interaction with the p latform’s Transaction Manager Service through well-defined interfaces. Alternatively, the developer may choose Container-Managed transaction demarcation, where transactional behavior of a component is defined through its descriptors and handled completely by the EJB container, thus acting as an implicit dependency of the EJB on the underlying Transaction Manager service.2.3 Links Between Components2.3.1 Remote InteractionsJ2EE defines only three basic inter-component connection types that can cross application server boundaries, in all three cases; communication is accomplished through special Java objects.Remote EJB invocation: synchronous EJB invocations through EJB Home and EJB Object interfaces.Java Connector outbound connection: synchronous message receipt, synchronous and asynchronous message sending, Database query using Connection Factory and Connection interfaces.Java Connector inbound connection: asynchronous message delivery into Message-Driven Beans (MDBs) only, utilizing Activation Spec objects. In the first two cases, an applicationcomponent developer writes the code that performs lookup of these objects in the component’s run-time JNDI context as well as code that issues method invocations or sends and receives messages to and from the remote component. The componen t’s run-time JNDI context is created for each deployment of the component.Bindings in the context are initialized at component deployment time by the deployed (usually by means of component’s deployment descriptors). These bin dings are assumed to be static, since the specification does not provide any contract between the container and the component to inform of any binding changes In the case of Java Connector inbound communication, Activation Spec object lookup and all subsequent interactions with it are done implicitly by the MDB container. The protocol for lookup has not been standardized, though it is reasonable to assume a JMX- or JNDI-based lookup assuming the underlying application server provides facilities to control each step of deployment process, establishment of a link between J2EE components would involve:Deployment of target component classes (optional for some components, like destinations),? C reation of a special Java object to be used as a target component’s proxy,Binding of this ob ject with component’s host naming service (JNDI or JMX),Start of the target component,Deployment of referencing component classes,Creation and population of referencing component’s run-time context in its host naming service,start of the refere ncing component.However, none of modern application servers allow detailedcontrol of the deployment process for all component types beyond what is possible by limited options in their deployment descriptors 4. Therefore our infrastructure will use a simplified approach that relies on features currently available on most application servers:Ability to deploy messaging destinations and data sources dynamically,Ability to create and bind into JNDI special objects to access messaging destinations and data sources,Ability to specify initial binding of EJB Home objects upon EJB component deployment,? Ability to specify a JNDI reference 5 in the referencing component’s run-time context to point to the EJB Home binding of the referenced EJB component. In our infrastructure which is limited to homogeneous application servers, these options are sufficient to control intercomponent links through simple deployment descriptor manipulation. However, in context of heterogeneous application servers, simple JNDI references and thus simple descriptor manipulation are insufficient due to cross-application-serverClassloading issues.2.3.2 Local InteractionsSome interactions between components can occur only between components co-located in the same application server JVM and sometimes only in the same container. In the Web tier, examples of such interactions are servlet-to-servlet request forwarding. In the EJB tier, such interactions are CMP Entity relations and invocations via EJB local interfaces. Such local deployment concerns need not be exposed at the level of a distributed deployment infrastructure other than to ensure collocation. Therefore, the infrastructure treats allcomponents requiring collocation as a single component.2.4 Deployment of J2EE Applications and System Services2.4.1 Deployment of Application ComponentsDeployment and undeployment of standard J2EE components has not yet been standardized (see JSR 88 [10] for standardization effort 6). Therefore, each application server vendor provides proprietary facilities for component deployment and undeployment. And while the J2EE specification does define packaging of standard components which includes format and location of XML-based deployment descriptors within the package, this package is not required to be deployable by an application server without proprietary transformation. Examples of such transformation areGeneration of additional proprietary descriptors that supplement or replace the standard ones,Code generation of application server-specific classes.In order to proceed with building a dynamic distributed deployment infrastructure capable of deploying in heterogeneous networks, we propose a universal unit of deployment to be a single XML-based deployment descriptor or a set of such,Bundled into an archive. The archive may optionally include Java classes that implement the component and any other resources that the component may need. Alternatively, the deployment descriptors may simply have URL references to codebases. We assume presence of a dynamic deployment/undeployment service on all compliant J2EE servers and a robust application server classloading architecture capable of repeated deployment cycles without undesired classloading-related issues. Most modern application servers (e.g., JBoss [11]and Geronimo [1]) do provide such facilities.2.4.2 Deployment of System Components (Services)While lacking only in the area of defining a clear specification of deployment and undeployment when it comes to application components, the J2EE standard falls much shorter with respect to system services. Not only a standardized deployment facility for system services is not specified, the specification, in fact, places no requirements even on life cycle properties of these services, nor does it address the issue of explicit specification of application component dependencies on the underlying system services. Instead it defines arole of human deploy who is responsible for ensuring that the required services are running based on his/her understanding of dependencies of application components on system services as implied by the nature of components and their deployment descriptors.References[1] Matt Bishop. Computer Security: Art and Science. New York, 2002[2] Matt Bishop. Vulnerabilities Analysis. Proceedings of the Second International Symposium on RecentAdvances in Intrusion Detection.Los Angeles 2006[3] Balasubra maniyan. An Architecture for Intrusion Detection using Autonomous Agents[M]. Department of Computer Sciences, Purdue University, 1998.。
JAVA学习过程论文中英文资料对照外文翻译文献

JAVA学习过程论文中英文资料对照外文翻译文献During my process of learning Java。
I have found that everyone has their own unique study method。
What works for one person may not work for another。
As I am studying Java independently。
I have not asked ___。
I have had to rely on my own ___ out。
While I cannot say whether this is the best method。
I can offer it as a reference for others.When I first started learning Java。
___ understanding of the language。
As I progressed。
I began to work on small projects to apply what I had learned.One of the biggest challenges I faced was understanding object-oriented programming。
___。
once I understood the basics。
everything else started to fall into place.___ practicing programming。
I also made sure to take breaks and give my brain time to rest。
I found that this helped me to ___.Overall。
my learning process has been a n of n。
外文翻译7 J2EE在现实世界中: 我们推行电子商贸Session Beans

J2EE in the Real World:Implementing Our E-CommerceSessionBeansIn Chapter 12, we designed an object model for a real e-commerce solution using EJB. In this chapter, we’re going to implement our e-commerce deployment’s session beans. Whereas entity beans model data, our session beans will contain business logic that performs the necessary algorithms and strategies. In general, every serious EJB deployment will have a combination of beans such as this. We’ll present four new session beans in this chapter. If you need a refresher on the motivation behind creating these beans, or if you need to see the big picture for our deployment, refer to Chapter 12.A Quote session bean. A Quote represents the user’s shopping cart and stores each of the user’s Quote Line I tems. A Quote is also a stateful session bean.A Pricer session bean. Our Pricer bean will be responsible for taking a Quote bean as input, and computing its price. The price is calculated based on a set of pricing rules, such as a discount for a particular customer. Our Pricer bean serves as a simple method provider of business logic, and it is well-modeled as a stateless session bean because it retains no state after computing a price.When Should I Wrap Entity Beans with Session Beans?As we mentioned in Chapter 12, a useful EJB paradigm is to keep your functional objects in session beans and have them transactionally manipulate entity beans that reside in an underlying store.Working with this paradigm has many benefits. For example:If you cache your t ransactional functionality in a session bean (as we’ll see later in this chapter), you eliminate the need for your client code (such as servlets) to have any transaction know-how. This greatly reduces usage errors.Because clients don’t need to have any ex plicit transaction calls, client programming is simplified. You can perform transactions declaratively, rather than programmatically, by deploying a session bean whose transactions are managed by the application server.By wrapping entity beans with session beans, you reduce round trips between the client and the beans. If your presentation tier is making numerous transactional calls to the business logic tier, your application’s performance is going to grind to a halt.However, you shouldn’t always wrap en tities with sessions. If you have a simple deployment where you are in control of the operational environment, wrapping entities with sessions may be an unnecessary layer of indirection. An example of when you’d want to callentity beans directly is an e-commerce deployment where servlets and enterprise beans are running in the same application server. Because they’re in the ame address space, there are no network round trips to deal with, so performance is high. Unfortunately, if you’re in the market of se lling beans, you can’t always choose your deployment environment.We’ll see more design strategies, such as the one at the end of Chapter 15, when we’ve completed our e-commerce system. For now, let’s begin writing our session beans.A Teller bean. If you’ll recall, in Chapter 8 we design a Bank Account entity bean. In this chapter, we’ll write a Bank Teller session bean, which wraps that Bank Account entity bean. The Teller serves as a convenience class for performing bulk bank account operations (such as a transfer of funds from one account to another). You’ll see this familiar paradigm of wrapping entity beans with session beans frequently in the EJB world. It makes a lot of sense—rather than calling across the network frequently when accessing entity beans, you can design a session bean to perform bulk entity bean updates for you.The Quote Line Item Stateful Session BeanOur first session bean is a Quote Line Item. As the user goes through the catalog, he or she will pick out different Products and add them to the Quote bean (described later in this chapter). Quotes are made up of Quote Line Items, where each line item contains information about a single product and quantity. More specifically, a line item contains the following data: The ID of this line itemThe Product (entity bean) that the user wants to buyThe quantity of that ProductAny discounts the customer gets from the base price of the ProductBecause a Quote Line Item is specific to one customer and is not persistent, it is best modeled as a stateful session bean. Let’s begin our implementation.QuoteLineItem.javaThe first source code that we’ll generate is our bean’s remote interface. The remote interface is the interface that clients operate on to call methods on our bean. The code is in QuoteLineItem.java, shown in Source 14.1. This is a straightforward remote interface, exposing simple get/set methods to modify the session bean’s internal state. Of note, the getProduct() method returns the Product entity bean that this line-item represents. There is no setProduct() method—our bean implementation’s ejbCreate() method will handle that.QuoteLineItemBean.javaNext, we’ll write our core bean’s implementation. The code is in QuoteLineItemBean.java, shown in Source 14.2.Our session bean does not contain much logic—indeed, most of our bean is made up ofget/set methods, comments, and empty methods that EJB requires. Our bean’s state is the product that this line-item represents, the product quantity desired, and the discount that the customer receives. Notice that our session bean references the Product entity bean we created in Chapter 9. It uses that bean to identify the product associated with this line item. Our session bean has no unique identifier or primary key. No session beans have primary keys because session beans are not permanent, identifiable, persistent, locatable objects, as entity beans are.QuoteLineItemHome.javaNext, we’ll write our bean’s home interface. Clients will call the home interface to create and destroy Quote Line Item EJB objects. The code is in QuoteLineItemHome. java, shown in Source 14.3.Our home interface has a single create method—create()—that creates a new quoted line item for a specific product.The Deployment DescriptorFinally, we have a deployment descriptor for our Quote Line Item, shown in Table 14.1.The most important entries in Table 14.1 are the transaction isolation level and the transaction attribute. When deciding on the proper isolation level for this bean, we recall that Quote Line Items are temporary, in-memory session beans. We do not perform any persistent operations at all, and we do not anticipate any concurrency issues. This leads us to choose the weakest isolation level—TRANSACTION_READ_COMMITTED—that will give us the highest performance. We also choose to support transactions but not require them, as we are not performing any operations that require a transaction. For our security runas mode, we are not performing any secure operations, so we’ll leave the bean to run as the client identity.The Quote Stateful Session BeanThe Quote Line Item bean we have just written represents a single product the user is interested in purchasing. The next session bean we’ll write is the complement of this—a Quote bean. A quote acts as a shopping cart, holding many product selections the user has made. As the user traverses the Web site, he or she adds or removes goods from the quote. Our Quote bean will use the Quote Line Item bean we just made to represent each product the user wants. Each customer who’s log ged in should have his or her own temporary and separate quote to work in. Therefore, our quotes will need to hold client-specific state in them. They should not be persistent because the user can always cancel the quote. These requirements naturally lend themselves to the stateful session bean paradigm.Our Quote bean will contain the following information:The Customer (entity bean), who we authenticated at the login screen. We need to storethe Customer so that we know who to bill, what discounts to apply, and where to ship the manufactured products.We will be able to locate the individual Quote Line Items, each of which hold information about a quantity for a single product.The subtotal for the quote, which is computed from the prices and quantities of the products, as well as any discounts the customer gets.The taxes charged. This is added to the subtotal for the final grand total.In addition to this data, our Quote bean will be smart and will know how to generate a permanent Order from itself.Quote.javaWe begin our quote bean implementation by designing our remote interface, which is the interface that clients use when calling methods on our bean. The code is in Quote.java, shown in Source 14.4.Other than the standard get/set methods, we have a clear() method to wipe the quote clean. This clear() method does not eliminate the Customer associated with the quote because the Customer can still add items to the quote even after clearing it via the Web user interface.We’ve got one other interesting met hod as well—purchase(). Purchase takes this quote and magically converts it into a persistent Order. We’ll see how this is accomplished in our bean’s implementation.QuoteBean.javaWe now define our quote bean’s core business logic implementation in QuoteB ean.java. Take a look at it in Source 14.5. Although it’s quite lengthy, it contains some interesting methods, which we explain later.The first thing to notice is our three transient Home Object fields. These fields will not be persisted as part of the conversational state. The fields are as follows:A Quote Line Item Home Object for creating new Quote Line Items. We need to create a Quote Line Item whenever the client adds a Product to our Quote for which we don’t already have a Line Item. If we already have a Line Item, we’ll increase that Line Item’s quantity.An Order Line Item Home Object for transforming the Quote Line Items into permanent Order Line Items in the purchase() method.An Order Home Object for transforming the Quote into a permanent Orderin the purchase() method.When our bean is context switched in via ejbActivate(), these three fields will not be set by the container. We must manually refind the Home Objects. This is done via the private findHome() method—a convenience method we write that will find a generic Home Objectfor us.As with the Order entity bean, when our Quote is removed via ejbRemove(), all the line items are removed. This same process happens when the Quote’s clear() method is called to clear out the quote. Note that we d on’t remove the Customer referenced by the Quote because the Customer can be reused over and over again for many different quotes.QuoteHome.javaNext, we’ll write the home interface used to create new quotes or find existing quotes. Our home interface is in QuoteHome.java, and it is shown in Source 14.6.Our home interface exposes a single method to create a new Quote EJB Object. It takes a customer as a parameter because the quote (aka shopping cart) needs to be associated with a particular customer. Our login servlet will call this create() method when the user first logs in, and that quote will stay with the user throughout his or her visit to our store.QuoteException.javaFinally, we have a custom exception class, QuoteException.java, for indicating problems that occur in our Quote bean. The code is in Source 14.7.The Deployment DescriptorNow that we’ve written our bean code, we need to specify our bean’s declarative properties in a deployment descriptor. The descriptor values are in Table 14.2.As with our Quote Line Item bean, we do not perform any persistent operations, and we do not anticipate any concurrency issues. Hence we have no need for transactional support. Hence, we use the weakest isolation level, TRANSACTION_READ_UNCOMMITTED, and support transactions if they are already occurring but do not require transactions.The Pricer Stateless Session BeanOne of the requirements that we laid out for our e-commerce architecture in Chapter 12 is support for customized pricing. A customized price is a specialized price computed from discounts, bulk purchases, and other factors.The best way to have pricing behavior in an extensible manner is to externalize the entire pricing logic into its own enterprise bean. Thus, we have the concept of a Pricer—a component that takes a price quote as input and calculates the price of that quote based on a set of pricing rules. A pricing rule might be “Customer X gets a 5% discount” or “If you purchase 10 motherboards you get a 15% discount.” These pricing rules coul d be read in from a database, or set via properties.Internally, our Pricer will take a Quote stateful session bean as input and compute the subtotal (before taxes) of that Quote. It figures out the subtotal by computing a discount foreach Quote Line Item and subtracting the discounts from the total price.Our Pricer bean is a business logic provider—it will work on any Quote, and it holds no client-specific state. It is not a persistent object (it would not make sense to save a Pricer because a Pricer simply performs logic and holds no state). This means our Pricer fits into the EJB world best as a stateless session bean.Let’s take a look at the implementation.Pricer.javaFirst, we’ll design our Pricer’s remote interface, shown in Source 14.8 as Pricer.j ava.We have one business method—price()—that takes a Quote and prices it. price() will set the individual pricing fields of the Quote for us. Therefore, it returns nothing.PricerBean.javaNext, we’ll write the implementation of our Pricer’s business rule s. The code for the bean implementation is in PricerBean.java, depicted in Source 14.9.Because our bean holds no state whatsoever, most of our EJB required methods are blank. We have one public business logic method—price()—which computes the price of a quote. price() calls two private helper methods, priceSubtotal() and priceTaxes().PricerBean.priceSubtotal()Our Pricer bean performs only one kind of discount—a customer-specific discount. These are discounts a preferred customer receives, such as a percentage discount on the entire Quote.The correlation between discounts and customers is data-driven via the bean’s deployed environment properties. You can use the properties file to customize the bean’s pricing rules.The customer-specific discount is computed in the following way:1. Retrieve the customer’s name from the Customer object.2. Read all the customer-specific discounts from the environment properties.3. If a discount applies to this Customer, reduce the price based on that discount.J2EE在现实世界中:我们推行电子商贸Session Beans 在第12章,我们设计了一个对象模型为一个真正的电子商贸解决方案使用EJB的。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
英文原文:J2EE synopsis:J2EE is a set is completely different in the traditional application development technical frame, contains many modules, mainly may simplify, and the standard application system's development and the deployment, then enhance the probability, the security and use the value again.The J2EE core is a group of technology standard and the guide, contains each kind of module, the service construction and the technical level, has the common standard and the specification, lets each kind rely on the J2EE construction betweenthe different platform, has the good compatibility, between information product each other who the solution behind the enterprise used in the past is unable compatibly, the enterprise interior or exterior exchanged with difficulty predicament.At present, the Java 2 platforms have 3 editions, they are suitable for the bantam and smart card Java 2 platform Micro version (Java 2 Platform Micro Edition,J2ME), are suitable for the tabletop system's Java 2 platform standard edition (Java 2 Platform Standard Edition, J2SE), are suitable for the foundation server application procedure and the service Java 2 platform enterprise version (Java 2 Platform Enterprise Edition, J2EE).J2EE is one kind simplifies the enterprise solution using the Java 2 platformsthe development, the deployment and the management related complex question architecture. The J2EE technology's foundation was the core Java platform or the Java 2 platform standard edition, J2EE has not only consolidated in standard edition many merits, for example " compiled one time, everywhere moved " the characteristic, convenience deposit database JDBC API, the CORBA technology as well as can inthe Internet application protect data safe mode and so on, meanwhile has provided to EJB (Enterprise JavaBeans), Java Servlets API, JSP (Java Server Pages) as well as the XML technology comprehensive support. Its final goal is becomes one to be able to cause the enterprise exploiters to reduce largely puts in the market hour the architecture.The J2EE architecture provides the intermediate level integration frame to usefor not to need too many expenses satisfiedly and to need the high usability, the redundant reliability as well as the extendibility application demand. Through provided the unification the development platform, J2EE reduced the development multi-layer application expense and the complexity, simultaneously provided to the existing application procedure integrates the powerful support, supported Enterprise JavaBeans completely, had the good guide to support packs and deploys the application, the increase table of contents support, strengthened the safety mechanism, enhanced t he performance.The J2EE to building have scalability, flexibility, easy maintenance business system provides a good mechanism:1. Retain existing IT assets: because enterprise must adapt to the new commercial demand, by means of the existing enterprise information system in investment, rather than re-enacted overall scheme is very important. So, a gradual (not radical, completely negative) way above the existing system established the server platform mechanism is not fair that the company needs. Can make full use of the user J2EE, as some of the original investment companies use the Tuxedo, IBM CICS BEA, IBM VisiBroker Inprise Encina,, and Netscape apply Server. This is possible because the J2EE extensive industry supported and some important 'enterprise computing' field supplier to participate. Each supplier to existing customer provides no abandoned e xisting investment into portable J2EE field upgrade path. Based on theJ2EE platform because the product can almost in any operating system and hardware configurations to run on existing operating system and hardware can also be retained use.2. Efficient development: the J2EE allows companies to some generic, very tedious tasks to a server to complete the middleware vendors. So that developers can focus on how to create business logic, correspondingly shorten the development time. Senior middleware vendors provide the following these complex middleware services:。
State management service -- let developers to write less code, don't care about how to manage state, so can complete application development faster.。
Persistent services - lets developers don't have to encode data access logic can write applications that can generate a lighter, and database irrelevant applications, this application easier to development and maintenance.。