I have the following use case in my legacy application
My bundle looks as follows with the following configuration
<bean id="bean1" class="com.test.bean1" init-method="init"/>
<bean id="bean2" class="com.test.bean2" init-method="init"/>
Class Bean1
{
public void init()
{
Myclass m = new MyClass();
m.initialize();
....
...........
}
}
Class Myclass()
{
public void initilize()
{
//**********************
I WANT TO ACCESS OTHER BEANS(*** bean 2 ***) HERE ???
}
}
One way to access is making my beans ApplicationContextAware and use this application context in my bundle to access the bean. But is that the best way or is there any other way out ?
This boils down to me having one class implementing ApplicationContextAware
per bundle :-( .


