Created
February 21, 2013 20:22
-
-
Save justinedelson/5007868 to your computer and use it in GitHub Desktop.
Groovy script to unquiesce a CQ/CRX instance
This file contains hidden or 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
import javax.management.remote.JMXServiceURL; | |
import javax.management.remote.JMXConnectorFactory; | |
import javax.management.ObjectName; | |
// assuming that CQ is started with -Dcom.sun.management.jmxremote.port=9000 | |
def jmxUrl = "service:jmx:rmi:///jndi/rmi://localhost:9000/jmxrmi"; | |
def serviceUrl = new JMXServiceURL(jmxUrl); | |
def jmxConnector = JMXConnectorFactory.connect(serviceUrl); | |
def mbeanConn = jmxConnector.getMBeanServerConnection(); | |
def repositoryName = new ObjectName("com.adobe.granite:type=Repository"); | |
mbeanConn.invoke(repositoryName, "unblockRepositoryWrites", new Object[0], new String[0]); | |
System.out.println("The System is now unquiesced."); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment