1 Reply Latest reply on Sep 15, 2006 3:24 AM by vickyk

    Getting Kernel as null ......

    vickyk

       

      StandaloneBootstrap iocHook = new StandaloneBootstrap(ar);
       iocHook.main(ar);
       //icoHook.run();
       Kernel kernel = iocHook.getKernel();
       System.out.println("Kernel is "+kernel);
      


      Why do I get the kernel as null ?
      I have jboss-beans.xml in the classpath it loads the bean which is defined in that , actaully I was wonderitng if I can get the bean back from the KernelRegistry .
      But before exploring more API's I got kenel as null ....

      What am I missing ?

      Regards
      Vicky


        • 1. Re: Getting Kernel as null ......
          vickyk

          Well I got this working; I need to make the following call
          iocHook.bootstrap(); rathar than the iocHook.main(ar);
          I think I need to go through the code details to understand why this is happening....
          Why I was making the main() call was because it was documented

          Vicky