Skip to content

Instantly share code, notes, and snippets.

View timmaybrown's full-sized avatar

Tim Brown timmaybrown

View GitHub Profile
@timmaybrown
timmaybrown / customJSON.cfc
Last active March 4, 2016 04:12
Here is a component that extends Ben Nadel's JSON Serializer CFC (http://www.bennadel.com/blog/2505-JsonSerializer-cfc-A-Data-Serialization-Utility-For-ColdFusion.htm) and uses the jsonUTIL project in lieu of native CF serialization to fix some known issues. This approach uses a CFDirectory call to find all my persistent CFCs (in this case they …
<cfcomponent extends="model.util.jsonSerializer" singleton="true">
<cfproperty name="jsonUTIL" inject="model" />
<cffunction name="init">
<!---// let's init Mr. Nadel's serializer--->
<cfset super.init()>
<!--- FOR Reference: PROPERTIES THAT ARE AVAILABLE due to the SUPER.init() call above
// Every key is added to the full key list.
@timmaybrown
timmaybrown / BaseRemoteHandler.cfc
Created September 24, 2014 18:08
ColdBox REST API: Example BaseRemoteHandler.cfc
component {
property name="customJSON" inject="model";
public void function preHandler(event, rc, prc){
prc["ret"] = {};
}
public any function onError(event, faultAction, exception, eventArguments){
//duplicate the PRC so it can be useful information during development
@timmaybrown
timmaybrown / Coldbox + Couchbase Client Start Up Locking Issue
Last active August 29, 2015 14:17
Coldbox + Couchbase Client Start Up Locking Issue
coldfusion.tagext.lang.LockTag$TimeoutException: A timeout occurred while attempting to lock WireBox.Singleton.couchbaseclient@cfcouchbase.
at coldfusion.tagext.lang.LockTag.doStartTag(LockTag.java:220)
at cfSingleton2ecfc125162580$funcGETFROMSCOPE.runFunction(C:\inetpub\wwwroot\ezapi\coldbox\system\ioc\scopes\Singleton.cfc:38)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231)
@timmaybrown
timmaybrown / WAITING on java.util.concurrent.CountDownLatch
Created March 18, 2015 06:13
cfcouchbase - WAITING on java.util.concurrent.CountDownLatch
"ajp-bio-8014-exec-1" Id=131 WAITING on java.util.concurrent.CountDownLatch$Sync@4c03dfda
java.lang.Thread.State: WAITING
at sun.misc.Unsafe.park(Native Method)
- waiting on java.util.concurrent.CountDownLatch$Sync@4c03dfda
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
at com.couchbase.client.vbucket.BucketUpdateResponseHandler.getReceivedFuture(BucketUpdateResponseHandler.java:149)
$stateProvider
.state('logout', {
url: '/logout',
controller: 'LogoutCtrl',
controllerAs: 'vm'
})
.state('loginLayout', {
abstract: true,
//url: '/',
views: {