If ListenerThread implements Runnable, the way to start it is

ListenerThread listener = new ListenerThread(39000);
new Thread(listener).start();

according to the API:

http://java.sun.com/javase/6/docs/api/java/lang/Thread.html

The start() method only works with extensions of Thread.

Don

On Fri, May 21, 2010 at 10:03 AM, Toni Menzel <[email protected]> wrote:
> On Fri, May 21, 2010 at 3:59 PM, Larry Touve <[email protected]> wrote:
>>> It is the case with osgi too. Nothing differnent to standard java.
>>> What os are you on?
>>>
>>
>> I'm running Windows 7, with Felix 2.0.2 (Glassfish V3.1-SNAPSHOT).
>>
>> In standard Java, thread.start() and thread.run() have different behavior.  
>> The run() method runs the code within the calling thread, and the start() 
>> method runs the code in a new thread.  That seems to NOT be the case in 
>> OSGi.  In OSGi, both methods execute within the calling thread - at least 
>> that's the behavior I'm seeing.
>
> What type is "thread" (in "thread.start") ?  And what exactly is
> ListenerThread ?
> i think you are speaking of different apis. Nothing about osgi (like
> Karl just said).
>
> Toni
>
>
>>
>> Larry
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
>
> --
> Toni Menzel
> Independent Software Developer
> Professional Profile: http://okidokiteam.com
> [email protected]
> http://www.ops4j.org     - New Energy for OSS Communities - Open
> Participation Software.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to