Chapter 3 Service Endpoint Design
69
endpoint, on the other hand, you must do the synchronization yourself in the
source code.
E
A JAX RPC service endpoint has to handle concurrent client access on its own,
whereas the EJB container takes care of concurrent client access for an EJB
service endpoint.
Transaction considerations
The transactional context of the service imple
mentation's container determines the transactional context in which a service
implementation runs. Since a JAX RPC service endpoint runs in a Web con
tainer, its transactional context is unspecified. There is also no declarative
means to automatically start the transaction. Thus, you need to use JTA to ex
plicitly demarcate the transaction.
On the other hand, an EJB service endpoint runs in the transaction context of
an EJB container. You as the developer need to declaratively demarcate trans
actions. The service's business logic thus runs under the transactional context
as defined by the EJB's
container transaction
element in the deployment
descriptor.
E
If the Web service's business logic requires using transactions (and the service
has a JAX RPC service endpoint), you must implement the transaction
handling logic using JTA or some other similar facility. If your service uses an
EJB service endpoint, you can use the container's declarative transaction
services. By doing so, the container is responsible for handling transactions
according to the setting of the deployment descriptor element
container
transaction
.
Considerations for method level access permissions
A Web service's
methods can be accessed by an assortment of different clients, and you may
want to enforce different access constraints for each method.
E
When you want to control service access at the individual method level, con
sider using an EJB service endpoint rather than a JAX RPC service endpoint.
Enterprise beans permit method level access permission declaration in the de
ployment descriptor you can declare various access permissions for different
enterprise bean methods and the container correctly handles access to these
methods. This holds true for an EJB service endpoint, since it is a stateless ses
footer
Our web partners:
Inexpensive
Web Hosting
Java Web Hosting
personal webspace
webspace php
linux webhost
html web templates
DreamweaverQuality Web Templates
PSD Web Templates
cheap webhost
j2ee web Hosting
buy webspace
ftp webspace
adult webspace
frontpage WebHosting
webspace hosting
cheap webhost
Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved
webhosting