Re: [OT] Communicating between webapps

2008-10-10 Thread André Warnier
Thanks to all for the answers, and an interesting thread. As just an occasional dabbler into this, I must say that the more I dig into Java, the more I get the impression that this is a language that needs lifetime dedication in order to fully understand the beauties of it. I am starting to

Re: Communicating between webapps

2008-10-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Darryl, Darryl Pentz wrote: In my case, webapp A needs to let webapp B know that an event has occurred ... webapp B then does something based on that event, and the result of that action is relevant to webapp A. What are your options for simply

Re: Communicating between webapps

2008-10-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Darryl, Darryl Pentz wrote: I also just encountered the 'crosscontext' attribute in the context.../ block and was wondering whether that could serve any purpose. If you don't mind issuing another request (not a new HTTP connection, just another

Re: Communicating between webapps

2008-10-09 Thread Darryl Pentz
come back to bite you in the long run, but in this case, I might make an exception. - Darryl - Original Message From: Johnny Kewl [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, October 9, 2008 1:57:28 AM Subject: Re: Communicating between webapps

Re: Communicating between webapps

2008-10-09 Thread André Warnier
Hi. This is not my thread, so if anyone thinks I'm pushing the envelope a bit, tell me and I'll start another one. I am interested in this same issue, but in a broader sense : how to share some data, in general, between collaborating webapps within the same container. My case goes somewhat

Re: Communicating between webapps

2008-10-09 Thread Darryl Pentz
It's my thread, but you're welcome to it now. I'm done. :-) - Original Message From: André Warnier [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, October 9, 2008 9:59:50 AM Subject: Re: Communicating between webapps Hi. This is not my thread, so

Re: Communicating between webapps

2008-10-09 Thread Leon Rosenberg
On Thu, Oct 9, 2008 at 9:59 AM, André Warnier [EMAIL PROTECTED] wrote: I realise that this can be done via e.g. an external DB. It could also probably be done, most portably, by creating an entirely separate application accessed via HTTP calls e.g. (à la Amazon DB ?). But it looks as if within

Re: Communicating between webapps

2008-10-09 Thread Leon Rosenberg
On Thu, Oct 9, 2008 at 10:36 AM, André Warnier [EMAIL PROTECTED] wrote: Leon Rosenberg wrote: On Thu, Oct 9, 2008 at 9:59 AM, André Warnier [EMAIL PROTECTED] wrote: I realise that this can be done via e.g. an external DB. It could also probably be done, most portably, by creating an entirely

Re: Communicating between webapps

2008-10-09 Thread André Warnier
Leon Rosenberg wrote: [...] It could look like following: [...] (200 lines of code snipped) Just a question : what do you answer when people ask for *really* detailed specifications ? :-) Many thanks. I'll need some time to digest that.

Re: Communicating between webapps

2008-10-09 Thread Ken Bowen
A very similar architecture would be offered by using JMS (say openjms or activeMQ; we've been using the latter; check for others at http://java-source.net/open-source/jms ). In this case, there is a message broker which runs separately. At the moment, we're using it on one development

Re: Communicating between webapps

2008-10-09 Thread Leon Rosenberg
On Thu, Oct 9, 2008 at 1:01 PM, André Warnier [EMAIL PROTECTED] wrote: Leon Rosenberg wrote: [...] It could look like following: [...] (200 lines of code snipped) Just a question : what do you answer when people ask for *really* detailed specifications ? :-) Usually I'm asking them

Re: Communicating between webapps

2008-10-09 Thread André Warnier
Leon Rosenberg wrote: On Thu, Oct 9, 2008 at 9:59 AM, André Warnier [EMAIL PROTECTED] wrote: I realise that this can be done via e.g. an external DB. It could also probably be done, most portably, by creating an entirely separate application accessed via HTTP calls e.g. (à la Amazon DB ?). But

RE: Communicating between webapps

