On Nov 28, 2007 10:24 AM, ant elder <[EMAIL PROTECTED]> wrote:

> On Nov 27, 2007 4:11 PM, Simon Nash <[EMAIL PROTECTED]> wrote:
>
> >
> > ant elder wrote:
> >
> > > On Nov 27, 2007 2:29 PM, Simon Laws <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >>
> > >>On Nov 27, 2007 2:25 PM, ant elder <[EMAIL PROTECTED]> wrote:
> > >>
> > >>
> > >>>I've just committed a runtime-war module as a start of whats being
> > >>>talked
> > >>>about here, which could be merged or replace distribution/webapp at
> > some
> > >>>point. I'll post some more details later. One comment inline below:
> > >>>
> > >>>  ...ant
> > >>>
> > >>>On Nov 23, 2007 6:00 PM, Simon Laws <[EMAIL PROTECTED]>
> wrote:
> > >>>
> > >>><snip>
> > >>>
> > >>>
> > >>>>I'm with you up to this point. What Tomcat deep integration work is
> > >>>
> > >>>going
> > >>>
> > >>>>on
> > >>>>(I do know about the Geronimo stuff).
> > >>>>
> > >>>>
> > >>>>>- fix Tomcat deep integration and document how to do it (by copying
> > >>>
> > >>>the
> > >>>
> > >>>>>binary lib directory jars to Tomcat lib etc)
> > >>>>
> > >>>I don't think anyone has done much with Tomcat deep integration since
> > M1
> > >>>days, i tried it a while back but there were varrious class loader
> > >>>issues.
> > >>>With all the fixing up of class loaders done for osgi recently this
> may
> > >>>work
> > >>>ok now, i just tried moving all the jars from the runtime-war from
> the
> > >>>war
> > >>>lib folder to the Tomcat lib folder and it all seems to keep working
> ok
> > >>>now
> > >>>so maybe we just need to test it a bit more and then document it.
> > >>>
> > >>>  ...ant
> > >>>
> > >>
> > >>So when the contribution is a war in its own right what you say last
> is
> > >>the solution? Or is there something else?
> > >>
> > >>
> > >
> > > Right, though for deep integration to work we'd still need some new
> code
> > > that looks in each war as its deployed for .composite files and
> > > sca-contibution.xmls, and i guess to do it properly also something
> like
> > the
> > > implementation.web that was mentioned a while ago.
> > >
> > I'm interested in getting this to work.  Is there a hook point in Tomcat
> > that we could use to look at war code as it's deployed?
> >
> >   Simon
> >
>
> I think there's a number of things we need to do to get this to work:
> 1 - start an SCA doman/node when Tomcat starts
> 1a - local non-http communication between the domain and node.
> 2 - a way to deploy SCA contributions to the node
> 3 - look in each webapp as it starts for SCA things to deploy to the node
> 4 - write an implementation.web to inject properties and references into
> webapp servlets and JSPs
> 5 - a new http host to enable registering SCA http service endpoints
> (similar to host-http-tomcat except not requiring all the servlet stuff in
> each webapp)
>
> For (1) a way to do this is to write and implementation of
> org.apache.catalina.Host and change the Tomcat server.xml to use that.
> From
> there you can start an SCA node and get hooks into webapp start/stop
> events
> by registering an impl of org.apache.catalina.LifecycleListener. I've made
> a
> start at that though its quite primative so far, i'll commit what i have
> so
> anyone else could help. We already have (2) from the runtime-war module
> and
> it hopefully shouldn't be to hard to extend that for (3).
>
> I'd quite like to try to get something going for this for 1.1 but there's
> a
> fair bit of work to get it all that working well, so everyone who'd like
> to
> help is welcome :) A lot of the code for doing this could be reused in the
> Geronimo integration work, Tomcat is a bit easier to work with which is
> one
> reason I'm looking at this now.
>
>   ...ant
>
Ant

I haven't got my head round all the items on this list yet but they look
plausible. I do have a question about the way this solution relates to a
wider domain. The scenario I believe you are addressing here is one where a
user

1. Starts tomcat
2. Adds web apps with the expectation that any SCA artifacts inside these
web apps run in a single node as part of a single domain
3. Stops tomcat when they are done

This could be a first step and in this case there is no need to worry about
node/domain communications. Starting a standalone node means that any
contributed components are assumed to be part of the same domain and can
find one another. To put it another way a single node only belongs to one
domain. The implication here though is that you can't create SCA to/from
components in the Tomcat environment and all communication in and out will
be via targeted remote bindings.

For the more general scenario we can make two assumptions

1. Each web app is associated with a separate node
2. Each web app must be able to belong to a specified domain.

In this case the domain, if run in the Tomcat instance where the web apps
are running, is just another web app and we have to sort out the non-http
comms to avoid the startup deadlock. For that we require some other binding.
binding.socket, binding.minapipe for example.

The domain can also be run outside of the tomcat instance and I think that
is the easier place to start in order to get this scenario running.

In neither case is Tomcat starting the domain application automatically.
It's the users responsibility to choose where to run it and to actually
deploy it.  There is a requirement to be able to specify the domain URL for
each web app. Can we do this through a parameter in web.xml? I need to go
read the OSOA docs to see if they say anything about this.

Regards

Simon

Reply via email to