Re: [Figleaf-developer] Bootstrapper vs ConfigurableBootstrapper
Status: Alpha
Brought to you by:
steckman
|
From: Greg S. <ste...@on...> - 2004-07-05 15:18:37
|
sam...@ma... wrote: >Quoting Greg Steckman <ste...@on...>: > > > >>These two are almost identical now. The difference I can see is that >>Bootstrapper is a singleton while ConfigurableBootstrapper is not, and >>ConfigurableBootstrapper runs the bean named Runnable rather than from a >>command line parameter. >> >>Bootstrapper is a singleton because I needed a way in the GUI code to >>get the ObjectManager without relying on the Spring ApplicationContext. >> >>Greg >> >> >> > >We can use Spring to 'inject' the ObjectManager into your SwingViewer - this is >how I handle my ConfigurationViewer. I don't rely on Spring for this either, I >just rely on being able to get an ObjectManager from whatever >ApplicationConfiguration I'm using. > >sam >http://www.magpiebrain.com/ > > > > I will kill ConfigurableBootstrapper then. Spring does inject ObjectManager into SwingViewer. The problem was with objects not created by Spring that still needed access to the ObjectManager. How does it get it? I opted to make Bootstrapper a singleton for that purpose. I needed access to ObjectManager for the "save" button so it could persist objects. Greg |