Interface ManagedConversation

  • All Superinterfaces:
    jakarta.enterprise.context.Conversation

    public interface ManagedConversation
    extends jakarta.enterprise.context.Conversation

    Provides management operations for conversations, including locking, and expiration management.

    Author:
    Pete Muir
    See Also:
    ConversationContext
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long getLastUsed()
      Gets the last time the conversation was used (for data access)
      boolean lock​(long timeout)
      Attempts to lock the conversation for exclusive usage
      void touch()
      Touches the managed conversation, updating the "last used" timestamp
      boolean unlock()
      Attempts to unlock the conversation
      • Methods inherited from interface jakarta.enterprise.context.Conversation

        begin, begin, end, getId, getTimeout, isTransient, setTimeout
    • Method Detail

      • unlock

        boolean unlock()
        Attempts to unlock the conversation
        Returns:
        true if the unlock was successful, false otherwise
        Throws:
        jakarta.enterprise.context.ContextNotActiveException - if the conversation context is not active
      • lock

        boolean lock​(long timeout)
        Attempts to lock the conversation for exclusive usage
        Parameters:
        timeout - The time in milliseconds to wait on the lock
        Returns:
        True if lock was successful, false otherwise
        Throws:
        jakarta.enterprise.context.ContextNotActiveException - if the conversation context is not active
      • getLastUsed

        long getLastUsed()
        Gets the last time the conversation was used (for data access)
        Returns:
        time (in ms) since the conversation was last used
        Throws:
        jakarta.enterprise.context.ContextNotActiveException - if the conversation context is not active
      • touch

        void touch()
        Touches the managed conversation, updating the "last used" timestamp
        Throws:
        jakarta.enterprise.context.ContextNotActiveException - if the conversation context is not active