uCosminexus Application Server, Web Service Development Guide
![[Contents]](FIGURE/CONTENT.GIF)
![[Glossary]](FIGURE/GLOSS.GIF)
![[Index]](FIGURE/INDEX.GIF)
![[Back]](FIGURE/FRONT.GIF)
This section describes the conditions for invoking EJB as a Web Service and available functions.
The EJB conditions are as follows:
- EJB version
You can invoke EJB 3.0 or later versions as a Web Service.
- EJB type
You can invoke EJB of stateless session Bean as a Web Service.
- Interface
Business interface need not be provided in a EJB Web Service. You can share and use the home interface.
When the EJB Web Service includes business interface, home interface, and component interface, you cannot invoke the method via Web Service through these interfaces.
When EJB Web Service includes business interface, you can locally invoke EJB for the EJB Web Service. However, when the EJB Web Service does not include a business interface, you can invoke the EJB Web Service as a Web Service; however, you cannot invoke as an EJB.
You can invoke the home interface as a Web Service only when it is specified by the javax.ejb.RemoteHome or the javax.ejb.LocalHome annotation. You cannot invoke the home interface as a Web Service if the home interface is specified by DD.
- Organization of this section
- (1) EJB functions in EJB Web Service invocation
- (2) Application Server functions available when invoking EJB Web Service
(1) EJB functions in EJB Web Service invocation
The following are the EJB functions that can be used concurrently when invoking the EJB as a Web Service. However, you can use these functions only in the EJB Web Service Implementation Class and not in a Handler Chain.
- Using interceptor
- CMT and BMT transaction management
- Access management by the javax.annotation.security.PermitAll and the javax.annotation.security.DenyAll annotation
- Resource connection
- Injecting a Web Services context by using the javax.annotation.Resource annotation
For details on injecting a Web Services context, see 10.21.2 Injecting a Web Services context.
- Timer Service
The following functions cannot be used concurrently when invoking the EJB as a Web service.
- Inheriting transaction context from client
- Inheriting security context from client
(2) Application Server functions available when invoking EJB Web Service
JAX-WS can concurrently use Application Server functions that can be set by using cosminexus.xml when invoking EJB as a Web Service. The following are the available Application Server functions:
- Setting the number of concurrently executed threads.
- Setting the pending queue size
- Setting the security role
Set the WAR file name for using these functions. For the WAR file name settings, see 3.5.4(3) Name of the WAR file for settings. Note that you can use the functions for settings other than the cosminexus.xml settings, in Web applications other than the EJB Web Services.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.