[jboss-dev-forums] [Design of POJO Server] - Re: AbstractDeploymentTest still using DeploymentContext
alesj
do-not-reply at jboss.com
Fri Nov 9 09:56:57 EST 2007
OK, this DS check can be changed to this simple true/false:
| boolean deployed = isDeployed(info.getName());
| assertTrue("Should be fully deployed: " + shortName, deployed);
|
Where 'isDeployed' is this:
| protected boolean isDeployed(String deployment) throws Exception
| {
| URL deployURL = getDeployURL(deployment);
| String[] sig = { URL.class.getName() };
| Object[] args = {deployURL};
| return invokeMainDeployer("isDeployed", args, sig, Boolean.class);
| }
|
| protected <T> T invokeMainDeployer(String methodName, Object[] args, String[] sig, Class<T> clazz) throws Exception
| {
| if (clazz == null)
| throw new IllegalArgumentException("Null class.");
|
| MBeanServerConnection server = getServer();
| Object result = server.invoke(MainDeployerMBean.OBJECT_NAME, methodName, args, sig);
| return clazz.cast(result);
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103272#4103272
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103272
More information about the jboss-dev-forums
mailing list