Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
timyates committed Jan 17, 2013
1 parent 5902f87 commit 90a2541
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,30 @@ Default config:
transactiontimeout : 10000
}

When the mod is loaded successfully, it will send a message:

{ status: "ok" }

To the address in the config with `.ready` appended to the end.

This means you can do:

var persistorConfig = { address: 'test.persistor', url: 'jdbc:hsqldb:mem:' + vertx.generateUUID() + '?shutdown=true' }
var readyAddress = persistorConfig.address + '.ready'
var readyHandler = function( msg ) {
if( msg.status === 'ok' ) {
eb.unregisterHandler( readyAddress, readyHandler ) ;

// MOD IS READY TO GO!!!
}
} ;

// This will get called by the jdbc-persistor when it has installed the work-queue
eb.registerHandler( readyAddress, readyHandler ) ;
vertx.deployModule('com.bloidonia.jdbc-persistor-v1.2', persistorConfig, 1, function() {} ) ;

And when the `readyHandler` is called, you know your work-queue is up and running.

Currently attempts to support:

# Interface Specification
Expand Down

0 comments on commit 90a2541

Please sign in to comment.