vmarcinko
Aug 28th, 2004, 03:30 AM
Hi.
I'm using Turbine as my legacy web layer, and Spring as service layer framework fetching ApplicationContext using WebApplicationContextUtils class.
Anyway, I'm pretty happy with everything except one problem exist. If I have let's say 2 beans configured as :
<bean id="service1" class="my.company.FirstService">
<property name="appCode"><value>333</value></property>
... some other properties...
</bean>
<bean id="service2" class="my.company.SecondService">
<property name="appCode"><value>333</value></property>
... some other properties...
</bean>
I would like somehow this mutual appCode property to place on some global place, thus to set this 333 value just on one place, and not having to set it on 2 places for each bean separately. Moreover, this appCode property would need somehow to be accessible to my web layer, since I see it for presentation purposes.
Is it possible somehow ?
Do I have to restructure my beans to use MessageSource dependency instead of plain property setter, and place such global settings in resource .property file ?
Cheers,
Vjeran
I'm using Turbine as my legacy web layer, and Spring as service layer framework fetching ApplicationContext using WebApplicationContextUtils class.
Anyway, I'm pretty happy with everything except one problem exist. If I have let's say 2 beans configured as :
<bean id="service1" class="my.company.FirstService">
<property name="appCode"><value>333</value></property>
... some other properties...
</bean>
<bean id="service2" class="my.company.SecondService">
<property name="appCode"><value>333</value></property>
... some other properties...
</bean>
I would like somehow this mutual appCode property to place on some global place, thus to set this 333 value just on one place, and not having to set it on 2 places for each bean separately. Moreover, this appCode property would need somehow to be accessible to my web layer, since I see it for presentation purposes.
Is it possible somehow ?
Do I have to restructure my beans to use MessageSource dependency instead of plain property setter, and place such global settings in resource .property file ?
Cheers,
Vjeran