JAX-WS Common Annotations (JSR 250)
The JSR 250 specification includes annotations for injecting a resource into an endpoint implementation class, and for managing application lifecycle.
Note: The Java™ class
that contains each annotation in the JSR 250 standard is named javax.annotation.xxx,
where xxx is the name of the annotation after the '@' character.
For example, the Java class
name for the annotation @Resource is javax.annotation.resource.
Name: | Description: | Properties: | Definitions: |
---|---|---|---|
@Resource | This annotation marks a WebServiceContext resource
that the application needs. Apply this annotation to a service endpoint implementation class for a JavaBeans endpoint or a Provider endpoint. The container injects an instance of the WebServiceContext resource into the endpoint implementation when it is initialized. |
|
|
@PostConstruct | This annotation marks a method that must be
executed after dependency injection is performed on the class. Apply this annotation to a JAX-WS application handler, a service endpoint implementation class for a JavaBeans endpoint or a Provider endpoint. |
|
|
@PreDestroy | This annotation marks a method that must be
executed when the instance is in the process of being removed by the
container. Apply this annotation to a JAX-WS application handler, a service endpoint implementation class for a JavaBeans endpoint or a Provider endpoint. |
|
|