01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: EngineClassLoaderClasspath.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.engine;
09:
10: import com.uwyn.rife.tools.ClasspathUtils;
11: import java.io.File;
12:
13: /**
14: * Helper class to avoid Double Check Locking
15: * and still have a thread-safe singleton pattern
16: */
17: public class EngineClassLoaderClasspath {
18: public static final String CLASSPATH;
19:
20: static {
21: StringBuilder classpath = new StringBuilder(ClasspathUtils
22: .getClassPath(EngineClassLoaderClasspath.class));
23:
24: // add the rife.webapp.path paths
25: if (EngineClassLoaderRifeWebappPath.RIFE_WEBAPP_PATH != null) {
26: for (String path : EngineClassLoaderRifeWebappPath.RIFE_WEBAPP_PATH) {
27: classpath.append(File.pathSeparator);
28: classpath.append(path);
29: }
30: }
31:
32: CLASSPATH = classpath.toString();
33: }
34: }
|