diff options
Diffstat (limited to 'TAO/CIAO/DAnCE/ciao/CCM_Container.idl')
-rw-r--r-- | TAO/CIAO/DAnCE/ciao/CCM_Container.idl | 155 |
1 files changed, 155 insertions, 0 deletions
diff --git a/TAO/CIAO/DAnCE/ciao/CCM_Container.idl b/TAO/CIAO/DAnCE/ciao/CCM_Container.idl new file mode 100644 index 00000000000..0b7d23562fc --- /dev/null +++ b/TAO/CIAO/DAnCE/ciao/CCM_Container.idl @@ -0,0 +1,155 @@ +// $Id$ + +/** + * @@ Compile this file with: + * + * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ + * -Wb,export_macro=CIAO_Export \ + * -Wb,export_include=CIAO_export.h \ + * -Wb,pre_include="ace/pre.h" \ + * -Wb,post_include="ace/post.h" \ + * CCM_Container.idl + */ + +//#define CIAO_HAS_IMPORT_KEYWORD + +#if !defined (CCM_CONTAINER_IDL) +#define CCM_CONTAINER_IDL + +#include "CCM_Component.idl" +#include "orbsvcs/orbsvcs/SecurityLevel2.idl" +#include "CCM_Transaction.idl" + +// *************** Basic Container interfaces *************** + +module Components +{ + typeprefix Components "omg.org"; + + typedef SecurityLevel2::Credentials Principal; + + local interface CCMContext + { + Principal get_caller_principal(); + + CCMHome get_CCM_home(); + + boolean get_rollback_only() + raises (IllegalState); + + Transaction::UserTransaction get_user_transaction() + raises (IllegalState); + + boolean is_caller_in_role (in string role); + + void set_rollback_only() + raises (IllegalState); + }; + + enum CCMExceptionReason + { + SYSTEM_ERROR, + CREATE_ERROR, + REMOVE_ERROR, + DUPLICATE_KEY, + FIND_ERROR, + OBJECT_NOT_FOUND, + NO_SUCH_ENTITY + }; + + exception CCMException + { + CCMExceptionReason reason; + }; + + local interface EnterpriseComponent {}; + + local interface SessionContext : CCMContext + { + Object get_CCM_object() + raises (IllegalState); + }; + + local interface SessionComponent : EnterpriseComponent + { + void set_session_context ( in SessionContext ctx) + raises (CCMException); + + void ccm_activate() + raises (CCMException); + + void ccm_passivate() + raises (CCMException); + + /// The following two methods are CIAO specific extension. + /** + * This method is invoked before ccm_activate () is called. All + * components in the assembly get this callback before the + * ccm_activate () is called. + */ + void ciao_preactivate () + raises (CCMException); + + /** + * This method is invoked after ccm_activate () is called. All + * components in the assembly get this callback after the + * ccm_activate () is called. + */ + void ciao_postactivate () + raises (CCMException); + + void ccm_remove () + raises (CCMException); + }; + + local interface SessionSynchronization + { + void after_begin () + raises (CCMException); + + void before_completion () + raises (CCMException); + + void after_completion (in boolean committed) + raises (CCMException); + }; + + local interface EntityContext : CCMContext + { + Object get_CCM_object () + raises (IllegalState); + + PrimaryKeyBase get_primary_key () + raises (IllegalState); + }; + + local interface EntityComponent : EnterpriseComponent + { + void set_entity_context (in EntityContext ctx) + raises (CCMException); + + void unset_entity_context () + raises (CCMException); + + void ccm_activate () + raises (CCMException); + + void ccm_load () + raises (CCMException); + + void ccm_store () + raises (CCMException); + + void ccm_passivate () + raises (CCMException); + + void ccm_remove () + raises (CCMException); + }; + + + local interface HomeExecutorBase + { + }; +}; +#endif /* CCM_CONTAINER_IDL */ |