tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Baker <jba...@teamenergy.com>
Subject Re: Cannot find my JavaBeans
Date Thu, 19 Jul 2001 22:28:20 GMT
On Wednesday 18 July 2001 23:36 pm, you wrote:
> To "start" a new thread, call x.start();  - in basic terms, this will mean
> the x.run() method (or runnable.run()) is called, but you can continue
> doing whatever it was you were doing without waiting for the run() method
> to end.  that's the guts of how threads work.

I wish I hadn't used this example now. I've been doing Java since 1997 (on a 
Solaris 2 with Jdk1.02). I'm quite good :-) I know how Threads work ta, but I 
think I must have made out that I didn't :-)

I did: x.run() as a /test/. And that's it. I thought 'I wonder if the class 
that isn't found when I run the Thread asynchronisly (spelt) will be found if 
I just run the code within that Threads run method with the current thread'. 
Ie, different ClassLoader. And it worked. 

:)

> cheers
> dim
>
> On Wed, 18 Jul 2001, John Baker wrote:
> > > I don't know why it is different for run() than for start() - I haven't
> > > used either, so I don't understand what the difference in the two is in
> > > the Thread class(doesn't start() call run()?)
> >
> > What I meant by this is just doing:
> >
> > MyThread x = new MyThraad();
> > x.run();
> >
> > calls the run method (containing the class that has problems being
> > created) within the current Thread, ie no new Thread is started, This is
> > when the problem 'goes away'.
> >
> > When start is called, the Thread starts (Obviously). This is when the
> > problem appears for me.
> >
> > > hope this helps,
> >
> > I'll read tomorrow, digest, and attempt to understand :-)
> >
> > Still, this must be a bug... people will want to use their own Threads
> > within a web application.
> >
> > > Charlie
> > >
> > > > -----Original Message-----
> > > > From: John Baker [mailto:jbaker@teamenergy.com]
> > > > Sent: Wednesday, July 18, 2001 12:31 PM
> > > > To: tomcat-user@jakarta.apache.org
> > > > Subject: Re: Cannot find my JavaBeans
> > > >
> > > > On Wednesday 18 July 2001 17:15 pm, you wrote:
> > > > > > This seems to be a bug in Tomcat. Shouldn't someone who
> > > >
> > > > actually knows
> > > >
> > > > > > how it all works take a look?
> > > > > >
> > > > > > John
> > > > >
> > > > > Yep. Even the cocoon mailing list is full with entries
> > > >
> > > > related to tomcat
> > > >
> > > > > and its classpath :-). Under some misterious circumstances the
> > > > > "<context</WEB-INF/lib" Classpath disappears.
> > > >
> > > > Well I managed to make it a very non mysterious circumstance.
> > > > I just started
> > > > a Thread from an object that was a ServletContextListener.
> > > > When I called
> > > > start it lost classes. When I called run it worked fine. I
> > > > had no problems
> > > > replicating it.
> > > >
> > > > What is the cocoon mailing list?
> > > >
> > > > --
> > > > John Baker, BSc CS.
> > > > Java developer, Linux lover.
> > > > I don't wanna rock, DJ.
> >
> > --
> > John Baker, BSc CS.
> > Java developer, Linux lover.
> > I don't wanna rock, DJ.

Mime
View raw message