2 Replies Latest reply on Sep 4, 2007 12:46 AM by Satyanarayana A

    How to create a POJO at the the start of application and att

    Satyanarayana A Newbie

      How to create a POJO at the the start of application and attach it to JNDI automatically?

      I am migrating an application from Tomcat to JBoss. In the current application setup, we have a POJO and it is loaded automatically by Tomcat and placed under JNDI ( with a prefix of java:comp/env/) because we have mentioned the bean reference in context.xml along with the required properties.

      Is there a way to achieve this in JBoss? I tried to create .beans archive and included in .ear file. Now i could see that the bean is instantiated and all its setter methods are called (evident from log messages). How ever this bean is not placed under JNDI. Also i do not know how to access that instance!

      Thanks
      Satya