Hi,

I am assuming you are calling createContext() on the
org.apache.catalina.startup.Embedded object. Do you think calling
org.apache.catalina.Context.getServletContext() and then setAttribute on the
returned ServletContext will help?

Just a thought. Do let me know if it makes sense.

Sonal



On 8/29/07, nlif <[EMAIL PROTECTED]> wrote:
>
>
> Hmm, I guess I did not explain myself very well...
>
> I have an application, that acts as bootstrap: it creates and initializes
> various services, which provide a Java API to resources such as database,
> file-system, and native libraries. In addition, I want that bootstrap
> application to start an embedded tomcat, in which my web application will
> run. Thus, *everything* is in the same process. The question was, how can
> I
> pass Java references from the bootstrap application to the web-apps in
> side
> the embedded Tomcat.
>
> I hope this makes it clear.
>
> I assume the Tomcat embedded APIs provide some way to pass a reference
> into
> the web-app contexts that are deployed in that Tomcat. I've never worked
> with Tomcat as embedded, and frankly, I can't seem to find documentation
> or
> code-samples for it. If anyone can point me to anything, I'd appreciate
> it.
>
> Thanks again.
>
>
>
>
>
> OFFICIAL WEBSITE wrote:
> >
> > If I understand correctly, external applications were started on one JVM
> > and the tomcat is on another JVM, started separately or by the external
> > application itself.
> >
> > Two JVMS running on on machine have nothing in common other than system
> > resources. Open a serversocket at a named port on the external
> > application and let the tomcat applications from webapps connect to it
> > and exchange sweet talk on a mutually agreed protocol.
> >
> >
> > On Wed, 2007-08-29 at 00:05 -0700, nlif wrote:
> >> Hi,
> >>
> >> If I run Tomcat as embedded, is it possible for the application that
> >> contains Tomcat to interact with web-apps that run inside that Tomcat?
> >> For
> >> example, the external application, in addition to starting the embedded
> >> Tomcat, also manages other services, and the web-apps that runs inside
> >> the
> >> embedded Tomcat need to use those services. How can this be done?
> >>
> >> Thanks in advance.
> >
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Interacting-with-an-embedded-Tomcat-tf4346090.html#a12382936
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Thanks and Regards,
Sonal

Reply via email to