ALL ASPECTS IN JAVA

来源:互联网 发布:起名软件在线 编辑:程序博客网 时间:2024/05/06 19:31

ESB is a common integration buzzword and there are a lot of definitions by integration vendors, market analysis and business users. When a service consumer communicates with a service provideer via the ESB, the consumer does not need to know the actual location of the service provider. This means that the service consumer is decoupled from the service providers and the a service provider's new server location has no impact on the service consumer. The core functionality of an ESB that provides this capability is known as location transparency.

You can implement the location transparency within the ESB with a simple XML configuration, a database, or a service registry. Besides the support for a set of transport protocols, implementation the integration between a service consumer and a service provider often requires a transformation of the message format. A common technology to transform a message from the soure to the target format is extensible stylesheet language transformation. XLST is a wordl wide web consortium recommendation widely adopted in the integration industry, which ensures that message transformation written in XLST are usable in most of the ESB aviable in the market.

Oracle uses the concept of schema to add a level of organization and security to the database objects. Each database users has a corresponding schema. A user's own schema is analogous to a local scope. To access objects within your schema, you may use just the name of the object. To access objects in another user's schema, you must prefix the obejct name with the schema name using a dot notation.

Object tables are tables whose rows are of a user-defined object type. Nested tables are tables that have a column that is a user-defined table type. Temporary tables are a special kind of table that can be created to store data that is only needed for the duration of a session or a transaction. The data in a temporary table is private to the session or transaction that inserts the data. Thid means that a given session can see only the rows that is has inserted into the temporary table.  Temporary table are emptied when the session terminates or the transaction completes.,depending its definition.

Oracle materialized views are views whose contents are stored on disk, as they do contain data. Materialized views are often created to store summaries or other comples operations where using a normal view, which wound need to be re-executed each time it  was called.

Oracle maintains certain system tables and views that describe the database itself. The tables are not directly accessible, but the system creates views that users can query to explore the database structuire. These views are the data dictionary views. They are sometimes called "system" tables or "catalog" tables. Data dictionary views are customized for three user types. The views prefixed with USER_ show all objects in the logged in user's schema. The views prefixed with ALL_ show all objects that the logged in user has access to. The ALL_ views will show all object in the logged-in user's schema as well as any other for which objects ther user has been granted privileges. The DBA_ views show all objects in the database.

The SQL for analysis functions allow you to do computations that require knowledge of preceding or subsequent rows. Using these functions, you can compute values that would require a stored procedure or complex programming.  The analysis functions use the concept of a partition, where a partition is a grouping of rows that the user defines,similar to a GROUP BY in the select statement. Within a partition, a window may be defined with a starting and an ending point. The ranking functions allow you to compute ranks, percentiles and other n-tiles. The ranking functions take the following general form: FUNCTION() OVER ([query_partition_clause] order_by_clause). The query_partition_clause defines the groups within which the function will  be calculated, and the order_by_clause defines the ordering that will be used. 

Variables and constants must be declared before they are used in the execution section. A PL/SQL is a collection of variable and type declarations and subprogram definitions. A package has a specification and a body. The specification is the public part of a package and contains declarations of objects that can be shared with other packages.  The package body contains declarations for any objects that are private to the package, along with the bodies of all curosrs and subprograms and an initialization section. PL/SQL has two methods for allowing dynamic execution of SQL statements. A call to the Native Dynamic SQL command EXECUTE IMMEDIATE uses the following syntax. A REF CURSOR is a pointer to a cursor. When a cursor is opened, the associated query is executed. Subsequent fetch commands will retieve each of the individual rows of the query result set.

An execution plan is the systematic process that oracle go through to retrieve the data required to satisfy the query. When a static synchronized method is called, the program obtains the class lock before calling the method. The class lock can be grabbed and released independently  of the object lock. If a nonstatic synchronized method calls a static synchronized method, it acquires both locks.

JasperReports leverages other open-source java libaries to implement some of their functionality.Some of the libaries JasperReoprts builds on include: iText; JFreeChart; Jakarta poi;JAXP;Jakarta Commons. When working with JaperReports, the first step is to create a report template as an xml file. XML report templates can be hand-coded or generated by a graphical report designer.

Distributed applications,devices and services appear in many different arrangement in an enterprise. Resource management encompasses both applications and hardware. In fact, both application and hardware management can be supported through the development of java management extension resoure management software.

Resource management is a management concept that provides a plan and tools for the management of enterprise applications and resources. Today's management solutions can be divided into two categories: network and application. The most common tool used for networking management is simple network management protocol. Most network monitoring and management systems today use simple network management protocol solution to provide monitoring and management capability for hardware.

A manageable resource is any application, device ,or existing entity that can be accessed or wrapped by java. It is the entity that will be exposed for management by using JMX. Applications can expose components,api,or additional resources for a jhmx environment to manage. Manageable resources can even be network devices such as a printers. The manageable resource is the entity managed by a JMX MBean.

An MBean is a java class that meets certain naming and inheritance standards dictated by the JMX specification. Instantiated MBean are java objects that expose management interfaces for the manipulation and access of manageable resources. An MBean 's management interface is made up of the MBean's attributes and operations that are exposed for management.

Management applications access MBeans to access attributes and invoke operations.MBeans reside in another JMX component called the MBean server.

An MBean server is a jave class that manages a group of MBeans. It is the heart of the JMX management environment----it acts as a registry for looking up MBeans.

A JMX agent is a jave process that provides a set of services for managing  a set of MBeans---it is the container for an MBean sercer. JMX agents provide services for creating MBean relationship, dynamically loading classes,simple monitoring services and timers.

Agent can expect to have a set  of protocol adapters and connectors that enable remote and different clients to make use of the agent. Protocol adapters and connectors are java classes,usually MBeans,which can internally map an outside protocol or expose the agent to remote connectivity. This means JMX agents can be used by a variety of different management protocols and tools.

Protocol adapters and connectors are objects residing within a JMX agent that expose the agent to management application and protocols. An agent can have any number of adapters and connectors ,essentially giving you the ability to reach the agent using new tools or existing management protocols and applications.

A management application is any user application that is used to interface to any number of JMX  agents. JMX  agentsx can work with management applications designed to work with JMX technology ot those that are not.

The instrumentation layer is the closest layer to the managed resource. It comprises the MBeans registered in an agent. The MBean allows the resource to be managed through the use of the JMX agent. Each MBean exposed a piece of the configuration or functionality of an underlying resource; the MBean exposes the management capabilities of the resource in a java object.

MBean is a lightweight class that knows how to use ,acquire, and manipulate its resource in order to provide access or functionality to the agent and user.

JMX notifications are java objects used to send information from MBeans and agents to other objects that have registered to receive them. Object interested in receiving events are notification listers--they implement the javax.management.NotificationLister interface.

Every tag library has something called a Universal Resource Identifier associated with it. It simply acts as a way of differentiating one tag library from another. To use a tag library in a jsp page, you should know its URI, which you can usually determine from the author or provider of the library. The core library includes tags for the following uses: accessing and modifying data in memory; making decision in your pages; looping over data. The XML library includes tags for the following purposes: parsing XML document; printing parts of XML document; making decision in your page based on the contents of an XML document. The formatting and internationalization library includes tags for these uses:reading and printing numbers; reading and printing data;helping your application work with more than one language. The SQL library helps you read and write data from database.


AOP is a new methodology that provides separation of crosscutting concerns by introducinf a new unit of modularization --an aspect--that crosscuts other modules. With AOP, you implement crosscutting concerns in aspects instead of fusing them in the core modules. An aspect weaver ,which is a compiler-like enetity, composes the final system by combining the core and crosscutting modules through a process called weaving.

AspectJ是通用的、面向切面的Java编程语言。AspectJ是对Java语言的拓展,每一个有效的Java程序都是有效的AspectJ程序。AspectJ编译器编译的java类文件符合Java字节码的规范,可以在任何java虚拟机中运行。AspectJ包含两部分:语言规范和语言实现。动态切面补充或者替代核心程序;静态切面是将修改程序植入静态结构中。静态切面不改变系统的执行行为。静态切面的最常见功能是支持动态切面的实现。joint point是在程序执行过程中的一个标示点;它可以是一个方法的调用或者对象成员变量的赋值,在AspectJ中,所有的东西都围绕joint point展开,joint point是切面植入的地方。pointcut是选择join point和收集join point上下文;adivce是在在被point cut选择的Join point执行的代码。advice可以在join point之前、之后和之中执行。之中的advice能够修改在join point执行的代码,也可以替代或者跳过join point的代码。aspect是AspectJ的核心单元就像类是java的核心单元一样。它包含表述植入规则的代码,pointcut,advice,introductions和declarations都包含在aspect中;aspect的申明与类的申明非常的相似:

[access specification] aspect <AspectName> [extend class-or aspect-name] [implements interface-list]
[<association-specifier>(PointCut)] { aspect body }

不管是有名pointcut还是匿名pointcut,它的功能都由pointcut的定义部分来实现,piontcut定义部分包含了识别join point的语句。AspectJ利用通配符来构建pointcut以便捕获具有共同特征的join points。通配符的表示有这些:
*代表除了.之外的任何数量的字符;
..代表任何数量的字符;
+表示给定类型的所有子接口或者子类。

advice的实现常常需要访问join point处的数据;pointcut需要暴露执行点的上下文从而使得上下文信息可以传递给advice实现。AspectJ提供了this(),target()和args()等pointcut来收集上下文信息;

原创粉丝点击