Title: RE: Cannot find my JavaBeans

> -----Original Message-----
> From: John Baker [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 18, 2001 5:09 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Cannot find my JavaBeans
>
>
> > 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'.
>

Ok, I have written threads in C,C++(not in Java) but I am missing something thats seems very basic here. so what you are saying is that run() is not really creating a new thread, but really just creating an object named 'MyThread' that happens to have a run() method? This would indicate that it is not a new thread, but just a method(run()) from another class(MyThread) that is called within the same thread.

>
> When start is called, the Thread starts (Obviously). This is when the
> problem appears for me.

This would make sense then if start() actually creates a new thread, and then calls run(). Your new thread then is independent of the current thread(which has a custom class loader)

> >
> > 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:[EMAIL PROTECTED]]
> > > Sent: Wednesday, July 18, 2001 12:31 PM
> > > To: [EMAIL PROTECTED]
> > > 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.
>

Reply via email to