2008-10-09 Thread Caldarale, Charles R
From: André Warnier [mailto:[EMAIL PROTECTED] Subject: Re: Communicating between webapps My case goes somewhat like this : an application consisting of several webapps needs access to some common data (read/write). What you're describing is referred to as a bean in Java terminology

RE: Communicating between webapps

2008-10-09 Thread Caldarale, Charles R
From: Bill Davidson [mailto:[EMAIL PROTECTED] Subject: Re: Communicating between webapps So if I'm understanding you correctly, different webapps use different class loader instances and so the singleton is actually instantiated separately for each class loader? Depends on where the class

Re: Communicating between webapps

2008-10-09 Thread Johnny Kewl
- Original Message - From: André Warnier [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, October 09, 2008 9:59 AM Subject: Re: Communicating between webapps Hi. This is not my thread, so if anyone thinks I'm pushing the envelope a bit, tell me

Re: Communicating between webapps

2008-10-09 Thread Leon Rosenberg
On Thu, Oct 9, 2008 at 7:16 PM, Johnny Kewl [EMAIL PROTECTED] wrote: I'm very much for the KISS principle... if you dont need it, dont use it... nothing is more powerful that POJO (plain old Java). Thing is KISS does not mean novice... you'll find only the guys that have been around for a

Re: Communicating between webapps

2008-10-09 Thread Johnny Kewl
- Original Message - From: Leon Rosenberg [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, October 09, 2008 9:54 PM Subject: Re: Communicating between webapps On Thu, Oct 9, 2008 at 7:16 PM, Johnny Kewl [EMAIL PROTECTED] wrote: I'm very much

Re: Communicating between webapps

2008-10-08 Thread Leon Rosenberg
creating a socket connection to the same container. I also just encountered the 'crosscontext' attribute in the context.../ block and was wondering whether that could serve any purpose. Does anybody know of any tried and trusted ways of communicating between webapps in Tomcat? Thanks

Re: Communicating between webapps

2008-10-08 Thread André Warnier
, given that it requires creating a socket connection to the same container. I also just encountered the 'crosscontext' attribute in the context.../ block and was wondering whether that could serve any purpose. Does anybody know of any tried and trusted ways of communicating between webapps in Tomcat

RE: Communicating between webapps

2008-10-08 Thread Peter Crowther
From: André Warnier [mailto:[EMAIL PROTECTED] Maybe hacks, but why not use them if they are easier, faster, and have a smaller memory footprint ? Because they can be harder to maintain. Note *can be* - it depends on the developers and admins. Not being very good at either Java or Tomcat,

Re: Communicating between webapps

2008-10-08 Thread Darryl Pentz
Message From: Mikolaj Rydzewski [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, October 8, 2008 12:54:10 PM Subject: Re: Communicating between webapps Leon Rosenberg wrote: You need additional lib (commons httpclient), you need special servlet/action/jsp on B

Re: Communicating between webapps

2008-10-08 Thread Mikolaj Rydzewski
Leon Rosenberg wrote: You need additional lib (commons httpclient), you need special servlet/action/jsp on B-side, you probably need to start threads, you need to monitor those on A side, and and and... One can use HttpURLConnection. There're probably some actions/jsps already in the webapp,

Re: Communicating between webapps

2008-10-08 Thread André Warnier
Brantley Hobbs wrote: Darryl Pentz wrote: I have an issue where webapp A needs to let webapp B know about an event, and then return a response to webapp B's processing of that event to the browser. So basically I need to communicate between webapps in the same container. Since Daryl seems

Re: Communicating between webapps

2008-10-08 Thread Leon Rosenberg
On Wed, Oct 8, 2008 at 12:00 PM, Mikolaj Rydzewski [EMAIL PROTECTED] wrote: Darryl Pentz wrote: I have not found a no-brainer solution to this as yet. The one I have tried is making a localhost HTTP call which I find to be rather expensive, given that it requires creating a socket connection

Re: Communicating between webapps

2008-10-08 Thread Mikolaj Rydzewski
Darryl Pentz wrote: I appreciate the suggestions from all so far. It does seem like at least there isn't a 'no-brainer' approach, as in of course stupid, why don't you just do X - everybody else does. It sounds like each solution has its clear pros and cons which must be weighed up in light

Re: Communicating between webapps

2008-10-08 Thread Brantley Hobbs
serve any purpose. Does anybody know of any tried and trusted ways of communicating between webapps in Tomcat? Thanks, Darryl Pentz If you think that this thing will scale at all, steer clear of any shared resources like JVM properties or magic files. It could be that in the future the apps

Re: Communicating between webapps

2008-10-08 Thread Mikolaj Rydzewski
Darryl Pentz wrote: I have not found a no-brainer solution to this as yet. The one I have tried is making a localhost HTTP call which I find to be rather expensive, given that it requires creating a socket connection to the same container. Have you actualy measured that additional local

Re: Communicating between webapps

2008-10-08 Thread André Warnier
Mikolaj Rydzewski wrote: Leon Rosenberg wrote: You need additional lib (commons httpclient), you need special servlet/action/jsp on B-side, you probably need to start threads, you need to monitor those on A side, and and and... One can use HttpURLConnection. There're probably some

Communicating between webapps

2008-10-08 Thread Darryl Pentz
anybody know of any tried and trusted ways of communicating between webapps in Tomcat? Thanks, Darryl Pentz - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Communicating between webapps

2008-10-08 Thread Bill Davidson
Darryl Pentz wrote: I have an issue where webapp A needs to let webapp B know about an event, and then return a response to webapp B's processing of that event to the browser. So basically I need to communicate between webapps in the same container. I have not found a no-brainer solution to

Re: Communicating between webapps

2008-10-08 Thread Darryl Pentz
between webapps Darryl Pentz wrote: I have an issue where webapp A needs to let webapp B know about an event, and then return a response to webapp B's processing of that event to the browser. So basically I need to communicate between webapps in the same container. I have not found

RE: Communicating between webapps

2008-10-08 Thread Caldarale, Charles R
From: Darryl Pentz [mailto:[EMAIL PROTECTED] Subject: Re: Communicating between webapps Nevertheless, besides that, Tomcats classloader hierarchy also prevents this mechanism. If you put the singleton's class in the common library, it will be accessible to both webapps. However, you have

Re: Communicating between webapps

2008-10-08 Thread Bill Davidson
Darryl Pentz wrote: You would think so but it isn't that easy. Which is good to some degree, because that would seem like a scary security vulnerability. Nevertheless, besides that, Tomcats classloader hierarchy also prevents this mechanism. So if I'm understanding you correctly,

Re: Communicating between webapps

2008-10-08 Thread Johnny Kewl
- Original Message - From: Darryl Pentz [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, October 08, 2008 10:02 PM Subject: Re: Communicating between webapps Bill, You would think so but it isn't that easy. Which is good to some degree, because