1 /* |
1 /* |
2 * Copyright 1995-2005 Sun Microsystems, Inc. All Rights Reserved. |
2 * Copyright 1995-2006 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Sun designates this |
7 * published by the Free Software Foundation. Sun designates this |
287 * methods other than those for |
287 * methods other than those for |
288 * creating <code>TypeCode</code> objects are invoked. |
288 * creating <code>TypeCode</code> objects are invoked. |
289 * |
289 * |
290 * @return the singleton ORB |
290 * @return the singleton ORB |
291 */ |
291 */ |
292 public static ORB init() { |
292 public static synchronized ORB init() { |
293 if (singleton == null) { |
293 if (singleton == null) { |
294 String className = getSystemProperty(ORBSingletonClassKey); |
294 String className = getSystemProperty(ORBSingletonClassKey); |
295 if (className == null) |
295 if (className == null) |
296 className = getPropertyFromFile(ORBSingletonClassKey); |
296 className = getPropertyFromFile(ORBSingletonClassKey); |
297 if (className == null) |
297 if (className == null) |