I haven't used Spring frameworks before but I really like what Spring Social has to offer so I am digging in.
I would like to inject a session id into constructor rather then #{request.userPrincipal.name} as shown in the docs. Even though I am using Spring Security for this application, there will be several Users assigned to an Account and all Twitter connections should be associated with that Account. So I am trying #{session.accountId} but get an error.
How can I use a session variable for connectionRepository constructor?
Code:Field or property 'accountId' cannot be found on object of type 'org.apache.catalina.session.StandardSessionFacade'Thank you for your time,Code:<bean id="connectionRepository" factory-method="createConnectionRepository" factory-bean="usersConnectionRepository" scope="request"> <constructor-arg value="#{session.accountId}"/> <aop:scoped-proxy proxy-target-class="false"/> </bean>
Fedor


Reply With Quote
