Sebastien Arbogast wrote:
You should simply find all your beans through the ServiceLocator class
which is generated by the Spring cartridge, without any headaches at
all! Which kind of problems did you have?


I think there was some kind of incompatibility problem between the way
the ServiceLocator works and the fact that my HSQL database is wrapped
into a Spring component. Because when I tried to access some bean
through the ServiceLocator there was a BeanCreationException on my
HsqlServer bean. I guess it's because when it tries to load this bean,
it calls its init method again and tries to start the database a
second time (it's already been started when the application context
was loaded with the webapp).
But I think I finally found out a solution without modifying the
structure, which I realize is a good thing because now I understand
the purpose of this organization. In fact now I just don't use the
ServiceLocator. I just access my beans through the BeanRefFactory,
something like this :
applicationContext.getBean("beanRefFactory").getBean("myBean").


the ServiceLocator works fine in any scenario, can you be more specific as to what is causing your problem ?


-- Wouter


------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Andromda-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to