Hi Naveen,

You want to access ULCSession from a thread other than the one in which
ULC App is running? If yes this is not prmitted as ULCSession is
ThreadLocal.

>>>>
I have deployed a ULC application in the application server. I also have a
ServletContextListener class to receive asynchronous notifications and
provide the processed data to the application that is already running.
>>>>

For this you can use a ULCPollingTimer which at regular intervals will
initiate server roundtrips and then in actionPerformed) method of the
polling timer you can access the processed data stored in ServletContext.

>>>
an exception as I do not have any ApplicationContext. How do I get the
ApplicationContext of an application that is already running on the server
using the ServletContext.
>>> 

Can you please tell me what is your requirement?

BTW, ULCSession is stored inside the HTTPSession. It can be accessed as
follows:

SessionStore sessionStore =
ServletContainerAdapterHelper.getSessionStore(httpSessionEvent.getSession(
));
        if (sessionStore != null) {
            String[] sessionIds = sessionStore.getSessionIds();
            for (int i = 0; i < sessionIds.length; i++) {
                String sessionId = sessionIds[i];
                ISession session = sessionStore.get(sessionId);
...



Thanks and regards,

Janak

-----------------------------------------
Janak Mulani

email: [email protected]
url: http://www.canoo.com <http://www.canoo.com/> 

Beyond AJAX - Java Rich Internet Applications

http://www.canoo.com/ulc
----------------------------------------- 

 


________________________________

        From: [email protected]
[mailto:[email protected]] On Behalf Of Naveen Bojja
        Sent: Tuesday, December 01, 2009 12:30 AM
        To: [email protected]
        Subject: [ULC-developer] How to get Application Context of an
application using the Servlet Context
        
        

        Hi,

         

        I have deployed a ULC application in the application server. I
also have a ServletContextListener class to receive asynchronous
notifications and provide the processed data to the application that is
already running. But I am getting an exception as I do not have any
ApplicationContext. How do I get the ApplicationContext of an application
that is already running on the server using the ServletContext.

         

        Thanks in advance for your response.

         

        Thanks,

        Naveen

_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to