10 Replies Latest reply on Jun 24, 2009 6:20 AM by Gurkan Erdogdu

    Install from Annotations

    Gurkan Erdogdu Newbie

      I am trying to install bean into kernel via bean class annotations. I wrote the following code

      BeanMetaData meta = AnnotationToBeanMetaDataFactory.createBeanMetaData(Person.class);
      KernelControllerContext context = getKernel().getController().install(meta);

      I am getting exception with "Null name".

      But if I set meta.setName(name), no exception.
      Actually, Person class is annotated with @Bean(name="name"), why it throws Exception?