-
1. Re: MainDeployer MBean methods in JBoss 5
adrian.brock Jun 23, 2008 8:29 AM (in response to wolfgangknauf)The URL based methods should still work. We use them in the testsuite ourselves,
so if they were broken we'd expect to know about it. ;-)
The DeploymentInfo stuff won't work because that's no longer maintained/used.
The current replacement is DeploymentUnit but we should really be using
the profile service/managed view rather than exposing the DeploymentUnit to clients.
However, I don't understand why you don't just use jsr88?
It's a standard deployment api for all JavaEE appservers,
I know NetBeans uses it for deploying into JBoss. -
2. Re: MainDeployer MBean methods in JBoss 5
wolfgangknauf Jun 23, 2008 5:46 PM (in response to wolfgangknauf)Thanks for the reply.
I will take a look at JSR88, maybe I find an easy way to add it to the eclipse deployer.
Some time ago I did some testing with undeploy/deploy on linux, and as I remember there worked more than on windows. Maybe there is a windows problem?
Best regards
Wolfgang -
3. Re: MainDeployer MBean methods in JBoss 5
wolfgangknauf Jul 3, 2008 4:56 AM (in response to wolfgangknauf)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/main/org/jboss/test/deployment/BaseDeploymentTestCase.java?revision=62584&view=markup. 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 -
4. Re: MainDeployer MBean methods in JBoss 5
adrian.brock Jul 3, 2008 5:52 AM (in response to wolfgangknauf)"Wolfgang Knauf" wrote:
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?
This is more a question for the user forums not here.
Start with the JSR88 spec
http://jcp.org/en/jsr/detail?id=88
It's not big on code snippets but it does have lots of diagrams
explaining the "protocol", e.g. the Progress object.
The only hint I found is this: http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/trunk/testsuite/src/main/org/jboss/test/deployment/BaseDeploymentTestCase.java?revision=62584&view=markup.
Actually, this brings up an important issue, this test is not being run in our
normal testsuite runs.
In fact, it is failing at the moment:deployment-service-unit-tests: [echo] Starting patternset=deployment-service.includes config=DeploymentService [junit] Running org.jboss.test.deployment.test.DeploymentServiceUnitTestCase [junit] Tests run: 17, Failures: 5, Errors: 4, Time elapsed: 38.16 sec [junit] Test org.jboss.test.deployment.test.DeploymentServiceUnitTestCase FAILED
-
5. Re: MainDeployer MBean methods in JBoss 5
wolfgangknauf Jul 17, 2008 10:27 AM (in response to wolfgangknauf)Filed a bug for the failing test (though I haven't seen it myself): https://jira.jboss.org/jira/browse/JBAS-5776
-
6. Re: MainDeployer MBean methods in JBoss 5
wolfgangknauf Aug 4, 2008 2:48 PM (in response to wolfgangknauf)Made my way through the JBoss testcase, and as a result, I wrote this Wiki article:
http://wiki.jboss.org/wiki/JSR88Client
Maybe you can take a look at it and comment on it.
Best regards
Wolfgang