1. /*
  2. * @(#)ORBConstants.java 1.52 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.corba.se.internal.orbutil;
  8. import com.sun.corba.se.internal.util.SUNVMCID ;
  9. public interface ORBConstants {
  10. public static final int SUN_FIRST_SERVICE_CONTEXT = 0x4e454f00 ;
  11. public static final int NUM_SUN_SERVICE_CONTEXTS = 15 ;
  12. // All Sun service contexts must be in the range SUN_FIRST_SERVICE_CONTEXT to
  13. // SUN_FIRST_SERVICE_CONTEXT + NUM_SUN_SERVICE_CONTEXTS - 1
  14. public static final int TAG_ORB_VERSION = SUN_FIRST_SERVICE_CONTEXT ;
  15. // All Sun policies are allocated using the SUNVMCID, which is also
  16. // used for minor codes. This allows 12 bits of offset, so
  17. // the largest legal Sun policy is SUNVMCID.value + 4095.
  18. public static final int SERVANT_CACHING_POLICY = SUNVMCID.value + 0 ;
  19. // These are the subcontract IDs for various qualities of
  20. // service/implementation.
  21. // Transactional SCIDs have the first bit as 1.
  22. // Persistent SCIDs have the second bit as 1.
  23. // SCIDs less than FIRST_POA_SCID are JavaIDL SCIDs.
  24. public static final int FIRST_POA_SCID = 32;
  25. public static final int MAX_POA_SCID = 63;
  26. public static final int TransientSCID = FIRST_POA_SCID ;
  27. public static final int PersistentSCID = FIRST_POA_SCID | 0x2;
  28. public static final int SCTransientSCID = FIRST_POA_SCID + 4 ;
  29. public static final int SCPersistentSCID = (FIRST_POA_SCID + 4 ) | 0x2;
  30. public static final int TransientTransactionSCID = FIRST_POA_SCID | 0x1;
  31. public static final int PersistentTransactionSCID = FIRST_POA_SCID | 0x3;
  32. public static final int DefaultSCID = ORBConstants.TransientSCID;
  33. // Constants for ORB Classes supported by SUN's ORB
  34. // Transient Objects supported by IIOP ORB
  35. public static final String IIOP_ORB_NAME = "com.sun.corba.se.internal.iiop.ORB";
  36. // Transient Name Service uses NSORB
  37. public static final String NS_ORB_NAME = "com.sun.corba.se.internal.CosNaming.NSORB";
  38. // Persistent Objects supported by POA ORB
  39. public static final String POA_ORB_NAME = "com.sun.corba.se.internal.POA.POAORB";
  40. // Portable interceptors
  41. public static final String PI_ORB_NAME =
  42. "com.sun.corba.se.internal.Interceptors.PIORB";
  43. // Transactional Persistent Objects supported by Transactional POA ORB
  44. public static final String TRANS_POA_ORB_NAME = "com.sun.corba.se.internal.TransactionalPOA.TransactionalPOAORB";
  45. // Constants for Subcontract classes supported by SUN's ORB's
  46. // Constants for Subcontacts in POA ORB
  47. public static final String GenericPOAServer = "com.sun.corba.se.internal.POA.GenericPOAServerSC";
  48. public static final String GenericPOAClient = "com.sun.corba.se.internal.POA.GenericPOAClientSC";
  49. public static final String ServantCachePOAClient = "com.sun.corba.se.internal.POA.ServantCachePOAClientSC";
  50. // Constants for Subcontacts in Transactional POA ORB
  51. public static final String TransactionalPOAServer = "com.sun.corba.se.internal.TransactionalPOA.TransactionalServerSC";
  52. // Constants for ORB properties **************************************************************
  53. // All ORB properties must follow the following rules:
  54. // 1. Property names must start with either OMG_PREFIX or SUN_PREFIX.
  55. // 2. Property names must have unique suffixes after the last ".".
  56. // 3. Property names must have "ORB" as the first 3 letters in their suffix.
  57. // 4. proprietary property names should have a subsystem where appropriate after the prefix.
  58. // org.omg.CORBA properties must be defined by OMG standards
  59. // The well known org.omg.CORBA.ORBClass and org.omg.CORBA.ORBSingletonClass are not included here
  60. // since they occur in org.omg.CORBA.ORB.
  61. public static final String OMG_PREFIX = "org.omg.CORBA." ;
  62. public static final String INITIAL_HOST_PROPERTY = OMG_PREFIX + "ORBInitialHost" ;
  63. public static final String INITIAL_PORT_PROPERTY = OMG_PREFIX + "ORBInitialPort" ;
  64. public static final String INITIAL_SERVICES_PROPERTY = OMG_PREFIX + "ORBInitialServices" ;
  65. public static final String DEFAULT_INIT_REF_PROPERTY = OMG_PREFIX + "ORBDefaultInitRef" ;
  66. public static final String ORB_INIT_REF_PROPERTY = OMG_PREFIX + "ORBInitRef" ;
  67. // All of our proprietary properties must start with com.sun.CORBA
  68. public static final String SUN_PREFIX = "com.sun.CORBA." ;
  69. // general properties
  70. public static final String ALLOW_LOCAL_OPTIMIZATION = SUN_PREFIX + "ORBAllowLocalOptimization" ;
  71. public static final String SERVER_PORT_PROPERTY = SUN_PREFIX + "ORBServerPort" ;
  72. public static final String SERVER_HOST_PROPERTY = SUN_PREFIX + "ORBServerHost" ;
  73. public static final String ORB_ID_PROPERTY = SUN_PREFIX + "ORBid" ;
  74. public static final String DEBUG_PROPERTY = SUN_PREFIX + "ORBDebug" ;
  75. // giop related properties - default settings in decimal form
  76. public static final String GIOP_VERSION = SUN_PREFIX + "giop.ORBGIOPVersion" ;
  77. public static final String GIOP_FRAGMENT_SIZE = SUN_PREFIX + "giop.ORBFragmentSize" ;
  78. public static final String GIOP_BUFFER_SIZE = SUN_PREFIX + "giop.ORBBufferSize" ;
  79. public static final String GIOP_11_BUFFMGR = SUN_PREFIX + "giop.ORBGIOP11BuffMgr";
  80. public static final String GIOP_12_BUFFMGR = SUN_PREFIX + "giop.ORBGIOP12BuffMgr";
  81. public static final String GIOP_TARGET_ADDRESSING = SUN_PREFIX + "giop.ORBTargetAddressing";
  82. public static final int GIOP_DEFAULT_FRAGMENT_SIZE = 1024;
  83. public static final int GIOP_DEFAULT_BUFFER_SIZE = 1024;
  84. public static final int DEFAULT_GIOP_11_BUFFMGR = 0; //Growing
  85. public static final int DEFAULT_GIOP_12_BUFFMGR = 2; //Streaming
  86. public static final short ADDR_DISP_OBJKEY = 0; // object key used for target addressing
  87. public static final short ADDR_DISP_PROFILE = 1; // iop profile used for target addressing
  88. public static final short ADDR_DISP_IOR = 2; // ior used for target addressing
  89. public static final short ADDR_DISP_HANDLE_ALL = 3; // accept all target addressing dispositions (default)
  90. // CORBA formal 00-11-03 sections 15.4.2.2, 15.4.3.2, 15.4.6.2
  91. // state that the GIOP 1.2 RequestMessage, ReplyMessage, and
  92. // LocateReply message bodies must begin on 8 byte boundaries.
  93. public static final int GIOP_12_MSG_BODY_ALIGNMENT = 8;
  94. // The GIOP 1.2 fragments must be divisible by 8. We generalize this
  95. // to GIOP 1.1 fragments, as well.
  96. public static final int GIOP_FRAGMENT_DIVISOR = 8;
  97. public static final int GIOP_FRAGMENT_MINIMUM_SIZE = 32;
  98. // connection management properties
  99. public static final String HIGH_WATER_MARK_PROPERTY = SUN_PREFIX + "connection.ORBHighWaterMark" ;
  100. public static final String LOW_WATER_MARK_PROPERTY = SUN_PREFIX + "connection.ORBLowWaterMark" ;
  101. public static final String NUMBER_TO_RECLAIM_PROPERTY = SUN_PREFIX + "connection.ORBNumberToReclaim" ;
  102. public static final String SOCKET_FACTORY_CLASS_PROPERTY = SUN_PREFIX + "connection.ORBSocketFactoryClass" ;
  103. public static final String LISTEN_SOCKET_PROPERTY = SUN_PREFIX + "connection.ORBListenSocket";
  104. // POA related policies
  105. public static final String PERSISTENT_SERVER_PORT_PROPERTY = SUN_PREFIX + "POA.ORBPersistentServerPort" ;
  106. public static final String SERVER_ID_PROPERTY = SUN_PREFIX + "POA.ORBServerId" ;
  107. public static final String BAD_SERVER_ID_HANDLER_CLASS_PROPERTY
  108. = SUN_PREFIX + "POA.ORBBadServerIdHandlerClass" ;
  109. public static final String ACTIVATED_PROPERTY = SUN_PREFIX + "POA.ORBActivated" ;
  110. public static final String SERVER_NAME_PROPERTY = SUN_PREFIX + "POA.ORBServerName" ;
  111. // Server Properties; e.g. when properties passed to ORB activated
  112. // servers
  113. public static final String SERVER_DEF_VERIFY_PROPERTY = SUN_PREFIX + "activation.ORBServerVerify" ;
  114. // This one is an exception, but it may be externally visible
  115. public static final String SUN_LC_PREFIX = "com.sun.corba." ;
  116. // Necessary for package renaming to work correctly
  117. public static final String SUN_LC_VERSION_PREFIX = "com.sun.corba.se.";
  118. public static final String JTS_CLASS_PROPERTY = SUN_LC_VERSION_PREFIX + "CosTransactions.ORBJTSClass" ;
  119. // Constants for ORB prefixes **************************************************************
  120. public static final String PI_ORB_INITIALIZER_CLASS_PREFIX =
  121. "org.omg.PortableInterceptor.ORBInitializerClass.";
  122. // Constants for NameService properties ************************************
  123. public static final int DEFAULT_INITIAL_PORT = 900;
  124. // Constants for INS properties ********************************************
  125. // GIOP Version number for validation of INS URL format addresses
  126. public static final int MAJORNUMBER_SUPPORTED = 1;
  127. public static final int MINORNUMBERMAX = 2;
  128. // Subcontract's differentiation using the TRANSIENT and PERSISTENT
  129. // Name Service Property.
  130. public static final int TRANSIENT = 1;
  131. public static final int PERSISTENT = 2;
  132. // Constants for ORBD properties ****************************************************************
  133. // These properties are never passed on ORB init: they are only passed to ORBD.
  134. public static final String DB_DIR_PROPERTY = SUN_PREFIX + "activation.DbDir" ;
  135. public static final String DB_PROPERTY = SUN_PREFIX + "activation.db" ;
  136. public static final String ORBD_PORT_PROPERTY = SUN_PREFIX + "activation.Port" ;
  137. public static final String SERVER_POLLING_TIME = SUN_PREFIX + "activation.ServerPollingTime";
  138. public static final String SERVER_STARTUP_DELAY = SUN_PREFIX + "activation.ServerStartupDelay";
  139. public static final int DEFAULT_ACTIVATION_PORT = 1049 ;
  140. // If RI is starting the NameService then they would indicate that by
  141. // passing the RI flag. That would start a Persistent Port to listen to
  142. // INS request.
  143. public static final int RI_NAMESERVICE_PORT = 1050;
  144. public static final int DEFAULT_SERVER_POLLING_TIME = 1000;
  145. public static final int DEFAULT_SERVER_STARTUP_DELAY = 1000;
  146. // Constants for initial references *************************************************************
  147. public static final String TRANSIENT_NAME_SERVICE_NAME = "TNameService" ;
  148. public static final String PERSISTENT_NAME_SERVICE_NAME = "NameService" ;
  149. // A large Number to make sure that other ServerIds doesn't collide
  150. // with NameServer Persistent Server Id
  151. public static final int NAME_SERVICE_SERVER_ID = 100000;
  152. public static final String ROOT_POA_NAME = "RootPOA" ;
  153. public static final String POA_CURRENT_NAME = "POACurrent" ;
  154. public static final String SERVER_ACTIVATOR_NAME = "ServerActivator" ;
  155. public static final String SERVER_LOCATOR_NAME = "ServerLocator" ;
  156. public static final String SERVER_REPOSITORY_NAME = "ServerRepository" ;
  157. public static final String INITIAL_NAME_SERVICE_NAME= "InitialNameService" ;
  158. public static final String TRANSACTION_CURRENT_NAME = "TransactionCurrent" ;
  159. public static final String DYN_ANY_FACTORY_NAME = "DynAnyFactory" ;
  160. // New for Portable Interceptors
  161. public static final String PI_CURRENT_NAME = "PICurrent" ;
  162. public static final String CODEC_FACTORY_NAME = "CodecFactory" ;
  163. // Constants for ORBD DB ***********************************************************************
  164. public static final String DEFAULT_DB_DIR = "orb.db" ;
  165. public static final String DEFAULT_DB_NAME = "db" ;
  166. public static final String INITIAL_ORB_DB = "initial.db" ;
  167. public static final String SERVER_LOG_DIR = "logs" ;
  168. public static final String ORBID_DIR_BASE = "orbids" ;
  169. public static final String ORBID_DB_FILE_NAME = "orbids.db" ;
  170. // Constants for ThreadPool ********************************************************************
  171. // Default value for when inactive threads in the pool can stop running (ms)
  172. public static final int DEFAULT_INACTIVITY_TIMEOUT = 120000;
  173. // Constants for minor code bases **************************************************************
  174. public static final int SUBSYSTEM_SIZE = 200 ;
  175. // util/MinorCodes starts at SUNVMCID.value. We do not include this here in order
  176. // to avoid creating another dependency of the pure ORB support code on our ORB.
  177. // GENERAL_BASE is used for orbutil/MinorCodes
  178. public static final int GENERAL_BASE = SUNVMCID.value + SUBSYSTEM_SIZE ;
  179. public static final int ACTIVATION_BASE = GENERAL_BASE + SUBSYSTEM_SIZE ;
  180. public static final int COSNAMING_BASE = ACTIVATION_BASE + SUBSYSTEM_SIZE ;
  181. public static final int PORTABLE_INTERCEPTORS_BASE = COSNAMING_BASE + SUBSYSTEM_SIZE ;
  182. public static final int POA_BASE = PORTABLE_INTERCEPTORS_BASE + SUBSYSTEM_SIZE ;
  183. public static final int IOR_BASE = POA_BASE + SUBSYSTEM_SIZE ;
  184. public static final int UTIL_BASE = IOR_BASE + SUBSYSTEM_SIZE ;
  185. // Code Set related *******************************************************
  186. // If we don't always send the code set context, there's a possibility
  187. // of failure when fragments of a smaller request are interleved with
  188. // those of a first request with other large service contexts.
  189. //
  190. public static final boolean DEFAULT_ALWAYS_SEND_CODESET_CTX = true;
  191. public static final String ALWAYS_SEND_CODESET_CTX_PROPERTY
  192. = SUN_PREFIX + "codeset.AlwaysSendCodeSetCtx";
  193. // Use byte order markers in streams when applicable? This won't apply to
  194. // GIOP 1.1 due to limitations in the CDR encoding.
  195. public static final boolean DEFAULT_USE_BYTE_ORDER_MARKERS = true;
  196. public static final String USE_BOMS = SUN_PREFIX + "codeset.UseByteOrderMarkers";
  197. // Use byte order markers in encapsulations when applicable?
  198. public static final boolean DEFAULT_USE_BYTE_ORDER_MARKERS_IN_ENCAPS = false;
  199. public static final String USE_BOMS_IN_ENCAPS = SUN_PREFIX + "codeset.UseByteOrderMarkersInEncaps";
  200. // The CHAR_CODESETS and WCHAR_CODESETS allow the user to override the default
  201. // connection code sets. The value should be a comma separated list of OSF
  202. // registry numbers. The first number in the list will be the native code
  203. // set.
  204. //
  205. // Number can be specified as hex if preceded by 0x, otherwise they are
  206. // interpreted as decimal.
  207. //
  208. // Code sets that we accept currently (see core/OSFCodeSetRegistry):
  209. //
  210. // char/string:
  211. //
  212. // ISO8859-1 (Latin-1) 0x00010001
  213. // ISO646 (ASCII) 0x00010020
  214. // UTF-8 0x05010001
  215. //
  216. // wchar/string:
  217. //
  218. // UTF-16 0x00010109
  219. // UCS-2 0x00010100
  220. // UTF-8 0x05010001
  221. //
  222. // Note: The ORB will let you assign any of the above values to
  223. // either of the following properties, but the above assignments
  224. // are the only ones that won't get you into trouble.
  225. public static final String CHAR_CODESETS = SUN_PREFIX + "codeset.charsets";
  226. public static final String WCHAR_CODESETS = SUN_PREFIX + "codeset.wcharsets";
  227. }