Trying to get the new bean scope "Session" to work
So i have my coldspring file setup like this:
.....
<!-- Services -->
<bean id="CS.AbstractService"
class="careerfair.extensions.components.model.AbstractService"
abstract="true">
<property name="CareerfairDAO"><ref
bean= "CareerfairDAO" /></property>
<property
name="NotificationService"><ref
bean="NotificationService" /></property>
<property
name="sessionConfig"><ref bean="sessionConfig"
/></property>
</bean>
<bean id="SecurityService"
class="careerfair.extensions.components.model.SecurityService"
parent="CS.AbstractService">
<property
name="SecurityDAO"><ref bean="SecurityDAO"
/></property>
<property
name="NTSecurity"><ref bean="NTSecurity"
/></property>
</bean>
<!-- Util -->
<bean id="sessionConfig"
class="careerfair.extensions.components.util.SessionConfig"
scope="session">
<constructor-arg
name="isAdmin"><value>false</value></constructor-arg>
<constructor-arg
name="isLoggedIn"><value>false</value></constructor-arg>
<constructor-arg
name="User"><value>${user}</value></constructor-arg>
</bean>
....
So the way i thought this would work was if I set the scope of
"SessionConfig" to session, any properties i change within the bean
(during runtime) would stay in the session scope.
So I ran this test within "SecurityService" bean
...
if (cgi.server_name eq "localhost") {
getSessionConfig().setisLogged(1);
writeoutput("setLoggedIn");
}
...
And then I checked values using two computers to see if the values would be
unique between the two environments, but unfortunately the
"SessionConfig" doesn’t appear to be functioning as a session scope
bean. Was wondering if I set this up correctly?
--
You received this message because you are subscribed to the Google Groups "ColdSpring-Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/coldspring-users/-/XRAjgIW91toJ.
To post to this group, send email to coldspri...@googlegroups.com.
To unsubscribe from this group, send email to coldspring-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/coldspring-users?hl=en.