public class OsgiUtils extends Object
| Constructor and Description | 
|---|
OsgiUtils()  | 
| Modifier and Type | Method and Description | 
|---|---|
static Optional<Object> | 
findApplicationContextInOsgiBundle(com.atlassian.plugin.Plugin plugin)
HACK Grab the bean with a name matching the jobKey from the target plugin's. 
 | 
public static Optional<Object> findApplicationContextInOsgiBundle(com.atlassian.plugin.Plugin plugin)
 The reason why this method returns Optional<Object> instead of Optional<ApplicationContext>
 is to avoid class casting errors between different classloaders, e.g.
 
java.lang.ClassCastException: org.springframework.osgi.atlassian.NonValidatingOsgiBundleXmlApplicationContext cannot be cast to org.springframework.context.ApplicationContext
Copyright © 2003–2022 Atlassian. All rights reserved.