src/share/classes/com/sun/corba/se/spi/orb/ORB.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 168,177 ****
--- 168,179 ----
// wrapperMap maintains a table of LogWrapper instances used by
// different classes to log exceptions. The key is a StringPair
// representing LogDomain and ExceptionGroup.
private Map wrapperMap ;
+ private static PresentationManager defaultPresentationManager;
+
private static Map staticWrapperMap = new ConcurrentHashMap();
protected MonitoringManager monitoringManager;
private static PresentationManager setupPresentationManager() {
*** 231,251 ****
/**
* Returns the Presentation Manager for the current thread group, using the ThreadGroup-specific
* AppContext to hold it. Creates and records one if needed.
*/
! public static PresentationManager getPresentationManager()
{
AppContext ac = AppContext.getAppContext();
! PresentationManager pm = (PresentationManager) ac.get(PresentationManager.class);
if (pm == null) {
pm = setupPresentationManager();
ac.put(PresentationManager.class, pm);
}
return pm;
}
/** Get the appropriate StubFactoryFactory. This
* will be dynamic or static depending on whether
* com.sun.CORBA.ORBUseDynamicStub is true or false.
*/
public static PresentationManager.StubFactoryFactory
--- 233,264 ----
/**
* Returns the Presentation Manager for the current thread group, using the ThreadGroup-specific
* AppContext to hold it. Creates and records one if needed.
*/
! public synchronized static PresentationManager getPresentationManager()
{
+ SecurityManager sm = System.getSecurityManager();
+ if (sm != null && AppContext.getAppContexts().size() > 0) {
AppContext ac = AppContext.getAppContext();
! if (ac != null) {
! PresentationManager pm =
! (PresentationManager) ac.get(PresentationManager.class);
if (pm == null) {
pm = setupPresentationManager();
ac.put(PresentationManager.class, pm);
}
return pm;
}
+ }
+ // No security manager or AppContext
+ if (defaultPresentationManager == null)
+ defaultPresentationManager = setupPresentationManager();
+ return defaultPresentationManager;
+ }
+
/** Get the appropriate StubFactoryFactory. This
* will be dynamic or static depending on whether
* com.sun.CORBA.ORBUseDynamicStub is true or false.
*/
public static PresentationManager.StubFactoryFactory