Hi All,
I am currently using GWT , Spring & Custom JDBC in my application.
I require some data to be put in Session and used everywhere in the application. So I have written one Utility class which has getSession() method and setObject() and getObject() Method().
I would like your opinion on the API used below
public static HttpSession getSession() {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder
.currentRequestAttributes();
return attributes.getRequest().getSession(false);
}
I hope that there is nothing wrong in using RequestContextHolder class of Spring for getting the Session Object.
Let me know if something is wrong.
Thanks,Niraj.