[jboss-dev-forums] [Design the new POJO MicroContainer] - Use of Throwable in method signatures

scott.stark@jboss.org do-not-reply at jboss.com
Tue Jul 11 16:38:49 EDT 2006


The use of Throwable in a number of the mc signatures causes integration issues with other apis that only expose an Exception. For example, the BeanDeployer initialization of the BasicXMLDeployer in start is going to have to catch a Throwable and cast it to either an Error subtype or Exception subtype:


  |    /** Overriden to initialize the BasicXMLDeployer
  |     */
  |    @Override
  |    public void start() throws Exception
  |    {
  |       kernelDeployer = new BasicXMLDeployer(context.getKernel());
  |       super.start();
  |    }
  | 

In the case of an actual Throwable being seen it will have to be wrapped. Can we just use Exception as the base throws signature in the mc?


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

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



More information about the jboss-dev-forums mailing list