Merge "Issue #1643 Add NCF bandwidth manager router" into development

Former-commit-id: 42402c5d73 [formerly 42402c5d73 [formerly e2bb08df9a9aa2ac143e0f7fc82b911f72b4b87c]]
Former-commit-id: fb235e3f43
Former-commit-id: a648519673
This commit is contained in:
Dustin Johnson 2013-02-26 13:41:36 -06:00 committed by Gerrit Code Review
commit 50e749e38e
9 changed files with 23 additions and 31 deletions

View file

@ -40,6 +40,7 @@ export DATADELIVERY_SERVER=http://${DATADELIVERY_HOST}:${DATADELIVERY_PORT}/serv
export EBXML_REGISTRY_SERVICE=http://${EBXML_REGISTRY_HOST}:${EBXML_REGISTRY_PORT}/services
export EBXML_REGISTRY_LCM_SERVICE=http://${EBXML_REGISTRY_HOST}:${EBXML_REGISTRY_SOAP_PORT}/lcm?WSDL
export EBXML_REGISTRY_QUERY_SERVICE=http://${EBXML_REGISTRY_HOST}:${EBXML_REGISTRY_SOAP_PORT}/query?WSDL
export NCF_BANDWIDTH_MANAGER_SERVICE=http://${DATADELIVERY_HOST}:9590/services
# set the AWIPS II shared directory
export SHARE_DIR=/awips2/edex/data/share

View file

@ -126,7 +126,7 @@ wrapper.java.additional.47=-Dconfidential.port=8443
wrapper.java.additional.48=-Dhttp.port=${HTTP_PORT}
wrapper.java.additional.49=-Dedex.arch=${EDEX_BITS}-bit
wrapper.java.additional.50=-Dedex.tmp=${TEMP_DIR}
wrapper.java.additional.51=-Dawips.registrymanager.debug=${AWIPS_REGISTRYMANAGER_DEBUG}
wrapper.java.additional.51=-Dncf.bandwidth.manager.service=${NCF_BANDWIDTH_MANAGER_SERVICE}
# Initial Java Heap Size (in MB)
wrapper.java.initmemory=${INIT_MEM}

View file

@ -1,12 +1,12 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.5.xsd">
<util:constant id="dataDeliveryServerKey"
static-field="com.raytheon.uf.common.datadelivery.request.DataDeliveryConstants.DATA_DELIVERY_SERVER" />
<util:constant id="ncfBandwidthManagerServiceKey"
static-field="com.raytheon.uf.common.datadelivery.request.DataDeliveryConstants.NCF_BANDWIDTH_MANAGER_SERVICE" />
</beans>

View file

