DefaultScriptSessionManager version issue + setting attribute in ScriptSession

View: New views
3 Messages — Rating Filter:   Alert me  

DefaultScriptSessionManager version issue + setting attribute in ScriptSession

by DNC1234 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi -

I was trying to extend DefaultScriptSessionManager class so as to add attributes to "ScriptSession". My implementation was totally based upon Lance Semmens implementation from a prior post:

public class MyScriptSessionManager extends DefaultScriptSessionManager {
     public String createScriptSession(RealWebContext webContext)
         String id = super.createScriptSession();
         ScriptSession scriptSession = getScriptSession(id);
         HttpSession session = webContext.getHttpSession();
         Object someUserSpecificObject =
         session.getAttribute("someUserSpecificObject");
         scriptSession.setAttribute("someUserSpecificObject",
         someUserSpecificObject);
         return id;
     }
 }

But then I ran into a strange problem, I downloaded DWR 2.0.5 & 3.rc1 and in both the jar files, DefaultScriptSessionManager  class did not have method "createScriptSession()" which I was planning to override. So I am kind of stuck and unable to figure out how to provide the  above implementation to set attributes in ScriptSession. I had downloaded both set of jar files from DWR official site.

Did anyone run into this issue before? Or if things have changed and I am not aware of?


Best Regards,
DNC

Re: DefaultScriptSessionManager version issue + setting attribute in ScriptSession

by DNC1234 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Still looking around, does anyone have any answers?

DNC1234 wrote:
Hi -

I was trying to extend DefaultScriptSessionManager class so as to add attributes to "ScriptSession". My implementation was totally based upon Lance Semmens implementation from a prior post:

public class MyScriptSessionManager extends DefaultScriptSessionManager {
     public String createScriptSession(RealWebContext webContext)
         String id = super.createScriptSession();
         ScriptSession scriptSession = getScriptSession(id);
         HttpSession session = webContext.getHttpSession();
         Object someUserSpecificObject =
         session.getAttribute("someUserSpecificObject");
         scriptSession.setAttribute("someUserSpecificObject",
         someUserSpecificObject);
         return id;
     }
 }

But then I ran into a strange problem, I downloaded DWR 2.0.5 & 3.rc1 and in both the jar files, DefaultScriptSessionManager  class did not have method "createScriptSession()" which I was planning to override. So I am kind of stuck and unable to figure out how to provide the  above implementation to set attributes in ScriptSession. I had downloaded both set of jar files from DWR official site.

Did anyone run into this issue before? Or if things have changed and I am not aware of?


Best Regards,
DNC

Re: DefaultScriptSessionManager version issue + setting attribute in ScriptSession

by Lance Java :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Call addScriptSessionListener() in MyScriptSessionManager's constructor instead.... the scriptSessionListener will do the work.

2009/11/6 DNC1234 <devajyoti.c@...>

Still looking around, does anyone have any answers?


DNC1234 wrote:
>
> Hi -
>
> I was trying to extend DefaultScriptSessionManager class so as to add
> attributes to "ScriptSession". My implementation was totally based upon
> Lance Semmens implementation from a prior post:
>
> public class MyScriptSessionManager extends DefaultScriptSessionManager {
>      public String createScriptSession(RealWebContext webContext)
>          String id = super.createScriptSession();
>          ScriptSession scriptSession = getScriptSession(id);
>          HttpSession session = webContext.getHttpSession();
>          Object someUserSpecificObject =
>          session.getAttribute("someUserSpecificObject");
>          scriptSession.setAttribute("someUserSpecificObject",
>          someUserSpecificObject);
>          return id;
>      }
>  }
>
> But then I ran into a strange problem, I downloaded DWR 2.0.5 & 3.rc1 and
> in both the jar files, DefaultScriptSessionManager  class did not have
> method "createScriptSession()" which I was planning to override. So I am
> kind of stuck and unable to figure out how to provide the  above
> implementation to set attributes in ScriptSession. I had downloaded both
> set of jar files from DWR official site.
>
> Did anyone run into this issue before? Or if things have changed and I am
> not aware of?
>
>
> Best Regards,
> DNC
>

--
View this message in context: http://old.nabble.com/DefaultScriptSessionManager-version-issue-%2B-setting-attribute-in-ScriptSession-tp26217374p26230824.html
Sent from the DWR - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...