Permalink
Browse files

Merge branch 'streams'

  • Loading branch information...
atooni committed Nov 12, 2018
2 parents 5e85af8 + 90cee9c commit 4f84adab49f4a90bc7e8f34f5e9253d1ce3b2aca
Showing 310 changed files with 26,170 additions and 925 deletions.
@@ -0,0 +1,2 @@
��Ib�@��?*T R�3�q!��6Íh�+t�Q8{<aH�.����j�J��Z�*]s��C^�X����h�ԉ:�&���T4��hI�N�w
@@ -3,14 +3,13 @@ felix-cache
*.aux
*.backup
*~
*.pdf
*.swp
libs/
mvn.out
nohup.out
3rdparty
package-lock.json
.bloop
node_modules
target.tgz
blended.sslcontext/notes.txt
@@ -1,6 +1,6 @@
language: scala
scala: 2.12.6
scala: 2.12.7
jdk: oraclejdk8
@@ -13,28 +13,65 @@ cache:
- "$HOME/.ivy2"
- "$HOME/.sbt"
before_install:
- sudo apt-get update
- sudo apt-get install graphviz
- openssl aes-256-cbc -K $encrypted_e8464d595ae2_key -iv $encrypted_e8464d595ae2_iv -in .dropbox_uploader.enc -out $HOME/.dropbox_uploader -d
before_cache:
- rm -Rf $HOME/.ivy2/.sbt.ivy.lock ; rm -Rf $HOME/.ivy2/local ; rm -Rf $HOME/.m2/repository/de/wayofquality/blended
env:
global:
- TEST_ONLINE="true"
# PGP_PASS
- secure: "r048egec7DYp2HXockVYQOQru6FsxYZTABzEmTqZxOIRBpE3/c/km8TrSdKU32te7pZVryTGe2J6DK7xa2U2rHmu9H8Z7ah1a4CZzL0daFP8xZGXJ2aUby8Z++5eoav+CVzqyHWYKZtuB/DEhOlVsvx397rJVRhWIBBQVt5sgxY="
# SONATYPE_USERNAME
- secure: "b3aSUvpBixtHJ7EuxN5d7/sLzU6zXtD3OGyHXIDyfZWSnc55YOju89yZsfmj7Cnx2SqXvAuHIjb/bXwGtJg30f9LaR9EKueawkFpIBHKuPeEsJKoBAw2Uwu+si2Dn5Kb4joZZUwokJic4SnhmU5MmAI5YVdv6fzCyuBhY+zoFbA="
# SONATYPE_PASSWORD
- secure: "cve0uZoMzRy5nEzkHWBTz651SBsVLvVNVZQDFoQGPaoDCXcICi+kqGKwP/9n4sgFwgvP6mJVZHYt5i9c8KqUmT1j7KtRzGirlqcj23QIUppt5v5XZLilVt6fSlvU97N008Y4xH3IEURhJGqSGhGTFrKxP3dvr9pnXCAQbqIDT0w="
# CODACY_PROJECT_TOKEN
- secure: "KBQ2ReAGgCp4UXR/W20H3H2yIjqVTaadyoEJaGjwAujJJHp6wd6BdPDdjBVNMYW6J/CH9+HJotZrX6GyPZWrNKms6G5mAH160o5xdgE+WEoAN56mnIBMrff7Di1rDwfLX+XSjcmh+XCsKvgiY230hOXAtZ6ArnqMR6dc1NKu7Ag="
# GITHUB_TOKEN
- secure: "IbsIzNJNyNYY13wb8lmbZgoJhU03DsddEaWnjEoGN6p97cag6MIIB6XiDm5GrEshmKoK/IuXQBm0t+ur65pUrH9IYbir9zfn4Jzok7cESPXi9BUdJq8D7bkNRTOy98dWK+MWHF5WtNb054i3g1Fxe0k8ynRM/lIbfo/NjmmAW8k="
stages:
- name: VerifyPublish
if: branch = publish AND type = push
- Test
- name: Deploy
if: branch = publish AND type = push
- name: Site
if: branch = streams
jobs:
include:
- stage: VerifyPublish
script: ./verifyPublish.sh
- stage: Test
script: sbt ciBuild
before_script: ./dropbox_uploader.sh list
script: sbt cleanCoverage unidoc
after_failure:
- ./upload-results.sh $TRAVIS_BUILD_NUMBER
after_success:
- ./upload-results.sh $TRAVIS_BUILD_NUMBER
- stage: Deploy
script: ./runPublish.sh
- stage: Site
before_script:
- ./dropbox_uploader.sh download travis/$TRAVIS_BUILD_NUMBER/target.tgz target.tgz
- tar -xzf target.tgz
script:
- sbt jbakeSite
deploy:
provider: pages
local-dir: target/site
skip-cleanup: true
github-token: $GITHUB_TOKEN
keep-history: false
target-branch: gh-pages
email: andreas@wayofquality.de
name: Blended Development
verbose: true
on:
branch: streams
@@ -2,6 +2,7 @@
= Blended - a Scala based Integration framework
:toc:
:toc-placement: preamble
:sbt-version: 1.2.6
ifdef::env-github[]
image:https://badge.waffle.io/woq-blended/blended.png[Stories in Ready, link=https://waffle.io/woq-blended/blended]
@@ -42,13 +43,13 @@ https://github.com/woq-blended/blended.container[Blended example container and i
== Build from source
We use `sbt 1.2.3` to build blended.
We use `sbt {sbt-version}` to build blended.
====
The build files are *not* compatible with sbt versions 0.13.x as they intensively use the new unified syntax to reference properties.
====
As we have some shared modules between Scala and Scala.Js, node and yarn is also required on the developer machine.
As we have some shared modules between Scala and Scala.Js, `node` and `yarn` is also required on the developer machine.
After cloning the repository, simply navigate to the checkout directory and start sbt with a bit more memory (2GB or more):
@@ -1,38 +1,52 @@
package blended.activemq.brokerstarter
import javax.net.ssl.SSLContext
import akka.actor.{PoisonPill, Props}
import blended.activemq.brokerstarter.internal.{BrokerControlActor, StartBroker}
import blended.activemq.brokerstarter.internal.{BrokerConfig, BrokerControlSupervisor}
import blended.akka.ActorSystemWatching
import blended.util.config.Implicits._
import blended.util.logging.Logger
import domino.DominoActivator
import javax.net.ssl.SSLContext
class BrokerActivator extends DominoActivator
class BrokerActivator
extends DominoActivator
with ActorSystemWatching {
private[this] val log = Logger[BrokerActivator]
whenBundleActive {
whenActorSystemAvailable { osgiCfg =>
val withSsl = !osgiCfg.config.hasPath("withSsl") || osgiCfg.config.getBoolean("withSsl")
val brokerConfigs = osgiCfg.config.getConfigMap("broker", Map.empty).map { case (brokerName, cfg) =>
(brokerName -> BrokerConfig.create(brokerName, osgiCfg.idSvc, cfg).get)
}
val withSsl = brokerConfigs.values.exists(_.withSsl)
if (withSsl) {
log.info("Starting configured ActiveMQ brokers with SSL")
whenAdvancedServicePresent[SSLContext]("(type=server)") { sslCtxt =>
val actor = osgiCfg.system.actorOf(Props[BrokerControlActor], bundleContext.getBundle().getSymbolicName())
actor ! StartBroker(osgiCfg, Some(sslCtxt))
val supervisor = osgiCfg.system.actorOf(BrokerControlSupervisor.props(
osgiCfg, Some(sslCtxt), brokerConfigs.values.toList
), bundleContext.getBundle().getSymbolicName())
onStop {
actor ! PoisonPill
log.info("Stopping configured ActiveMQ brokers ")
osgiCfg.system.stop(supervisor)
}
}
} else {
val actor = osgiCfg.system.actorOf(Props[BrokerControlActor], bundleContext.getBundle().getSymbolicName())
actor ! StartBroker(osgiCfg, None)
log.info("Starting configured ActiveMQ brokers without SSL")
val supervisor = osgiCfg.system.actorOf(BrokerControlSupervisor.props(
osgiCfg, None, brokerConfigs.values.toList
), bundleContext.getBundle().getSymbolicName())
onStop {
actor ! PoisonPill
log.info("Stopping configured ActiveMQ brokers ")
osgiCfg.system.stop(supervisor)
}
}
}
}
}
@@ -0,0 +1,40 @@
package blended.activemq.brokerstarter.internal
import blended.container.context.api.ContainerIdentifierService
import com.typesafe.config.Config
import blended.util.config.Implicits._
import scala.util.Try
case class BrokerConfig (
vendor : String,
provider : String,
brokerName : String,
file : String,
clientId : String,
withSsl : Boolean
)
object BrokerConfig {
def create(brokerName : String, idSvc: ContainerIdentifierService, cfg: Config) : Try[BrokerConfig] = Try {
def resolve(value: String) : String = idSvc.resolvePropertyString(value).map(_.toString()).get
val name = resolve(cfg.getString("brokerName", brokerName))
val vendor = resolve(cfg.getString("vendor", "activemq"))
val provider = resolve(cfg.getString("provider", brokerName))
val file = resolve(cfg.getString("file", s"$brokerName.amq"))
val clientId = resolve(cfg.getString("clientId"))
val ssl = cfg.getBoolean("withSsl", true)
BrokerConfig(
vendor = vendor,
provider = provider,
brokerName = name,
file = file,
clientId = clientId,
withSsl = ssl
)
}
}
Oops, something went wrong.

0 comments on commit 4f84ada

Please sign in to comment.