@ -30,17 +30,19 @@ package com.raytheon.uf.common.datadelivery.request;
* ------------ ---------- ----------- --------------------------
* Nov 14, 2012 1286 djohnson Initial creation
* Dec 03, 2012 1379 djohnson Separate registry service keys.
* Feb 26, 2013 1643 djohnson Add NCF_BANDWIDTH_MANAGER_SERVICE.
*
* </pre>
*
* @author djohnson
* @version 1.0
*/
public final class DataDeliveryConstants {
public static final String DATA_DELIVERY_SERVER = "datadelivery.server";
public static final String NCF_BANDWIDTH_MANAGER_SERVICE = "ncf.bandwidth.manager.service";
/**
* Private constructor.
*/

View file

@ -25,6 +25,7 @@ import com.raytheon.uf.common.registry.ebxml.IdQuery;
* Aug 20, 2012 0743 djohnson Allow instance to be changed from {@link RegistryManagerTest}.
* Sep 14, 2012 1169 djohnson Add use of create only mode.
* Nov 15, 2012 1322 djohnson Use package-level constructor to control who can set the handler instance.
* Feb 26, 2013 1643 djohnson Remove registry manager debug toggle.
*
* </pre>
*
@ -35,11 +36,6 @@ public final class RegistryManager {
private static RegistryHandler instance;
private static final String REGISTRYMANAGER_DEBUG = "awips.registrymanager.debug";
public static final boolean DEBUG = Boolean
.getBoolean(REGISTRYMANAGER_DEBUG);
/**
* Package-level constructor for utility class, it allows Spring to set the
* instance multiple times.

View file

@ -39,7 +39,6 @@ import com.raytheon.uf.common.registry.IResultFormatter;
import com.raytheon.uf.common.registry.OperationStatus;
import com.raytheon.uf.common.registry.RegistryException;
import com.raytheon.uf.common.registry.RegistryHandler;
import com.raytheon.uf.common.registry.RegistryManager;
import com.raytheon.uf.common.registry.RegistryQuery;
import com.raytheon.uf.common.registry.RegistryQueryResponse;
import com.raytheon.uf.common.registry.RegistryResponse;
@ -68,6 +67,7 @@ import com.raytheon.uf.common.util.ReflectionException;
* Aug 15, 2012 0743 djohnson Type-safe result formatters, warn of time-consuming queries.
* Aug 27, 2012 0743 djohnson Add handling for AssociationQuery objects.
* Sep 14, 2012 1169 djohnson Add use of create only mode.
* Feb 26, 2013 1643 djohnson Remove registry manager debug toggle.
*
* </pre>
*
@ -496,10 +496,6 @@ public class FactoryRegistryHandler implements RegistryHandler {
// Submit to the ebXML QueryManager
QueryRequest query = RegistryUtil.getQuery(registryQuery);
if (RegistryManager.DEBUG) {
print(query);
}
QueryResponse r = qm.executeQuery(query);
if (RegistryUtil.RESPONSE_SUCCESS.equals(r.getStatus())) {
@ -539,11 +535,6 @@ public class FactoryRegistryHandler implements RegistryHandler {
t.setId(id);
objectRefs.add(t);
if (RegistryManager.DEBUG) {
System.out
.println("Attempting to remove RegistryObject with id ["
+ id + "]");
}
}
}
@ -560,10 +551,6 @@ public class FactoryRegistryHandler implements RegistryHandler {
i.getObjectRef().addAll(objectRefs);
deleteRequest.setObjectRefList(i);
if (RegistryManager.DEBUG) {
print(deleteRequest);
}
// Submit to the ebXML LifecycleManager
LifecycleManager a = lifecycleManagerFactory.getLifeCycleManager();
RegistryResponseType r = a.removeObjects(deleteRequest);
@ -1015,12 +1002,6 @@ public class FactoryRegistryHandler implements RegistryHandler {
SubmitObjectsRequest a = RegistryUtil.newSubmitObjects(batch,
mode);
if (RegistryManager.DEBUG) {
JAXBManager jaxb = new JAXBManager(
SubmitObjectsRequest.class);
System.out.println("submitObjects( ["
+ jaxb.marshalToXml(a) + "])");
}
RegistryResponseType rt = lifecycleManager.submitObjects(a);

View file

@ -40,6 +40,12 @@
<entry key="Retrievals-4" value-ref="subscriptionRetrievalAgentPrototype" />
<entry key="Retrievals-5" value-ref="subscriptionRetrievalAgentPrototype" />
</util:map>
<bean id="registerNcfBandwidthManagerServiceRouter" factory-bean="requestRouterRegistry"
factory-method="register">
<constructor-arg ref="ncfBandwidthManagerServiceKey" />
<constructor-arg ref="ncfBandwidthManagerServiceRouter" />
</bean>
<camelContext id="BandwidthManager-context"
xmlns="http://camel.apache.org/schema/spring" errorHandlerRef="errorHandler">

View file

@ -6,4 +6,6 @@
<bean id="bandwidthManagerCreator"
class="com.raytheon.uf.edex.datadelivery.bandwidth.NcfBandwidthManagerCreator" />
<bean id="ncfBandwidthManagerServiceRouter" class="com.raytheon.uf.edex.auth.ServerRequestRouter" />
</beans>

View file

@ -6,4 +6,8 @@
<bean id="bandwidthManagerCreator"
class="com.raytheon.uf.edex.datadelivery.bandwidth.WfoBandwidthManagerCreator" />
<bean id="ncfBandwidthManagerServiceRouter" class="com.raytheon.uf.edex.auth.RemoteServerRequestRouter">
<constructor-arg value="${ncf.bandwidth.manager.service}" />
</bean>
</beans>