OSGI &&&&& SPRING

来源:互联网 发布:mac绕过百度网盘 编辑:程序博客网 时间:2024/06/10 00:50

Spring security provides  a set of servlet filters to perform various of security services for web application. A portal is a web site that

collects information from different sources and presents it to users in a unified, centralized and personalized way.     A portlet is a

servlet like web component technology that can process requests and generate responses dynamically. There are two main

approaches to developing web services:contract-first and contract -last.  Automatically exposing a bean from the Ioc container as a

web service means that the service is contract-last because the service contact is generated from an existing bean.The spring team

has created a subproject called spring web servcise which focuses on the development of contract-first web services. In this approach,

a service.

Springs comes with several service exporters that can export a bean as a remote service based on the RMI, Hessian, Burlap, or HTTP

invoker remoting technologies, but spring does not come with a service exporter that can export a bean as a web service. However,

there is an external library called xfire that supplies one. Xfire is an open source java soap framework that can export a simple java

object as a web service. Xfire supports spring by providing facilities such as a service exporter and a client proxy factory bean, whose

usage is consistent with those provided by spring for other remoting technologies.

data contract: descirble the complex data types and request and response messages of this web service. A data contract is defined

with xsd.

service contract: describes the operations of this web service. A web service may have multiple operations. A service contract is

defined with wsdl.

When using a comprehensive web service development framework like spring-ws, the service contract can usually be generated

automatically. To create the data contract for your web service, you can start by creating the xsd file.


The most common endpoint mapping is PayLoadRootQNameEndpointMapping. It maps web service requests to endpoints according

to the name of the request payload's root element. The element used by this endpoint mapping is the qualified name.

Spring-ws supports various xml parsing apis, including dom, jdom, dom4j, sax, stax and xom.


dwr supports spring by allowing you to expose spring beans for remote invocation via its spring creator. moreover, dwr2.0 offers an

xml schema for spring that enables you to configure dwr inside spring's bean configuration file. You can simply configure which beans

to expose for remote invocation by embedding the <dwr:remote>tag without involving the dwr configuratuon file.

Intra-server remoting: communication between various processes within the same server system. The makor interfaces and

implementations of acegi security's authentication services is the authentication, which contains the identity of the principal, its

credentials, and the grantedauthoritys the principal has obtained. GrantedAuthority is an interface and implementations can have any

meaning appropriate to the application. The GrantedAuthorityImpl is typically used as it stores a String representation of an authority

the principal has been granted.

There are many AuthenticationProviders, each devoted to processing a particular Authentication concrete implementation. The

asynchronous version of our service definition interface must have the same methods as the synchronous interface, except for the

requirement that all of its methods must have an AsynCallback object as a parameter., and the method may not return anything.The

callback object acts as the binding between the client and the server. Once  an asychronous call is made by the client, the

notification,when the call completes its processing on the server side is made through this callback object.

There are two general patterns for using jpa in a gwt environment. The first is to JPA-enable a model shared between the  client and

the server. The second is to create a set of DTOs that are suitable for use on the client and convert them in the service to something

suitable for use on the server.


Java archive files are often though of as the unit of mudularity in java. Unfortunately, however, jar files give only a thin illusion of

modularity. Once a jar is placed into the classpath, the jar boundaries dissolve-along with any notion of modularity.


osgi is a component framework specification that brings modularity to the java platform. osgi enables the creation of highly

cohesive,loosely coupled modules that can be composed into larger applications.

At its lowest level, the osgi specification defines a deployement model for java-based modules. The unit of deployment in osgi is

known as a bundle. Rather than create a completely new deployment mechanism, osgi leverages the existing jar file format for

bundles. osgi bundles are much like common jar files,except that their meta-info file contain osgi-specification metadat, including a

definitive name, version, dependencies and other deployment details.

Once a bundle is installed into an osgi framework , the osgi life cycle govers the status of the bundle. A bundle can be installed,

started, stopped, and uninstalled from the framework, following the life cycle prescribled by the osgi specification.

osgi also provides a service registry, with which bundles may publish and or consume services. osgi's service registry enables a form

of service -oriented architecture. However, unlike many interpretations of soa, which rely on web services for  communication, osgi

services are published and consumed within the same jave virtual machines.Thus osgi is sometimes describled as soa in a jvm.


In osgi, each bundle is loaded into its own class space.Consequently, the content of a bundle are private unless explicitly exported.

原创粉丝点击