Classes and Interfaces (Remote/Home): Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
---- |
---- |
||
A session bean is a component that implements some business logic running on the server. An entity bean is a component that represents an object-oriented view of some entities stored in a persistent storage, such as a database, or entities that are implemented by an existing enterprise application. The client of a session bean or an entity bean may be a remote client or it may be a local client, depending on whether the client makes use of the enterprise bean |
A session bean is a component that implements some business logic running on the server. An entity bean is a component that represents an object-oriented view of some entities stored in a persistent storage, such as a database, or entities that are implemented by an existing enterprise application. The client of a session bean or an entity bean may be a remote client or it may be a local client, depending on whether the client makes use of the enterprise bean's remote or local client view interfaces. The client of a stateless session bean may be a web service client. A web service client makes use of the enterprise bean's web service client view corresponding to the web service endpoint interface, as described by a WSDL document. |
||
---- |
---- |
||
*Remote Client |
|||
---- |
|||
A remote client accesses a session bean or an entity bean through the bean s remote interface and remote home interface. The remote and remote home interfaces of the bean provide the remote client view. The remote client view of an enterprise bean is location independent. A client running in the same JVM as a bean instance uses the same API to access the bean as a client running in a different JVM on the same or different machine. The remote and remote home interfaces are Java" RMI interfaces. The container provides classes that implement the bean s remote and remote home interfaces. The objects that implement the remote home and remote interfaces are remote Java objects, and are accessible from a client through the standard Java RMI APIs [3]. The arguments and results of the methods of the remote interface and remote home interface are passed by value. A remote client can be another enterprise bean deployed in the same or different container; or a remote client can be an arbitrary Java program, such as an application, applet, or servlet. The remote client view can also be mapped to non-Java client environments, such as CORBA clients not written in the Java programming language. |
|||
---- |
|||
*Local Client |
|||
---- |
|||
Session and entity beans may have local clients. A local client is a client that is collocated in the same JVM with the session or entity bean that provides the local client view and which may be tightly coupled to the bean. A local client of a session bean or an entity bean may be another enterprise bean (a session bean, entity bean, or message-driven bean) or a web component. Unlike the remote client view, the local client view of a bean is not location independent. Access to an enterprise bean through the local client view requires the collocation in the same JVM of both the local client and the enterprise bean that provides the local client view. The local client view therefore does not provide the location transparency provided by the remote client view. A local client accesses a session or an entity bean through the bean s local interface and local home interface. The container provides classes that implement the bean s local and local home interfaces. The objects that implement the local home interface and local interface are local Java objects. The arguments and results of the methods of the local interface and local home interface are passed by reference [2]. Enterprise beans that provide a local client view should therefore be coded to assume that the state of any Java object that is passed as an argument or result is potentially shared by caller and callee. |
|||
---- |
|||
*Web Service Clients |
|||
---- |
|||
Stateless session beans may have web service clients. A web service client accesses a stateless session bean through the web service client view. The web service client view is described by the WSDL document for the web service that the bean implements. WSDL is an XML format for describing a web service as a set of endpoints operating on messages. The abstract description of the service is bound to an XML based protocol (SOAP 1.1) and underlying transport (HTTP or HTTPS) by means of which the messages are conveyed between client and server. The web service client view provided by a stateless session bean corresponds to the bean s web service endpoint interface. The web service endpoint interface of the bean provides the basis of the web service client view of the bean that is exported through WSDL. |
|||
Stateless session beans may have web service clients. A web service client accesses a stateless session bean through the web service client view. The web service client view is described by the WSDL document for the web service that the bean implements. WSDL is an XML format for describing a web service as a set of endpoints operating on messages. The abstract description of the service is bound to an XML based protocol (SOAP 1.1) and underlying transport (HTTP or HTTPS) by means of which the messages are conveyed between client and server. The web service client view provided by a stateless session bean corresponds to the bean s web service endpoint interface. The web service endpoint interface of the bean provides the basis of the web service client view of the bean that is exported through WSDL. |
Latest revision as of 08:59, 8 February 2005
Overview
A session bean is a component that implements some business logic running on the server. An entity bean is a component that represents an object-oriented view of some entities stored in a persistent storage, such as a database, or entities that are implemented by an existing enterprise application. The client of a session bean or an entity bean may be a remote client or it may be a local client, depending on whether the client makes use of the enterprise bean's remote or local client view interfaces. The client of a stateless session bean may be a web service client. A web service client makes use of the enterprise bean's web service client view corresponding to the web service endpoint interface, as described by a WSDL document.