You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kris Rasmussen <kr...@yahoo.com> on 2003/09/13 21:20:43 UTC
Is it possible to share state between applications
I appologize for posting this question again, but I am not getting responses to any of my posts. I would really like to know if there is a means for sharing state between applications, wether it be via a shared visit object, the http session object, or something else. Is there a way to get the http session object from the application?
Thanks,
Kris Rasmussen.
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Re: Is it possible to share state between applications
Posted by Marilen Corciovei <le...@nemesisit.rdsnet.ro>.
I think tomcat has the concept of crossContext:
<<
crossContext
Set to true if you want calls within this application to
ServletContext.getContext() to successfully return a request dispatcher
for other web applications running on this virtual host. Set to false
(the default) in security conscious environments, to make getContext()
always return null.
>>
Still this seems to apply to the same virtual host so this might not be
what you want.
Len
On Sun, 2003-09-14 at 13:23, Kris Rasmussen wrote:
> Yes, that is what I am trying to do now. I am using tomcat, I havn't tryed anything yet but from what I've read in the documentation it seems like it would be possible. I am not very familiar with tomcat configuration, and I know that is not what this forum is about, but if anyone has any suggestions I'd appreciate it. Thanks.
>
> Kris
>
> Harish Krishnaswamy <hk...@comcast.net> wrote:
> By context I mean the servlet context / web application per the servlet
> spec. By application I mean Tapestry application (1 servlet, 1
> Visit/session, 1 Global). I suppose you can map two domains to a single
> context in your servlet container and run your two applications under
> this same context. From Tapestry's point of view these are treated as
> two different applications but the container treats them as one.
> Although I say this in a definitive sense, I have to disclaim that I
> have not tried this myself.
>
> -Harish
>
> Kris Rasmussen wrote:
>
> >Thanks very much, that is what I was looking for. I will try to store the objects I am sharing between application in the http session object. However, I am not sure what it means to be in the same context. Basically I want to tie together sites on the same server with different domain names, is it possible to place these sites in the same context?
> >
> >Kris
> >
> >Harish Krishnaswamy wrote:
> >I think the question is whether state can be shared between applications
> >within the same context. And that is what is possible via HttpSession
> >like Howard suggested. If the question is to share state between
> >contexts then you are right, it is not possible without persisting it
> >permanently in some form and retrieving it back agian in the other
> >context, at least as far as I know.
> >
> >-Harish
> >
> >
> >Vince Marco wrote:
> >
> >
> >
> >>>>I appologize for posting this question again, but I am not getting
> >>>>responses to any of my posts. I would really like to know if there
> >>>>is a means for sharing state between applications, wether it be via
> >>>>a shared visit object, the http session object, or something else.
> >>>>Is there a way to get the http session object from the application?
> >>>>
> >>>>
> >>>You can store whatever you want in the HttpSession, it is still
> >>>available.
> >>>requestCycle.getRequestContext().getSession()
> >>>
> >>>
> >>Perhaps I don't understand the question correctly, but "between
> >>applications" indicates to me that the HttpSession isn't going to work
> >>here, as it only spans user requests within a single deployed
> >>application. My understanding is that the Visit and the HttpSession
> >>have the same scope.....that being the HttpSession.
> >>
> >>I am not aware of any facility in Tapestry that will span state
> >>between applications. This type of state is usually managed via data
> >>access sitting underneath the web (Tapestry) layer and using
> >>Hibernate, JDO, Entity EJBs, XMLDB, or JDBC. Of course you could use
> >>a Singleton to share state between Tapestry applications within a
> >>single server, but it will not work in a clustered environment.
> >>
> >>Vince
> >>
> >>
> >>
> >>
> >>
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> >---------------------------------
> >Do you Yahoo!?
> >Yahoo! SiteBuilder - Free, easy-to-use web site design software
> >
> >
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
Re: Is it possible to share state between applications
Posted by Kris Rasmussen <kr...@yahoo.com>.
Yes, that is what I am trying to do now. I am using tomcat, I havn't tryed anything yet but from what I've read in the documentation it seems like it would be possible. I am not very familiar with tomcat configuration, and I know that is not what this forum is about, but if anyone has any suggestions I'd appreciate it. Thanks.
Kris
Harish Krishnaswamy <hk...@comcast.net> wrote:
By context I mean the servlet context / web application per the servlet
spec. By application I mean Tapestry application (1 servlet, 1
Visit/session, 1 Global). I suppose you can map two domains to a single
context in your servlet container and run your two applications under
this same context. From Tapestry's point of view these are treated as
two different applications but the container treats them as one.
Although I say this in a definitive sense, I have to disclaim that I
have not tried this myself.
-Harish
Kris Rasmussen wrote:
>Thanks very much, that is what I was looking for. I will try to store the objects I am sharing between application in the http session object. However, I am not sure what it means to be in the same context. Basically I want to tie together sites on the same server with different domain names, is it possible to place these sites in the same context?
>
>Kris
>
>Harish Krishnaswamy wrote:
>I think the question is whether state can be shared between applications
>within the same context. And that is what is possible via HttpSession
>like Howard suggested. If the question is to share state between
>contexts then you are right, it is not possible without persisting it
>permanently in some form and retrieving it back agian in the other
>context, at least as far as I know.
>
>-Harish
>
>
>Vince Marco wrote:
>
>
>
>>>>I appologize for posting this question again, but I am not getting
>>>>responses to any of my posts. I would really like to know if there
>>>>is a means for sharing state between applications, wether it be via
>>>>a shared visit object, the http session object, or something else.
>>>>Is there a way to get the http session object from the application?
>>>>
>>>>
>>>You can store whatever you want in the HttpSession, it is still
>>>available.
>>>requestCycle.getRequestContext().getSession()
>>>
>>>
>>Perhaps I don't understand the question correctly, but "between
>>applications" indicates to me that the HttpSession isn't going to work
>>here, as it only spans user requests within a single deployed
>>application. My understanding is that the Visit and the HttpSession
>>have the same scope.....that being the HttpSession.
>>
>>I am not aware of any facility in Tapestry that will span state
>>between applications. This type of state is usually managed via data
>>access sitting underneath the web (Tapestry) layer and using
>>Hibernate, JDO, Entity EJBs, XMLDB, or JDBC. Of course you could use
>>a Singleton to share state between Tapestry applications within a
>>single server, but it will not work in a clustered environment.
>>
>>Vince
>>
>>
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>---------------------------------
>Do you Yahoo!?
>Yahoo! SiteBuilder - Free, easy-to-use web site design software
>
>
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Re: Is it possible to share state between applications
Posted by Harish Krishnaswamy <hk...@comcast.net>.
By context I mean the servlet context / web application per the servlet
spec. By application I mean Tapestry application (1 servlet, 1
Visit/session, 1 Global). I suppose you can map two domains to a single
context in your servlet container and run your two applications under
this same context. From Tapestry's point of view these are treated as
two different applications but the container treats them as one.
Although I say this in a definitive sense, I have to disclaim that I
have not tried this myself.
-Harish
Kris Rasmussen wrote:
>Thanks very much, that is what I was looking for. I will try to store the objects I am sharing between application in the http session object. However, I am not sure what it means to be in the same context. Basically I want to tie together sites on the same server with different domain names, is it possible to place these sites in the same context?
>
>Kris
>
>Harish Krishnaswamy <hk...@comcast.net> wrote:
>I think the question is whether state can be shared between applications
>within the same context. And that is what is possible via HttpSession
>like Howard suggested. If the question is to share state between
>contexts then you are right, it is not possible without persisting it
>permanently in some form and retrieving it back agian in the other
>context, at least as far as I know.
>
>-Harish
>
>
>Vince Marco wrote:
>
>
>
>>>>I appologize for posting this question again, but I am not getting
>>>>responses to any of my posts. I would really like to know if there
>>>>is a means for sharing state between applications, wether it be via
>>>>a shared visit object, the http session object, or something else.
>>>>Is there a way to get the http session object from the application?
>>>>
>>>>
>>>You can store whatever you want in the HttpSession, it is still
>>>available.
>>>requestCycle.getRequestContext().getSession()
>>>
>>>
>>Perhaps I don't understand the question correctly, but "between
>>applications" indicates to me that the HttpSession isn't going to work
>>here, as it only spans user requests within a single deployed
>>application. My understanding is that the Visit and the HttpSession
>>have the same scope.....that being the HttpSession.
>>
>>I am not aware of any facility in Tapestry that will span state
>>between applications. This type of state is usually managed via data
>>access sitting underneath the web (Tapestry) layer and using
>>Hibernate, JDO, Entity EJBs, XMLDB, or JDBC. Of course you could use
>>a Singleton to share state between Tapestry applications within a
>>single server, but it will not work in a clustered environment.
>>
>>Vince
>>
>>
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>---------------------------------
>Do you Yahoo!?
>Yahoo! SiteBuilder - Free, easy-to-use web site design software
>
>
Re: Is it possible to share state between applications
Posted by Kris Rasmussen <kr...@yahoo.com>.
Thanks very much, that is what I was looking for. I will try to store the objects I am sharing between application in the http session object. However, I am not sure what it means to be in the same context. Basically I want to tie together sites on the same server with different domain names, is it possible to place these sites in the same context?
Kris
Harish Krishnaswamy <hk...@comcast.net> wrote:
I think the question is whether state can be shared between applications
within the same context. And that is what is possible via HttpSession
like Howard suggested. If the question is to share state between
contexts then you are right, it is not possible without persisting it
permanently in some form and retrieving it back agian in the other
context, at least as far as I know.
-Harish
Vince Marco wrote:
>>> I appologize for posting this question again, but I am not getting
>>> responses to any of my posts. I would really like to know if there
>>> is a means for sharing state between applications, wether it be via
>>> a shared visit object, the http session object, or something else.
>>> Is there a way to get the http session object from the application?
>>
>
>> You can store whatever you want in the HttpSession, it is still
>> available.
>> requestCycle.getRequestContext().getSession()
>
>
> Perhaps I don't understand the question correctly, but "between
> applications" indicates to me that the HttpSession isn't going to work
> here, as it only spans user requests within a single deployed
> application. My understanding is that the Visit and the HttpSession
> have the same scope.....that being the HttpSession.
>
> I am not aware of any facility in Tapestry that will span state
> between applications. This type of state is usually managed via data
> access sitting underneath the web (Tapestry) layer and using
> Hibernate, JDO, Entity EJBs, XMLDB, or JDBC. Of course you could use
> a Singleton to share state between Tapestry applications within a
> single server, but it will not work in a clustered environment.
>
> Vince
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Re: Is it possible to share state between applications
Posted by Harish Krishnaswamy <hk...@comcast.net>.
I think the question is whether state can be shared between applications
within the same context. And that is what is possible via HttpSession
like Howard suggested. If the question is to share state between
contexts then you are right, it is not possible without persisting it
permanently in some form and retrieving it back agian in the other
context, at least as far as I know.
-Harish
Vince Marco wrote:
>>> I appologize for posting this question again, but I am not getting
>>> responses to any of my posts. I would really like to know if there
>>> is a means for sharing state between applications, wether it be via
>>> a shared visit object, the http session object, or something else.
>>> Is there a way to get the http session object from the application?
>>
>
>> You can store whatever you want in the HttpSession, it is still
>> available.
>> requestCycle.getRequestContext().getSession()
>
>
> Perhaps I don't understand the question correctly, but "between
> applications" indicates to me that the HttpSession isn't going to work
> here, as it only spans user requests within a single deployed
> application. My understanding is that the Visit and the HttpSession
> have the same scope.....that being the HttpSession.
>
> I am not aware of any facility in Tapestry that will span state
> between applications. This type of state is usually managed via data
> access sitting underneath the web (Tapestry) layer and using
> Hibernate, JDO, Entity EJBs, XMLDB, or JDBC. Of course you could use
> a Singleton to share state between Tapestry applications within a
> single server, but it will not work in a clustered environment.
>
> Vince
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Is it possible to share state between applications
Posted by Vince Marco <vm...@mac.com>.
>> I appologize for posting this question again, but I am not getting
>> responses to any of my posts. I would really like to know if there is
>> a means for sharing state between applications, wether it be via a
>> shared visit object, the http session object, or something else. Is
>> there a way to get the http session object from the application?
> You can store whatever you want in the HttpSession, it is still
> available.
> requestCycle.getRequestContext().getSession()
Perhaps I don't understand the question correctly, but "between
applications" indicates to me that the HttpSession isn't going to work
here, as it only spans user requests within a single deployed
application. My understanding is that the Visit and the HttpSession
have the same scope.....that being the HttpSession.
I am not aware of any facility in Tapestry that will span state
between applications. This type of state is usually managed via data
access sitting underneath the web (Tapestry) layer and using Hibernate,
JDO, Entity EJBs, XMLDB, or JDBC. Of course you could use a Singleton
to share state between Tapestry applications within a single server,
but it will not work in a clustered environment.
Vince
RE: Is it possible to share state between applications
Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
You can store whatever you want in the HttpSession, it is still available.
requestCycle.getRequestContext().getSession()
--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
http://jakarta.apache.org/commons/sandbox/hivemind/
http://javatapestry.blogspot.com
> -----Original Message-----
> From: Kris Rasmussen [mailto:kristapestry@yahoo.com]
> Sent: Saturday, September 13, 2003 3:21 PM
> To: tapestry-user@jakarta.apache.org
> Subject: Is it possible to share state between applications
>
>
> I appologize for posting this question again, but I am not
> getting responses to any of my posts. I would really like to
> know if there is a means for sharing state between
> applications, wether it be via a shared visit object, the
> http session object, or something else. Is there a way to get
> the http session object from the application?
>
> Thanks,
> Kris Rasmussen.
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org