Skip to content

Instantly share code, notes, and snippets.

View jjongsma's full-sized avatar

Jeremy Jongsma jjongsma

  • Slalom Consulting
  • Chicago, IL
View GitHub Profile
Component Details
Name : barchart.gateway.store.service
State : UNSATISFIED
Properties :
component.name=barchart.gateway.store.service
component.id=20
References
Reference : com.barchart.feed.api.consumer.MarketService/*
State : unsatisfied
Multiple : single
@jjongsma
jjongsma / packer-config
Last active December 18, 2023 15:15
Process YAML and write Packer JSON to STDOUT
#!/usr/bin/python
#
# Usage: packer-config my-template.yaml | packer build -
#
# Constructs a Packer JSON configuration file from the specified YAML
# template file and writes it to STDOUT.
#
# The YAML template format adds some flexibility and readability by
# adding comments and an !include directive, allowing for the
# following template syntax:
@jjongsma
jjongsma / build.py
Created February 22, 2014 17:28
Packer build wrapper for generating JSON from a more flexible YAML config syntax
#!/usr/bin/python
#
# "packer build" wrapper that sets up a consistent build environment for image building.
#
# - Use common .packer_cache directory in this root directory
# - Generate JSON templates from YAML (if exists) to allow comments and includes
import sys
import os
import subprocess
@jjongsma
jjongsma / karaf.log
Last active August 29, 2015 13:56
Karaf 3.0 boot features not starting
2014-02-10 08:47:24,120 | INFO | FelixStartLevel | fileinstall | 16 - org.apache.felix.fileinstall - 3.2.6 | Installed /home/jeremy/dev/barchart/java/barchart-service/karaf/service/target/int-work/basic-tester/target/service/app_2014-02-07_14-14-00/etc/org.ops4j.pax.url.mvn.cfg
2014-02-10 08:47:24,124 | INFO | FelixStartLevel | fileinstall | 16 - org.apache.felix.fileinstall - 3.2.6 | Installed /home/jeremy/dev/barchart/java/barchart-service/karaf/service/target/int-work/basic-tester/target/service/app_2014-02-07_14-14-00/etc/org.apache.karaf.management.cfg
2014-02-10 08:47:24,127 | INFO | FelixStartLevel | fileinstall | 16 - org.apache.felix.fileinstall - 3.2.6 | Installed /home/jeremy/dev/barchart/java/barchart-service/karaf/service/target/int-work/basic-tester/target/service/app_2014-02-07_14-14-00/etc/org.apache.karaf.log.cfg
2014-02-10 08:47:24,130 | INFO | FelixStartLevel | fileinstall | 16 - org.apache.felix.fil
1) Run WebSocketServer.java, and leave it running for the duration of this test.
2) Run WebSocketClient.java in a separate JVM. The first time pretty much always works as expected.
3) Run WebSocketClient.java again. 90% of the time the exception will appear during the second run.
4) Repeat #3 until you see the logged exception in STDOUT, which triggers a disconnect.
This appears to be a network queue/timing issue. When the request succeeds, the websocket upgrade
response and first frame arrive at the client as separate messages:
+-------------------------------------------------+
| 0 1 2 3 4 5 6 7 8 9 a b c d e f |
@jjongsma
jjongsma / DuplicateActionExample.java
Created September 18, 2012 17:33
Duplicate action execution in Atmosphere
package com.barchart.osgi.nettosphere;
import java.io.IOException;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicInteger;
import org.atmosphere.cpr.AtmosphereHandler;
import org.atmosphere.cpr.AtmosphereResource;
import org.atmosphere.cpr.AtmosphereResourceEvent;
@jjongsma
jjongsma / ChannelCloseExample.java
Created September 13, 2012 20:40
Channel close test case
package com.barchart.osgi.nettosphere;
import java.io.IOException;
import org.atmosphere.cpr.AtmosphereHandler;
import org.atmosphere.cpr.AtmosphereResource;
import org.atmosphere.cpr.AtmosphereResourceEvent;
import org.atmosphere.cpr.AtmosphereResourceEventListenerAdapter;
import org.atmosphere.cpr.AtmosphereResponse;
import org.atmosphere.nettosphere.Config;