이 콘텐츠는 선택한 언어로 제공되지 않습니다.

10.2.5. JBoss Transaction Service Method Reference


The JBoss Transaction Service class StateManager manages the state of objects and provides all of the basic support mechanisms required for recovery, persistence, or both. Some operations must be defined by you. These operations are: save_state, restore_state, and type.
boolean save_state(OutputObjectState state, int ObjectType)
Invoked to save the state of an object for future use, for recovery or persistence. The ObjectType parameter indicates the reason for invocation. This allows you to save different pieces of information into the OutputObjectState supplied as the first parameter, depending on whether recovery or persistence is desired. For example, pointers to other JBoss Transaction Service objects may be saved as pointers for recovery, but as UIDs for persistence. The OutputObjectState class provides convenient operations, so that you can save instances of all of the basic types in Java. To support crash recovery for persistent objects all save_state methods need to call super.save_state.

Note

The save_state method assumes that an object is internally consistent and that all variables saved have valid values. Write and test your code to be sure this is true.
boolean restore_state(InputObjectState state, int ObjectType)
Restores an object to the specified state. The second parameter allows different interpretations of the supplied state. To support crash recovery for persistent objects all restore_state methods need to call super.restore_state.
String type ()
The JBoss Transaction Service persistence mechanism needs a way to determine the type of an object as a string, so that it can save and restore the state of the object. By convention, the position of the class in the hierarchy is used. For example, StateManager/LockManager/Object.

Note

The type method determines the location of the state of instanes of a specified class are saved into the object store. This can actually be any valid string. However, avoid using the hash character #, which is reserved for special directories required by JBoss Transaction Service.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat