Skip to content

Instantly share code, notes, and snippets.

apiVersion: backstage.io/v1alpha1
kind: API
metadata:
name: balances-api
description: Retrieve account balances
spec:
type: openapi
lifecycle: production
owner: acmefinancial
system: acme-engagement-portal
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-current.xsd">
org.mule.api.config.ConfigurationException: Line 15 in XML document from URL [file:/Users/john.demic/AnypointStudio/db-batch-messaging/jms-batch-messaging-connector/target/test-classes/jms-batch-messaging-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 15; columnNumber: 19; cvc-complex-type.2.4.a: Invalid content was found starting with element 'jms-batch-messaging:config-type'. One of '{"http://www.mulesoft.org/schema/mule/core":annotations, "http://www.mulesoft.org/schema/mule/core":description, "http://www.springframework.org/schema/beans":beans, "http://www.springframework.org/schema/beans":bean, "http://www.springframework.org/schema/context":property-placeholder, "http://www.springframework.org/schema/beans":ref, "http://www.mulesoft.org/schema/mule/core":global-property, "http://www.mulesoft.org/schema/mule/core":configuration, "http://www.mulesoft.org/schema/mule/core":notifications, "http://www.mulesoft.org/schema/mule/core":abstract-extension, "http://www.mules
@johndemic
johndemic / keybase.md
Created April 15, 2015 01:34
keybase.md

Keybase proof

I hereby claim:

  • I am johndemic on github.
  • I am johndemic (https://keybase.io/johndemic) on keybase.
  • I have a public key whose fingerprint is 1393 7573 A9F1 9E89 D4B0 EEF3 07BE 3A45 D0DA 31FE

To claim this, I am signing this object:

@johndemic
johndemic / cassandra-idempotent-config.xml
Created September 24, 2013 15:53
An example of using the CassandraDbObjectStore to distribute the state of an idempotent-message-filter.
<spring:bean id="cassandraObjectStore" class="com.mulesoft.mule.cassandradb.CassandraDBObjectStore"
scope="singleton">
<spring:property name="host" value="cassandradb.acmesoft.com"/>
<spring:property name="port" value="9160"/>
<spring:property name="keyspace" value="MuleState"/>
<spring:property name="consistencyLevel" value="ALL"/>
<spring:property name="defaultPartitionName"
value="idempotentFlow_#[new java.text.SimpleDateFormat('yyyy_MM_dd').format(new Date())]"/>
</spring:bean>
@BeforeClass
public static void installLicense() throws Exception {
LicenseManager licenseManager = LicenseManagementFactory.getInstance()
.createLicenseManager(LicenseManagementFactory.MULE_EE);
MuleLicenseKey license = new MuleLicenseKey();
license.setLicenseKeyFile(MyFunctionalTestCase.class
.getResource("/test.lic").getPath());
licenseManager.install(license);
}
/*
* $Id: UntilSuccessful.java 24377 2012-05-21 12:35:37Z pablo.kraan $
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
/**
* Execute a JPA query. If the payload of the message is a <code>List</code> or <code>Map</code> then its used
* as the query parameters. If neither statement nor namedQuery are set then the payload of the message is assumed
* to be a <code>CriteriaQuery</code> instance.
* <p/>
* {@sample.xml ../../../doc/JPAModule-connector.xml.sample jpa:query}
*
* @param statement a JPA QL statement to execute
* @param namedQuery a named query to execute
* @param queryParameters the query parameters
- (IBAction)storePassword:(id)sender
{
NSString *service = [NSString stringWithFormat:@"%@@%@", [username stringValue], [address stringValue]];
if ([SSKeychain passwordForService:service account:@"KH"] != nil) {
NSError *error = nil;
if ([SSKeychain deletePasswordForService:service account:@"KH" error:&error] == NO) {
NSLog(@"Could not delete existing password");
}
@johndemic
johndemic / gist:3916048
Created October 19, 2012 03:20
StockQuoteRequestClient
StockQuoteRequest stockQuoteRequest = new StockQuoteRequest();
stockQuoteRequest.setSymbol("FB");
stockQuoteRequest.setStartDate(new Date( new Date().getTime() - (86400000 * 7)));
stockQuoteRequest.setEndDate(new Date());
ZMQ.Socket zmqSocket = zmqContext.socket(ZMQ.REQ);
zmqSocket.setReceiveTimeOut(RECEIVE_TIMEOUT);
zmqSocket.connect("tcp://localhost:9090");
zmqSocket.send(stockQuoteRequest.toProtocolBufferAsBytes(), 0);