This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void getConfigsFromZookeeper() throws IOException { | |
logger.debug("Connected to Zookeeper"); | |
synchronized(lock) { | |
try { | |
configs = trackChildren(configs); | |
} catch (Exception e) { | |
logger.error("Error tracking Zookeeper config", e); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xs:annotation> | |
<xs:documentation> | |
The input channel of the chain. | |
</xs:documentation> | |
<xs:appinfo> | |
<tool:annotation kind="ref"> | |
<tool:expected-type type="org.springframework.integration.channel.DirectChannel" /> | |
</tool:annotation> | |
</xs:appinfo> | |
</xs:annotation> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<int-ext:dynamic-service-activator id="dynamicServiceActivator"> | |
<int-ext:method name="getService" expression="@bean.getService(headers['serviceId'],payload)" reply-channel="serviceResponse"/> | |
<int-ext:method name="getServices" expression="@bean.getServices(headers['user'])" reply-channel="aggregateSvcRequests" /> | |
</int-ext:dynamic-service-activator> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bean id="svcDynamicServiceActivator" class="DynamicServiceActivator"> | |
<property name="expressionToReplyChannel"> | |
<map> | |
<entry> | |
<key><value>getServices</value></key> | |
<list> | |
<value>@bean.getServices(headers['user'])</value> | |
<value>aggregateSvcRequests</value> | |
</list> | |
</entry> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onOsgiApplicationEvent(OsgiBundleApplicationContextEvent event) { | |
if( event instanceof BootstrappingDependencyEvent) { | |
BootstrappingDependencyEvent bootstrappingDependencyEvent = (BootstrappingDependencyEvent)event; | |
OsgiServiceDependencyEvent osgiServiceDependencyEvent = bootstrappingDependencyEvent.getDependencyEvent(); | |
OsgiServiceDependency osgiServiceDependency = osgiServiceDependencyEvent.getServiceDependency(); | |
Bundle bundle = bootstrappingDependencyEvent.getBundle(); | |
BundleId bundleId = new BundleId(bundle.getBundleId(),bundle.getSymbolicName()); | |
BeanId beanId = new BeanId(osgiServiceDependency.getBeanName(),osgiServiceDependency.getServiceFilter().toString()); | |
ServiceStatus status = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template.execute(new RedisCallback<Object>() { | |
@Override | |
public Object doInRedis(RedisConnection connection) throws DataAccessException { | |
Jedis jedis = (Jedis) connection.getNativeConnection(); | |
RedisSerializer<Object> redisSerializer = (RedisSerializer<Object>) template.getHashValueSerializer(); | |
String json = new String( redisSerializer.serialize(value) ); | |
return jedis.eval(UPDATE_OHASH_SCRIPT, 2, listKey, hashKey, id, json); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected static final String UPDATE_OHASH_SCRIPT = | |
"local listkey = KEYS[1];" + | |
"local hashkey = KEYS[2];" + | |
"local id = ARGV[1];" + | |
"local item = ARGV[2];" + | |
"local found = false;" + | |
"local ids = redis.call('lrange', listkey, 0, -1 );" + | |
"for i = 1,#ids do " + | |
"if id == ids[i] then " + | |
"found = true;" + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"EclipseGeminiBlueprintExtenderThread-44" prio=10 tid=0x00007fcd504a1000 nid=0xf83 waiting for monitor entry [0x00007fcd3f3ed000] | |
java.lang.Thread.State: BLOCKED (on object monitor) | |
at org.eclipse.gemini.blueprint.compendium.internal.cm.ConfigurationAdminManager.initialize(ConfigurationAdminManager.java:124) | |
- waiting to lock <0x00000007e07bf460> (a java.lang.Object) | |
at org.eclipse.gemini.blueprint.compendium.internal.cm.ConfigurationAdminManager.getConfiguration(ConfigurationAdminManager.java:98) | |
at org.eclipse.gemini.blueprint.compendium.internal.cm.DefaultManagedServiceBeanManager.register(DefaultManagedServiceBeanManager.java:56) | |
at org.eclipse.gemini.blueprint.compendium.internal.cm.ManagedServiceInstanceTrackerPostProcessor.postProcessBeforeInitialization(ManagedServiceInstanceTrackerPostProcessor.java:61) | |
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcesso |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bean id ="indexConfigMgr" class="...index.manager.impl.ElasticSearchIndexConfigManagerImpl" depends-on="indexTemplate"> | |
<property name="esClient" ref="esClient" /> | |
<osgix:managed-properties persistent-id="...elasticsearch.index" update-method="updateConfig"/> | |
</bean> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<osgix:managed-service-factory id="cache-config-redis" factory-pid="...cache.redis" interface="...cache.Cache"> | |
<bean class="...cache.impl.RedisCacheImpl"> | |
<property name="redisConnectionFactory" ref="jedisConnectionFactory"/> | |
</bean> | |
</osgix:managed-service-factory> |