Merge branch '13.2.1_delivery' of ssh://lightning.omaha.us.ray.com:29418/AWIPS2_baseline into 13.2.1_delivery
Former-commit-id:f0a495e095
[formerly2e6b21b299
[formerly3bb4d338f6
] [formerlyf0a495e095
[formerly a3d06df18373a0f8c69f07ef0eaf0b5c0ee76fd6]]] Former-commit-id:2e6b21b299
[formerly3bb4d338f6
] Former-commit-id:2e6b21b299
Former-commit-id:6b74a9a34a
This commit is contained in:
commit
587a19b7e8
11 changed files with 153 additions and 121 deletions
|
@ -16,6 +16,7 @@ import org.osgi.framework.Bundle;
|
|||
import org.osgi.framework.BundleActivator;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.Constants;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -30,6 +31,8 @@ import org.osgi.framework.Constants;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 12, 2010 mschenke Initial creation
|
||||
* Jan 24, 2013 1522 bkowal Halt initialization if a p2 installation
|
||||
* has been started
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -38,133 +41,162 @@ import org.osgi.framework.Constants;
|
|||
*/
|
||||
public class Activator implements BundleActivator {
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "com.raytheon.uf.viz.spring.dm";
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "com.raytheon.uf.viz.spring.dm";
|
||||
|
||||
private static final String SPRING_PATH = "res" + IPath.SEPARATOR
|
||||
+ "spring";
|
||||
private static final String SPRING_PATH = "res" + IPath.SEPARATOR
|
||||
+ "spring";
|
||||
|
||||
private static final String SPRING_FILE_EXT = "*.xml";
|
||||
private static final String SPRING_FILE_EXT = "*.xml";
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
}
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
plugin = this;
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
if (this.isInstallOperation()) {
|
||||
return;
|
||||
}
|
||||
plugin = this;
|
||||
|
||||
Map<String, OSGIXmlApplicationContext> contextMap = new HashMap<String, OSGIXmlApplicationContext>();
|
||||
Set<String> processing = new HashSet<String>();
|
||||
Bundle[] bundles = context.getBundles();
|
||||
Map<String, Bundle> bundleMap = new HashMap<String, Bundle>();
|
||||
for (Bundle b : bundles) {
|
||||
bundleMap.put(b.getSymbolicName(), b);
|
||||
}
|
||||
for (Bundle b : bundles) {
|
||||
createContext(bundleMap, contextMap, b, processing);
|
||||
}
|
||||
}
|
||||
Map<String, OSGIXmlApplicationContext> contextMap = new HashMap<String, OSGIXmlApplicationContext>();
|
||||
Set<String> processing = new HashSet<String>();
|
||||
Bundle[] bundles = context.getBundles();
|
||||
Map<String, Bundle> bundleMap = new HashMap<String, Bundle>();
|
||||
for (Bundle b : bundles) {
|
||||
bundleMap.put(b.getSymbolicName(), b);
|
||||
}
|
||||
for (Bundle b : bundles) {
|
||||
createContext(bundleMap, contextMap, b, processing);
|
||||
}
|
||||
}
|
||||
|
||||
private OSGIXmlApplicationContext createContext(
|
||||
Map<String, Bundle> bundles,
|
||||
Map<String, OSGIXmlApplicationContext> contextMap, Bundle bundle,
|
||||
Set<String> processing) {
|
||||
String bundleName = bundle.getSymbolicName();
|
||||
OSGIXmlApplicationContext appCtx = contextMap.get(bundleName);
|
||||
if (contextMap.containsKey(bundleName) == false
|
||||
&& bundleName.contains(".edex.") == false) {
|
||||
if (processing.contains(bundleName)) {
|
||||
throw new RuntimeException(
|
||||
"Found recursive spring dependency while processing plugins: "
|
||||
+ bundleName);
|
||||
}
|
||||
processing.add(bundleName);
|
||||
private OSGIXmlApplicationContext createContext(
|
||||
Map<String, Bundle> bundles,
|
||||
Map<String, OSGIXmlApplicationContext> contextMap, Bundle bundle,
|
||||
Set<String> processing) {
|
||||
String bundleName = bundle.getSymbolicName();
|
||||
OSGIXmlApplicationContext appCtx = contextMap.get(bundleName);
|
||||
if (contextMap.containsKey(bundleName) == false
|
||||
&& bundleName.contains(".edex.") == false) {
|
||||
if (processing.contains(bundleName)) {
|
||||
throw new RuntimeException(
|
||||
"Found recursive spring dependency while processing plugins: "
|
||||
+ bundleName);
|
||||
}
|
||||
processing.add(bundleName);
|
||||
|
||||
// No context created yet and not edex project, check for files
|
||||
Enumeration<?> entries = bundle.findEntries(SPRING_PATH,
|
||||
SPRING_FILE_EXT, true);
|
||||
if (entries != null) {
|
||||
List<String> files = new ArrayList<String>();
|
||||
while (entries.hasMoreElements()) {
|
||||
URL url = (URL) entries.nextElement();
|
||||
try {
|
||||
url = FileLocator.toFileURL(url);
|
||||
files.add(url.toString());
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(
|
||||
"Error resolving spring file: " + url, e);
|
||||
}
|
||||
}
|
||||
if (files.size() > 0) {
|
||||
// Files found, check for dependencies
|
||||
String requiredBundlesHeader = (String) bundle.getHeaders()
|
||||
.get(Constants.REQUIRE_BUNDLE);
|
||||
// Split comma separated string from MANIFEST
|
||||
String[] requiredBundles = requiredBundlesHeader
|
||||
.split("[,]");
|
||||
List<OSGIXmlApplicationContext> parentContexts = new ArrayList<OSGIXmlApplicationContext>();
|
||||
for (String requiredBndl : requiredBundles) {
|
||||
// Extract bundle name which is first item in
|
||||
// semicolon
|
||||
// split list
|
||||
String[] bndlParts = requiredBndl.split("[;]");
|
||||
Bundle reqBndl = bundles.get(bndlParts[0]);
|
||||
if (reqBndl != null) {
|
||||
// Found bundle, process context for bundle
|
||||
OSGIXmlApplicationContext parent = createContext(
|
||||
bundles, contextMap, reqBndl, processing);
|
||||
if (parent != null) {
|
||||
// Context found, add to list
|
||||
parentContexts.add(parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
// No context created yet and not edex project, check for files
|
||||
Enumeration<?> entries = bundle.findEntries(SPRING_PATH,
|
||||
SPRING_FILE_EXT, true);
|
||||
if (entries != null) {
|
||||
List<String> files = new ArrayList<String>();
|
||||
while (entries.hasMoreElements()) {
|
||||
URL url = (URL) entries.nextElement();
|
||||
try {
|
||||
url = FileLocator.toFileURL(url);
|
||||
files.add(url.toString());
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(
|
||||
"Error resolving spring file: " + url, e);
|
||||
}
|
||||
}
|
||||
if (files.size() > 0) {
|
||||
// Files found, check for dependencies
|
||||
String requiredBundlesHeader = (String) bundle.getHeaders()
|
||||
.get(Constants.REQUIRE_BUNDLE);
|
||||
// Split comma separated string from MANIFEST
|
||||
String[] requiredBundles = requiredBundlesHeader
|
||||
.split("[,]");
|
||||
List<OSGIXmlApplicationContext> parentContexts = new ArrayList<OSGIXmlApplicationContext>();
|
||||
for (String requiredBndl : requiredBundles) {
|
||||
// Extract bundle name which is first item in
|
||||
// semicolon
|
||||
// split list
|
||||
String[] bndlParts = requiredBndl.split("[;]");
|
||||
Bundle reqBndl = bundles.get(bndlParts[0]);
|
||||
if (reqBndl != null) {
|
||||
// Found bundle, process context for bundle
|
||||
OSGIXmlApplicationContext parent = createContext(
|
||||
bundles, contextMap, reqBndl, processing);
|
||||
if (parent != null) {
|
||||
// Context found, add to list
|
||||
parentContexts.add(parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (parentContexts.size() > 0) {
|
||||
// Context with parent context
|
||||
appCtx = new OSGIXmlApplicationContext(
|
||||
new OSGIGroupApplicationContext(parentContexts),
|
||||
files.toArray(new String[0]), bundle);
|
||||
} else {
|
||||
// No parent context required
|
||||
appCtx = new OSGIXmlApplicationContext(
|
||||
files.toArray(new String[0]), bundle);
|
||||
}
|
||||
}
|
||||
}
|
||||
contextMap.put(bundleName, appCtx);
|
||||
}
|
||||
processing.remove(bundleName);
|
||||
return appCtx;
|
||||
}
|
||||
if (parentContexts.size() > 0) {
|
||||
// Context with parent context
|
||||
appCtx = new OSGIXmlApplicationContext(
|
||||
new OSGIGroupApplicationContext(parentContexts),
|
||||
files.toArray(new String[0]), bundle);
|
||||
} else {
|
||||
// No parent context required
|
||||
appCtx = new OSGIXmlApplicationContext(
|
||||
files.toArray(new String[0]), bundle);
|
||||
}
|
||||
}
|
||||
}
|
||||
contextMap.put(bundleName, appCtx);
|
||||
}
|
||||
processing.remove(bundleName);
|
||||
return appCtx;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Based on the command line arguments, determine whether or not an Eclipse
|
||||
* p2 repository will be installed
|
||||
*
|
||||
* @return true if an Eclipse p2 repository is going to be installed, false
|
||||
* otherwise
|
||||
*/
|
||||
private boolean isInstallOperation() {
|
||||
final String P2_DIRECTOR = "org.eclipse.equinox.p2.director";
|
||||
|
||||
/**
|
||||
* We look at the command line arguments instead of the program
|
||||
* arguments (com.raytheon.uf.viz.application.ProgramArguments) because
|
||||
* the command line arguments include almost everything that was passed
|
||||
* as an argument to the Eclipse executable instead of just what CAVE is
|
||||
* interested in.
|
||||
*/
|
||||
for (String argument : Platform.getCommandLineArgs()) {
|
||||
if (P2_DIRECTOR.equals(argument)) {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
<route id="gfeVtecChangeNotification">
|
||||
<from uri="jms-generic:topic:edex.alerts.vtec"/>
|
||||
<doTry>
|
||||
<bean ref="serializationUtil" method="transformFromThrift" />
|
||||
<bean ref="serializationUtil" method="transformFromThrift" />
|
||||
<bean ref="vtecChangeListener" method="handleNotification" />
|
||||
<doCatch>
|
||||
<exception>java.lang.Throwable</exception>
|
||||
|
@ -130,7 +130,7 @@
|
|||
</doTry>
|
||||
</route>
|
||||
</camelContext>
|
||||
|
||||
|
||||
<!-- Beans to define a custom jms connection which will allow a durable subscription -->
|
||||
<bean id="gfeNotifyConnectionFactory" class="org.apache.qpid.client.AMQConnectionFactory">
|
||||
<constructor-arg type="java.lang.String" value="amqp://guest:guest@gfeNotify/edex?brokerlist='tcp://${broker.addr}?retries='9999'&connecttimeout='5000'&connectdelay='5000''&maxprefetch='0'&sync_publish='all'&sync_ack='true'"/>
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
<pipeline>
|
||||
<bean ref="stringToFile" />
|
||||
<bean ref="satelliteDecoder" method="decode" />
|
||||
<to uri="directvm:persistIndexAlert" />
|
||||
<to uri="directvm:persistIndexAlert" />
|
||||
</pipeline>
|
||||
<doCatch>
|
||||
<exception>java.lang.Throwable</exception>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
libqpidclient.so.4.0.0
|
BIN
nativeLib/org.apache.qpid/lib/libqpidclient.so
Normal file
BIN
nativeLib/org.apache.qpid/lib/libqpidclient.so
Normal file
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
libqpidclient.so.4.0.0
|
BIN
nativeLib/org.apache.qpid/lib/libqpidclient.so.4
Normal file
BIN
nativeLib/org.apache.qpid/lib/libqpidclient.so.4
Normal file
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
libqpidcommon.so.4.0.0
|
BIN
nativeLib/org.apache.qpid/lib/libqpidcommon.so
Normal file
BIN
nativeLib/org.apache.qpid/lib/libqpidcommon.so
Normal file
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
libqpidcommon.so.4.0.0
|
BIN
nativeLib/org.apache.qpid/lib/libqpidcommon.so.4
Normal file
BIN
nativeLib/org.apache.qpid/lib/libqpidcommon.so.4
Normal file
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
libqpidmessaging.so.3.0.2
|
BIN
nativeLib/org.apache.qpid/lib/libqpidmessaging.so
Normal file
BIN
nativeLib/org.apache.qpid/lib/libqpidmessaging.so
Normal file
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
libqpidmessaging.so.3.0.2
|
BIN
nativeLib/org.apache.qpid/lib/libqpidmessaging.so.3
Normal file
BIN
nativeLib/org.apache.qpid/lib/libqpidmessaging.so.3
Normal file
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
libqpidtypes.so.1.1.1
|
BIN
nativeLib/org.apache.qpid/lib/libqpidtypes.so
Normal file
BIN
nativeLib/org.apache.qpid/lib/libqpidtypes.so
Normal file
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
libqpidtypes.so.1.1.1
|
BIN
nativeLib/org.apache.qpid/lib/libqpidtypes.so.1
Normal file
BIN
nativeLib/org.apache.qpid/lib/libqpidtypes.so.1
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue