JwsContext.setMaxAge(Date) Method

Sets a conversation's maximum age by specifying a time in seconds.

# Syntax

    public void setMaxAge(java.util.Date date)

# Parameters

date

The time after which the conversation will finish. If the date value is null, the age timeout will be disabled.

# Return Value

None.

# Exceptions

IllegalStateException

Thrown if the method is called from a service instance that is not conversational.

IllegalArgumentException

Thrown to indicate that a method has been passed an illegal or inappropriate argument.

# Remarks

Calling the setMaxAge method from your service's code sets the maximum conversation age (relative to the current time) for that service instance. The date parameter marks the time after which the WebLogic Server will be allowed to finish this conversation. Note that setting the maximum age with the setMaxAge method overrides the default setting or the setting given in the service's JWS file. This is an absolute age that isn't affected by network traffic.

If the date value results in zero seconds, the maximum age timeout will be disabled. If the date value is in the past, the conversation will finish immediately.

Related Topics

JwsContext.setMaxAge(String) Method

JwsContext.getMaxAge() Method

JwsContext.getCurrentAge() Method

Managing Conversation Lifetime