How can I read the initialization parameters for a bean, i.e. similar to what happens in servlets when we user the ServletConfig class and then use it's getInitParameter() function?
Use either the getResourceAsStream() or getSystemResourceAsStream() method of the ClassLoader to locate the file.
Java 1.2 introduced the BeanContext runtime containment and services protocol which essentially does this for you. You can learn more about it from the Sun tutorial at Lesson: Using the BeanContext API. Unfortunately, they don't describe how to provide intiialization parameters. Basically, the getResourceXXX() methods are now used off the BeanContext, instead of the ClassLoader.