Created
January 29, 2012 13:50
-
-
Save tamirko/1698917 to your computer and use it in GitHub Desktop.
Exposing the mongos service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In <cloudify root>/recipes/apps/petclinic/mongos/mongos_install.groovy | |
import com.gigaspaces.cloudify.dsl.context.ServiceContextFactory | |
// ... | |
// Getting the mongos service instance ID | |
instanceID = serviceContext.getInstanceId() | |
// Calculating the mongos port and storing it in the serviceContext for later use | |
// (by the service and by other services). | |
serviceContext.attributes.thisInstance["port"] = config.basePort+instanceID | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment