code: public void shutdown() throws Throwable
     {
        if (!started)
           throw new IllegalStateException("Container not started");
  
        if (shrinkwrapDeployments != null && !shrinkwrapDeployments.isEmpty())
        {
           List<File> copy = new ArrayList<File>(shrinkwrapDeployments);
           for (File f : copy)
           {
              removeDeployment(f);
           }
        }
  
        if (fullProfile)
        {
           undeploy(SecurityActions.getClassLoader(EmbeddedJCA.class), "ds.xml");
           undeploy(SecurityActions.getClassLoader(EmbeddedJCA.class), "jca.xml");
           undeploy(SecurityActions.getClassLoader(EmbeddedJCA.class), "transaction.xml");
           undeploy(SecurityActions.getClassLoader(EmbeddedJCA.class), "stdio.xml");
           undeploy(SecurityActions.getClassLoader(EmbeddedJCA.class), "naming.xml");
        }
  
        kernel.shutdown();
  
        started = false;
     }
docs: Shutdown
  @exception Throwable If an error occurs