> 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").

And so far it works quite well and without any exception. But I have
not really persisted beans yet so I just hope I won't have bad
surprises.

Anyway thank you for the information. You guys do an amazing job with
AndroMDA. Thank you for that, too.

-- 
Sebastien ARBOGAST


-------------------------------------------------------
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_ide95&alloc_id396&op=click
_______________________________________________
Andromda-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to