java ee - Detecting the actual completion of programmatic deployment in JBoss 7.1.x -


i'm developing app performs programmatic deployment of ejbs in jboss 7.1.x. here's code snippet:

// connect commandcontext cmdctx =    commandcontextfactory.getinstance().newcommandcontext(...); cmdctx.connectcontroller(); modelcontrollerclient ctrlclient = cmdctx.getmodelcontrollerclient(); // deploy string command =    string.format("deploy \"%s\" --name=%s --server-groups=%s", path, name, group); modelnode request = cmdctx.buildrequest(command); ctrlclient.execute(request);

now, how can determine deployment has completed? call ctrlclient.execute(request) returns immediately, server continues process deployment time. need know when it's done, , maybe if succeeded or not.

one idea have write own logging appender, , predefined messages, there nicer solution?

instead of using cli api try org.jboss.as.controller.client.helpers.standalone.deploymentplan or org.jboss.as.controller.client.helpers.domain.deploymentplan api's. can see example of in maven-plugin source. (note domain 1 appears you're deploying domain server)


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -