I'm stuck. I found the deployment manager, but now I don't know how to continue.
Google does not help, either.
How do I deploy an application and wait for deployment? Has anybody a small code snippet?
My code up to now (to get the EAR deployer):
try {
| System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
| System.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
| System.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
|
| DeploymentFactoryManager dfm = DeploymentFactoryManager.getInstance();
|
| DeploymentFactory[] factories = dfm.getDeploymentFactories();
| System.out.println(factories.length);
| for (int i = 0; i < factories.length; i++) {
| System.out.println("Factory: " + factories);
| }
| DeploymentManager dm = dfm.getDeploymentManager(DeploymentManagerImpl.DEPLOYER_URI,
null, null);
|
| System.out.println("DeploymentManager: " + dm);
|
| Target[] targets = dm.getTargets();
|
| javax.enterprise.deploy.spi.TargetModuleID[] modules;
| modules = dm.getAvailableModules(javax.enterprise.deploy.shared.ModuleType.EAR,
targets);
|
| System.out.println(targets.length + " " + targets[0]);
| System.out.println(modules);
| } catch (Exception e) {
| e.printStackTrace();
| }
"getAvailableModules" returns always null
(
http://jira.jboss.org/jira/browse/JBAS-4078).
The only hint I found is this:
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/trunk/testsuite/src/ma....
But I'm not sure whether all those lines of code are required, so I would be glad if
someone could help me without having to dig through all this code.
Hope someone can help
Wolfgang
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4162266#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...