@common:context Annotation

The @common:context annotation specifies that WebLogic Server should create a context for the component (e.g., a web service or a control). The context ensures that conversations between the component and a client are correlated correctly and that the component's state is maintained. The @common:context annotation precedes the declaration of the context object; the type of the context object depends on the container you are using. For web services, the context object is of type JwsContext; for controls, ControlContext. Other components may provide their own context objects.

Note: In WebLogic Workshop 7.0, web service context was designated with the @jws:context annotation. This annotation is still supported in JWS files for backward compatibility.

Syntax

@common:context

Attributes

None.

Remarks

The following rules apply to this annotation's use:

For example, the annotation and instance declaration for the JwsContext object appear as follows:

 /** @common:context */ 
    JwsContext context; 

If the @common:context annotation is not present on the instance declaration, the component that defines it will not function properly.

Related Topics

JwsContext Interface

Structure of a JWS File