[jboss-dev-forums] [Design of POJO Server] - Re: Getting the whole cause stack of the deployment exceptio

adrian@jboss.org do-not-reply at jboss.com
Tue Jun 30 08:20:50 EDT 2009


"pete.muir at jboss.org" wrote : 
  | "alesj" wrote : Wrt to having entire exception in IDE, I think we would need to change too much code, in order to still properly display any useful info.
  |   | (we're already not the greatest there, but the issue is more complex than it looks like)
  |   | 
  | 
  | For me, IDE isn't a big problem. My use case is that I need to examine deployment exceptions (root cause and sometimes the next level or so up) in an testsuite so I can verify that the correct error happened on deployment.
  | 


  | try
  | {
  |    deploySomething();
  | }
  | catch (IncompleteDeploymentException e)
  | {
  |    Throwable t = e.getDeploymentsInError().get(deploymentURL);
  |    // assert things here
  | }
  | 

Or if you aren't directly deploying something, 
e.g. the test framework does the deployment.
You can run the check later:


  | try
  | {
  |    deployerClient.checkComplete(deploymentURL);
  | }
  | catch (IncompleteDeploymentException e)
  | {
  |    // as before.
  | }
  | 

Or finally more direct access (if you want to peek under the covers into unsupported code):

  |    MainDeployerStructure mds = (MainDeployerStructure) mainDeployer;
  |    DeploymentContext dc = mds.getDeploymentContext(deploymentURL);
  |    Throwable t = dc.getProblem();
  |    // etc.
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241020#4241020

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241020



More information about the jboss-dev-forums mailing list