Deployment API (JSR-88)

I'm trying to code a client to deploy a Web app using the Deployment API.

I'm able to get an object returned by DeploymentFactoryManager.getDeploymentManaget(...), but, when I try to invoke getTargets() on this DeploymentManager object I receive IllegalStateException indicating a disconnected state.

Isn't getDeploymentManager() supposed to return a connected deployment manager?

And this is the full exception message::

java.lang.IllegalStateException: access denied (javax.management.MBeanPermission com.sun.appserv.management.config.DomainConfig#getStandaloneServerConfigObjectNameMap[amx:j2eeType=X-DomainConfig,name=na] invoke)

[667 byte] By [vincentssna] at [2008-1-9]
# 1

I am trying to get an instance of DeploymentManager using jsr 88. The following two lines are the codes but I am getting the exception below. I have checked many times that the URL is okay and the credentials are absolutely okay. I have never got any help from any website/google search/forums, since this seems to be an advanced/latest concept. If you have any solution, please post here.

DeploymentFactoryManager dfm=DeploymentFactoryManager.getInstance();

DeploymentManager MyconnectedManager = dfm.getDeploymentManager("http://127.0.0.1/console","weblogic","weblogic");

Exception:

javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException: Could not get DeploymentManager

at javax.enterprise.deploy.shared.factories.DeploymentFactoryManager.getDeploymentManager(DeploymentFactoryManag

er.java:120)

at Deploy_Ind.main(Deploy_Ind.java:45)

Gurumurthy_Khandulvaa at 2007-7-10 > top of java,Enterprise & Remote Computing,AVK Portability...