Hi,
On Apr 10, 2007, at 11:30 AM, Meindert wrote:
My question is;
a) can I still use org.apache.struts.beanaction.BeanAction? I only
want to change the DAO to Spring DAO because IBATIS DAO is depreciated
and if so
b) The BeanAction class is using
private static final TheService theService = TheService.getInstance();
to connect with the service object, what created itself static;
private static final TheService instance = new TheService();
How do I get a instance from the spring created service object?
Yes, you can do this. Since your BeanAction is not a Spring managed
bean you can use @Configurable to dependency inject arbitrary objects
in your application:
http://static.springframework.org/spring/docs/2.0.x/reference/
aop.html#aop-atconfigurable
This only works if you are using JDK5 and are willing to add AspectJ
to your project :)
Tom