001: /*
002: * BEGIN_HEADER - DO NOT EDIT
003: *
004: * The contents of this file are subject to the terms
005: * of the Common Development and Distribution License
006: * (the "License"). You may not use this file except
007: * in compliance with the License.
008: *
009: * You can obtain a copy of the license at
010: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011: * See the License for the specific language governing
012: * permissions and limitations under the License.
013: *
014: * When distributing Covered Code, include this CDDL
015: * HEADER in each file and include the License file at
016: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017: * If applicable add the following below this CDDL HEADER,
018: * with the fields enclosed by brackets "[]" replaced with
019: * your own identifying information: Portions Copyright
020: * [year] [name of copyright owner]
021: */
022:
023: /*
024: * @(#)Constants.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: package com.sun.jbi.framework;
030:
031: /**
032: * Global constants shared by framework junit tests.
033: *
034: * @author Sun Microsystems, Inc.
035: */
036: public class Constants {
037: //
038: // Binding Component / Service Engine names
039: //
040:
041: /**
042: * Constant for BC component name.
043: */
044: public static final String BC_NAME = "TestBinding";
045:
046: /**
047: * Constant for BC description.
048: */
049: public static final String BC_DESCRIPTION = "This is a binding component used for unit testing";
050:
051: /**
052: * Constant for BC component name to force bad bootstrap init() call.
053: */
054: public static final String BC_NAME_BAD_BOOTSTRAP_INIT = "BC_BadBootInit";
055:
056: /**
057: * Constant for BC component name to force bad bootstrap init() call
058: * and a bad bootstrap cleanUp() call.
059: */
060: public static final String BC_NAME_BAD_BOOTSTRAP_INIT_CLEANUP = "BC_BadBootInitAndCleanup";
061:
062: /**
063: * Constant for BC component name to force bad bootstrap cleanUp() call
064: * after onInstall().
065: */
066: public static final String BC_NAME_BAD_BOOTSTRAP_INSTALL_CLEANUP = "BC_BadInstallCleanup";
067:
068: /**
069: * Constant for BC component name to force bad bootstrap onInstall() call.
070: */
071: public static final String BC_NAME_BAD_BOOTSTRAP_ONINSTALL = "BC_BadOnInstall";
072:
073: /**
074: * Constant for BC component name to force bad bootstrap onInstall() and
075: * cleanUp() calls.
076: */
077: public static final String BC_NAME_BAD_BOOTSTRAP_ONINSTALL_CLEANUP = "BC_BadOnInstallAndCleanup";
078:
079: /**
080: * Constant for BC component name to force bad bootstrap onUninstall() call.
081: */
082: public static final String BC_NAME_BAD_BOOTSTRAP_ONUNINSTALL = "BC_BadOnUninstall";
083:
084: /**
085: * Constant for BC component name to force bad bootstrap onUninstall() and
086: * cleanUp() calls.
087: */
088: public static final String BC_NAME_BAD_BOOTSTRAP_ONUNINSTALL_CLEANUP = "BC_BadOnUninstallAndCleanup";
089:
090: /**
091: * Constant for BC component name to force bad bootstrap cleanUp() call
092: * after onUninstall().
093: */
094: public static final String BC_NAME_BAD_BOOTSTRAP_UNINSTALL_CLEANUP = "BC_BadUninstallCleanup";
095:
096: /**
097: * Constant for BC component name to force bad bootstrap upgrade() call.
098: */
099: public static final String BC_NAME_BAD_BOOTSTRAP_UPGRADE = "BC_BadUpgrade";
100:
101: /**
102: * Constant for BC component name to force bootstrap onInstall() to
103: * modify the life cycle class path.
104: */
105: public static final String BC_NAME_BOOTSTRAP_MODIFY_CLASS_PATH = "BC_ModifyClassPath";
106:
107: /**
108: * Constant for BC component name to force bad init() call.
109: */
110: public static final String BC_NAME_BAD_INIT = "BC_BadInit";
111:
112: /**
113: * Constant for BC component name to force bad start() call.
114: */
115: public static final String BC_NAME_BAD_START = "BC_BadStart";
116:
117: /**
118: * Constant for BC component name to force bad stop() call.
119: */
120: public static final String BC_NAME_BAD_STOP = "BC_BadStop";
121:
122: /**
123: * Constant for BC component name to force bad shutDown() call.
124: */
125: public static final String BC_NAME_BAD_SHUTDOWN = "BC_BadShutDown";
126:
127: /**
128: * Constant for BC component name to force slow init() call.
129: */
130: public static final String BC_NAME_SLOW_INIT = "BC_SlowInit";
131:
132: /**
133: * Constant for BC component name to force slow start() call.
134: */
135: public static final String BC_NAME_SLOW_START = "BC_SlowStart";
136:
137: /**
138: * Constant for BC component name to force slow stop() call.
139: */
140: public static final String BC_NAME_SLOW_STOP = "BC_SlowStop";
141:
142: /**
143: * Constant for BC component name to force slow shutDown() call.
144: */
145: public static final String BC_NAME_SLOW_SHUTDOWN = "BC_SlowShutDown";
146:
147: /**
148: * Constant for BC component name to force timeout on init() call.
149: */
150: public static final String BC_NAME_TIMEOUT_INIT = "BC_TimeoutInit";
151:
152: /**
153: * Constant for BC component name to force timeout on start() call.
154: */
155: public static final String BC_NAME_TIMEOUT_START = "BC_TimeoutStart";
156:
157: /**
158: * Constant for BC component name to force timeout on stop() call.
159: */
160: public static final String BC_NAME_TIMEOUT_STOP = "BC_TimeoutStop";
161:
162: /**
163: * Constant for BC component name to force timeout on shutDown() call.
164: */
165: public static final String BC_NAME_TIMEOUT_SHUTDOWN = "BC_TimeoutShutDown";
166:
167: /**
168: * Constant for BC bootstrap class name.
169: */
170: public static final String BC_BOOTSTRAP_CLASS_NAME = "com.sun.jbi.framework.BindingBootstrap";
171:
172: /**
173: * Constant for BC bootstrap class name for upgrade.
174: */
175: public static final String BC_BOOTSTRAP_CLASS_NAME_UPGRADE = "com.sun.jbi.framework.BindingBootstrapUpgrade";
176:
177: /**
178: * Constant for BC bootstrap class path.
179: */
180: public static final String BC_BOOTSTRAP_CLASS_PATH = "runtime/framework/bld/test-classes/com/sun/jbi/framework/";
181:
182: /**
183: * Constant for BC lifecycle class name.
184: */
185: public static final String BC_LIFECYCLE_CLASS_NAME = "com.sun.jbi.framework.Binding";
186:
187: /**
188: * Constant for BC lifecycle class name for upgrade.
189: */
190: public static final String BC_LIFECYCLE_CLASS_NAME_UPGRADE = "com.sun.jbi.framework.BindingUpgrade";
191:
192: /**
193: * Constant for alternate BC lifecycle class name.
194: */
195: public static final String BC_LIFECYCLE_CLASS_NAME_ALTERNATE = "testbinding.Binding";
196:
197: /**
198: * Constant for BC lifecycle class name that throws an exception when
199: * getLifeCycle() is called.
200: */
201: public static final String BC_LIFECYCLE_CLASS_NAME_BAD_GET_LIFECYCLE = "com.sun.jbi.framework.BindingBadGetLifeCycle";
202:
203: /**
204: * Constant for BC lifecycle class name that returns null when
205: * getLifeCycle() is called.
206: */
207: public static final String BC_LIFECYCLE_CLASS_NAME_NULL_GET_LIFECYCLE = "com.sun.jbi.framework.BindingNullGetLifeCycle";
208:
209: /**
210: * Constant for BC lifecycle class path.
211: */
212: public static final String BC_LIFECYCLE_CLASS_PATH = "runtime/framework/bld/test-classes/com/sun/jbi/framework/";
213:
214: /**
215: * Constant for BC lifecycle class path.
216: */
217: public static final String BC_LIFECYCLE_CLASS_PATH_NEW = "runtime/framework/bld/classes/com/sun/jbi/framework/";
218:
219: /**
220: * Constant for SE component name.
221: */
222: public static final String SE_NAME = "TestEngine";
223:
224: /**
225: * Constant for SE description.
226: */
227: public static final String SE_DESCRIPTION = "This is a service engine used for unit testing";
228:
229: /**
230: * Constant for SE component name to force bad bootstrap init() call.
231: */
232: public static final String SE_NAME_BAD_BOOTSTRAP_INIT = "SE_BadBootInit";
233:
234: /**
235: * Constant for SE component name to force bad bootstrap init() call
236: * and bad bootstrap cleanUp() call.
237: */
238: public static final String SE_NAME_BAD_BOOTSTRAP_INIT_CLEANUP = "SE_BadBootInitAndCleanup";
239:
240: /**
241: * Constant for SE component name to force bad bootstrap cleanUp() call
242: * after onInstall().
243: */
244: public static final String SE_NAME_BAD_BOOTSTRAP_INSTALL_CLEANUP = "SE_BadInstallCleanup";
245:
246: /**
247: * Constant for SE component name to force bad bootstrap onInstall() call.
248: */
249: public static final String SE_NAME_BAD_BOOTSTRAP_ONINSTALL = "SE_BadOnInstall";
250:
251: /**
252: * Constant for SE component name to force bad bootstrap onInstall() and
253: * cleanUp() calls.
254: */
255: public static final String SE_NAME_BAD_BOOTSTRAP_ONINSTALL_CLEANUP = "SE_BadOnInstallAndCleanup";
256:
257: /**
258: * Constant for SE component name to force bad bootstrap onUninstall() call.
259: */
260: public static final String SE_NAME_BAD_BOOTSTRAP_ONUNINSTALL = "SE_BadOnUninstall";
261:
262: /**
263: * Constant for SE component name to force bad bootstrap onUninstall() and
264: * cleanUp() calls.
265: */
266: public static final String SE_NAME_BAD_BOOTSTRAP_ONUNINSTALL_CLEANUP = "SE_BadOnUninstallAndCleanup";
267:
268: /**
269: * Constant for SE component name to force bad bootstrap cleanUp() call
270: * after onUninstall().
271: */
272: public static final String SE_NAME_BAD_BOOTSTRAP_UNINSTALL_CLEANUP = "SE_BadUninstallCleanup";
273:
274: /**
275: * Constant for SE component name to force bootstrap onInstall() to
276: * modify the life cycle class path.
277: */
278: public static final String SE_NAME_BOOTSTRAP_MODIFY_CLASS_PATH = "SE_ModifyClassPath";
279:
280: /**
281: * Constant for SE component name to force bad init() call.
282: */
283: public static final String SE_NAME_BAD_INIT = "SE_BadInit";
284:
285: /**
286: * Constant for SE component name to force bad start() call.
287: */
288: public static final String SE_NAME_BAD_START = "SE_BadStart";
289:
290: /**
291: * Constant for SE component name to force bad stop() call.
292: */
293: public static final String SE_NAME_BAD_STOP = "SE_BadStop";
294:
295: /**
296: * Constant for SE component name to force bad shutDown() call.
297: */
298: public static final String SE_NAME_BAD_SHUTDOWN = "SE_BadShutDown";
299:
300: /**
301: * Constant for SE component name to force bad shutDown() and bootstrap
302: * onUninstall() calls.
303: */
304: public static final String SE_NAME_BAD_SHUTDOWN_BOOTSTRAP_ONUNINSTALL = "SE_BadShutDownOnUninstall";
305:
306: /**
307: * Constant for SE component name to force timeout on init() call.
308: */
309: public static final String SE_NAME_TIMEOUT_INIT = "SE_TimeoutInit";
310:
311: /**
312: * Constant for SE component name to force timeout on start() call.
313: */
314: public static final String SE_NAME_TIMEOUT_START = "SE_TimeoutStart";
315:
316: /**
317: * Constant for SE component name to force timeout on stop() call.
318: */
319: public static final String SE_NAME_TIMEOUT_STOP = "SE_TimeoutStop";
320:
321: /**
322: * Constant for SE component name to force timeout on shutDown() call.
323: */
324: public static final String SE_NAME_TIMEOUT_SHUTDOWN = "SE_TimeoutShutDown";
325:
326: /**
327: * Constant for SE bootstrap class name.
328: */
329: public static final String SE_BOOTSTRAP_CLASS_NAME = "com.sun.jbi.framework.EngineBootstrap";
330:
331: /**
332: * Constant for SE bootstrap class path.
333: */
334: public static final String SE_BOOTSTRAP_CLASS_PATH = "runtime/framework/bld/test-classes/com/sun/jbi/framework/";
335:
336: /**
337: * Constant for SE lifecycle class name.
338: */
339: public static final String SE_LIFECYCLE_CLASS_NAME = "com.sun.jbi.framework.Engine";
340:
341: /**
342: * Constant for alternate SE lifecycle class name.
343: */
344: public static final String SE_LIFECYCLE_CLASS_NAME_ALTERNATE = "testengine.Engine";
345:
346: /**
347: * Constant for SE lifecycle class name that throws an exception when
348: * getLifeCycle() is called.
349: */
350: public static final String SE_LIFECYCLE_CLASS_NAME_BAD_GET_LIFECYCLE = "com.sun.jbi.framework.EngineBadGetLifeCycle";
351:
352: /**
353: * Constant for SE lifecycle class name that returns null when
354: * getLifeCycle() is called.
355: */
356: public static final String SE_LIFECYCLE_CLASS_NAME_NULL_GET_LIFECYCLE = "com.sun.jbi.framework.EngineNullGetLifeCycle";
357:
358: /**
359: * Constant for SE lifecycle class path.
360: */
361: public static final String SE_LIFECYCLE_CLASS_PATH = "runtime/framework/bld/test-classes/com/sun/jbi/framework/";
362:
363: /**
364: * Constant for shared library 1 component name.
365: */
366: public static final String SL_1_NAME = "SL01";
367:
368: /**
369: * Constant for shared library 1 description.
370: */
371: public static final String SL_1_DESC = "Shared library for testing";
372:
373: /**
374: * Constant for shared library 1 root.
375: */
376: public static final String SL_1_ROOT = "/SL01";
377:
378: /**
379: * Constant for shared library 2 component name.
380: */
381: public static final String SL_2_NAME = "SL02";
382:
383: /**
384: * Constant for shared library 2 description.
385: */
386: public static final String SL_2_DESC = "Shared library for testing";
387:
388: /**
389: * Constant for shared library 2 root.
390: */
391: public static final String SL_2_ROOT = "/SL02";
392:
393: //
394: // Service Assembly / Service Unit names
395: //
396:
397: /**
398: * Constant for Service Unit name that's always lowest in the collating
399: * sequence.
400: */
401: public static final String SU_NAME_FIRST = "SU_A";
402:
403: /**
404: * Constant for Service Unit name to cause an exception on the deploy.
405: */
406: public static final String SU_NAME_DEPLOY_EXCEPTION = "SU_DeployException";
407:
408: /**
409: * Constant for Service Unit name to cause a timeout on the deploy.
410: */
411: public static final String SU_NAME_DEPLOY_TIMEOUT = "SU_DeployTimeout";
412:
413: /**
414: * Constant for Service Unit name to cause an exception on the init.
415: */
416: public static final String SU_NAME_INIT_EXCEPTION = "SU_InitException";
417:
418: /**
419: * Constant for Service Unit name to cause a timeout on the init.
420: */
421: public static final String SU_NAME_INIT_TIMEOUT = "SU_InitTimeout";
422:
423: /**
424: * Constant for Service Unit name to cause an exception on the shutdown.
425: */
426: public static final String SU_NAME_SHUTDOWN_EXCEPTION = "SU_ShutDownException";
427:
428: /**
429: * Constant for Service Unit name to cause a timeout on the shutdown.
430: */
431: public static final String SU_NAME_SHUTDOWN_TIMEOUT = "SU_ShutDownTimeout";
432:
433: /**
434: * Constant for Service Unit name to cause an exception on the start.
435: */
436: public static final String SU_NAME_START_EXCEPTION = "SU_StartException";
437:
438: /**
439: * Constant for Service Unit name to cause a timeout on the start.
440: */
441: public static final String SU_NAME_START_TIMEOUT = "SU_StartTimeout";
442:
443: /**
444: * Constant for Service Unit name to cause an exception on the stop.
445: */
446: public static final String SU_NAME_STOP_EXCEPTION = "SU_StopException";
447:
448: /**
449: * Constant for Service Unit name to cause a timeout on the stop.
450: */
451: public static final String SU_NAME_STOP_TIMEOUT = "SU_StopTimeout";
452:
453: /**
454: * Constant for Service Unit name to cause an exception on the undeploy.
455: */
456: public static final String SU_NAME_UNDEPLOY_EXCEPTION = "SU_UndeployException";
457:
458: /**
459: * Constant for Service Unit name to cause a timeout on the undeploy.
460: */
461: public static final String SU_NAME_UNDEPLOY_TIMEOUT = "SU_UndeployTimeout";
462:
463: /**
464: * Constant for Service Unit root path.
465: */
466: public static final String SU_ROOT = "framework/regress/TestServiceUnit.zip";
467:
468: /**
469: * Constant for Service Assembly name.
470: */
471: public static final String SA_NAME = "Test_SA";
472:
473: /**
474: * Constant for Service Unit name.
475: */
476: public static final String SU_NAME = "Test_SA_SU1";
477:
478: /**
479: * Constant for upgrade file name.
480: */
481: public static final String UPGRADED_FILE_NAME = "upgraded.dat";
482:
483: //
484: // System property names
485: //
486:
487: /**
488: * Constant for system property for component name.
489: */
490: public static final String PROPERTY_COMPONENT_NAME = "com.sun.jbi.framework.test.componentName";
491: }
|