-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I would really like for someone to explain to me how is this possible, and what is going on in the background?
Here is the detailed explanation...
I have a service (deviceService) singleton bean, which wraps DAO singleton bean. Service bean is form package that is used for spring's transaction management. Here is the key part of my spring config (spring autowiring is turned off by default !!!):
<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate"> <property name="sessionFactory" ref="sessionFactory" ></property> <property name="maxResults" value="3000" ></property> </bean> <bean id="baseDAO" abstract="true" class="org.irvas.amregina.backend.dao_implement.BaseDAO"> <property name="hibernateTemplate" ref="hibernateTemplate" ></property> </bean> <bean id="deviceDAO" class="org.irvas.amregina.backend.dao_implement.DeviceDAOImplement" parent="baseDAO" ></bean> <bean id="deviceService" class="org.irvas.amregina.backend.service_implement.DeviceServiceImplement" > <property name="deviceDAO" ref="deviceDAO" ></property> </bean> <tx:advice id="serviceTxAdvice" transaction-manager="transactionManager"> <tx:attributes> <tx:method name="*" propagation="REQUIRED" ></tx:method> </tx:attributes> </tx:advice> <aop:config> <aop:pointcut id="serviceMethodsRMS" expression="execution(* org.irvas.amregina.backend.service.*.*(..))" ></aop:pointcut> <aop:advisor advice-ref="serviceTxAdvice" pointcut-ref="serviceMethodsRMS" ></aop:advisor> </aop:config>
That is for the backend. Now, there is another config file for ZK controllers (GFC extends GenericForwardComposer):
<bean id="userWorkspace" class="de.forsthaus.UserWorkspace" scope="session" ></bean> <bean id="basisCtrl" abstract="true" class="de.forsthaus.webui.util.GFCBaseCtrl" scope="prototype"> <property name="userWorkspace" ref="userWorkspace" ></property> </bean> <bean id="deviceListCtrl" class="org.irvas.amregina.frontend.controllers.devicelist.DeviceListCtrl" parent="basisCtrl" scope="prototype"> <!-- <property name="deviceService" ref="deviceService"></property> --> </bean>
DeviceListCtrl.setDeviceService(IDeviceService) line: 174 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 597 Components$Wire.injectByMethod(Method, Class, Class, Object, String) line: 1156 Components$Wire.wireOthers(Object) line: 1011 Components$Wire.myWireVariables(Object) line: 975 Components$Wire.wireVariables(Component) line: 971 Components$Wire.access$500(Components$Wire, Component) line: 880 Components.wireVariables(Component, Object, char, boolean, boolean) line: 525 DeviceListCtrl(GenericAutowireComposer).doAfterCompose(Component) line: 275 DeviceListCtrl(GenericForwardComposer).doAfterCompose(Component) line: 130 UiEngineImpl.execCreateChild0(CreateInfo, Component, ComponentInfo, String) line: 740 UiEngineImpl.execCreateChild(CreateInfo, Component, ComponentInfo, UiEngineImpl$ReplaceableText) line: 686 UiEngineImpl.execCreate0(CreateInfo, NodeInfo, Component) line: 630 UiEngineImpl.execCreateChild(CreateInfo, Component, ComponentInfo, UiEngineImpl$ReplaceableText) line: 662 UiEngineImpl.execCreate0(CreateInfo, NodeInfo, Component) line: 630 UiEngineImpl.execCreate(CreateInfo, NodeInfo, Component) line: 597 UiEngineImpl.createComponents(Execution, PageDefinition, Page, Component, Map) line: 927 ExecutionImpl(AbstractExecution).createComponents(String, Component, Map) line: 234 Executions.createComponents(String, Component, Map) line: 178 DefaultTreecell.createPage(Map) line: 121 DefaultTreecell.onEvent(Event) line: 58 EventProcessor.process0(Scope) line: 192 EventProcessor.process() line: 138 EventProcessingThreadImpl.process0() line: 517 EventProcessingThreadImpl.run() line: 444
Asked: 2011-12-23 14:17:36 +0800
Seen: 878 times
Last updated: Jan 17 '12