Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

How to STOP a Jaguar service component from PB?

11 posts in General Discussion (old) Last posting was on 2000-03-09 03:17:34.0Z
Bas Posted on 2000-02-28 16:14:55.0Z
Newsgroups: sybase.public.easerver
From: "Bas" <klaaijsen@hotmail.com>
Organization: 192.87.44.151
X-Newsreader: AspNNTP 1.41 (Advent 2000, Inc.)
Subject: How to STOP a Jaguar service component from PB?
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Mon, 28 Feb 2000 11:14:55 -0500
Lines: 18
NNTP-Posting-Host: 207.156.232.4
Message-ID: <347_cbmYzbgg$GA.274@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27659
Article PK: 159024

Who has advice:


I deployed a service component which does the following in the RUN method:

WHILE ib_run
fnv_do_certain_things()

LOOP

In the STOP method, ib_run is set to FALSE .

When I invoke the STOP method from a Client, ib_run is set to false, but the
servicecomponent is not destroyed and stays in the while loop.

NOTES:
I've added the servicecomponent to the services property with Jaguar manager.
In the INSTANCES tab of the component, only concurrency is marked.
If I mark shared instead of concurrency then Powerbuilder does'nt execute the
stop method invocation.


---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


Jim O'Neil [Sybase] Posted on 2000-02-28 17:25:48.0Z
Newsgroups: sybase.public.easerver
Date: Mon, 28 Feb 2000 12:25:48 -0500
From: "Jim O'Neil [Sybase]" <joneil@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.7 [en]C-CCK-MCD (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: How to STOP a Jaguar service component from PB?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 50
NNTP-Posting-Host: joneil-nt.sybase.com 204.167.42.111
Message-ID: <347_38BAAF9A.AF5D4CB2@sybase.com>
References: <347_cbmYzbgg$GA.274@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27654
Article PK: 154568


Bas wrote:

> Who has advice:
>
> I deployed a service component which does the following in the RUN method:
>
> WHILE ib_run
> fnv_do_certain_things()
>
> LOOP
>
> In the STOP method, ib_run is set to FALSE .
>
> When I invoke the STOP method from a Client, ib_run is set to false, but the
> servicecomponent is not destroyed and stays in the while loop.
>
> NOTES:
> I've added the servicecomponent to the services property with Jaguar manager.
> In the INSTANCES tab of the component, only concurrency is marked.
> If I mark shared instead of concurrency then Powerbuilder does'nt execute the
> stop method invocation.
>
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp

You're running into a shortcoming or PowerBuilder. If you only have concurrency
checked and not sharing, then you should get a completely different component
instantiated and have two instances instead of one (I presume you only want one
service component instance). If you have shared and concurrency checked, then it
would behave the way you want, except PowerBuilder threading support will not
support multiple threads of execution through one instance (you'd have a thread
in run() and a thread in stop() at the same time). So if using a shared
component you MUST not use concurrency. The only way to get this to work with PB
is to defer the setting of your stopping criteria to another component. Create a
shared component that simply is there to set the ib_false variable from whatever
client is now calling stop() on the service component and create another method
to get the value of ib_false to use in your run() test. While the shared
component will also not be able to support concurrent requests, the get/set
methods will complete very quickly so you shouldn't be tying up any one client
for that long.

Or use Java ;>)

--
Jim O'Neil
Senior Technical Support Engineer
Sybase, Inc


David Renton Posted on 2000-02-29 15:28:11.0Z
Newsgroups: sybase.public.easerver
From: "David Renton" <drenton@winmill.com>
Subject: Re: How to STOP a Jaguar service component from PB?
Date: Tue, 29 Feb 2000 10:28:11 -0500
Lines: 19
X-Newsreader: Microsoft Outlook Express 4.72.3612.1700
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700
NNTP-Posting-Host: clients.accint.com 141.154.97.1
Message-ID: <347_majnNosg$GA.202@forums.sybase.com>
References: <347_cbmYzbgg$GA.274@forums.sybase.com> <347_38BAAF9A.AF5D4CB2@sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27508
Article PK: 158896

Jim,

When you say that:

"except PowerBuilder threading support will not

>support multiple threads of execution through one instance (you'd have a
thread
>in run() and a thread in stop() at the same time). So if using a shared
>component you MUST not use concurrency. "

Do you mean a PowerBuilder client, or does this also apply for a PB
component running in Jaguar?

Thanks,
David


Jim O'Neil [Sybase] Posted on 2000-02-29 18:25:57.0Z
Newsgroups: sybase.public.easerver
Date: Tue, 29 Feb 2000 13:25:57 -0500
From: "Jim O'Neil [Sybase]" <joneil@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.7 [en]C-CCK-MCD (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: How to STOP a Jaguar service component from PB?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 21
NNTP-Posting-Host: joneil-nt.sybase.com 204.167.42.111
Message-ID: <347_38BC0F35.8EEAE9A3@sybase.com>
References: <347_cbmYzbgg$GA.274@forums.sybase.com> <347_38BAAF9A.AF5D4CB2@sybase.com> <347_majnNosg$GA.202@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27480
Article PK: 158871


David Renton wrote:

> Jim,
>
> When you say that:
>
> "except PowerBuilder threading support will not
> >support multiple threads of execution through one instance (you'd have a
> thread
> >in run() and a thread in stop() at the same time). So if using a shared
> >component you MUST not use concurrency. "
>
> Do you mean a PowerBuilder client, or does this also apply for a PB
> component running in Jaguar?
>
> Thanks,
> David

I meant specifically a PowerBuilder component running in Jaguar. The same is
actually true of Shared Objects in PowerBuilder, it's just that PowerBuilder
know it can't do this so it doesn't, in Jaguar, it's Jaguar handling the
component invocation, so you have to be sure to tell Jaguar not to try to do
it.
--
Jim O'Neil
Senior Technical Support Engineer
Sybase, Inc


David Renton Posted on 2000-03-01 14:17:38.0Z
Newsgroups: sybase.public.easerver
From: "David Renton" <drenton@winmill.com>
Subject: Re: How to STOP a Jaguar service component from PB?
Date: Wed, 1 Mar 2000 09:17:38 -0500
Lines: 59
X-Newsreader: Microsoft Outlook Express 4.72.3612.1700
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700
NNTP-Posting-Host: clients.accint.com 141.154.97.1
Message-ID: <347_0tS#al4g$GA.202@forums.sybase.com>
References: <347_cbmYzbgg$GA.274@forums.sybase.com> <347_38BAAF9A.AF5D4CB2@sybase.com> <347_majnNosg$GA.202@forums.sybase.com> <347_38BC0F35.8EEAE9A3@sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27432
Article PK: 158830

Jim,

Hmm.. is there a way then to create an asynchronous and multithreaded
component in PB?

I can create an asynchronous call by having the calling component set an
instance variable on a Shared NotConcurrent Service component that loops
checking the instance variable for something to do. However, then I'm
limited to one instance of the Service component.

If I make the Service component NotShared and Concurrent, then when I make
the call on it to set the instance variable, I get a new instance. However,
the run() method hasn't been invoked on the new instance, so the service
component never finds that its instance variable has been set. I can't call
the run() method myself, since that would be a synchronous call, and I would
not be able to return untill the run() method completes.

Is my understanding correct? Is there a way to have both asynchronous and
multithreaded in PB components?

Thanks very much for you help,
David

Jim O'Neil [Sybase] wrote in message <38BC0F35.8EEAE9A3@sybase.com>...
>David Renton wrote:
>
>> Jim,
>>
>> When you say that:
>>
>> "except PowerBuilder threading support will not
>> >support multiple threads of execution through one instance (you'd have a
>> thread
>> >in run() and a thread in stop() at the same time). So if using a shared
>> >component you MUST not use concurrency. "
>>
>> Do you mean a PowerBuilder client, or does this also apply for a PB
>> component running in Jaguar?
>>
>> Thanks,
>> David
>
>I meant specifically a PowerBuilder component running in Jaguar. The same
is
>actually true of Shared Objects in PowerBuilder, it's just that
PowerBuilder
>know it can't do this so it doesn't, in Jaguar, it's Jaguar handling the
>component invocation, so you have to be sure to tell Jaguar not to try to
do
>it.
>--
>Jim O'Neil
>Senior Technical Support Engineer
>Sybase, Inc
>
>


Jim O'Neil [Sybase] Posted on 2000-03-06 22:55:31.0Z
Newsgroups: sybase.public.easerver
Date: Mon, 06 Mar 2000 17:55:31 -0500
From: "Jim O'Neil [Sybase]" <joneil@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.7 [en]C-CCK-MCD (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: How to STOP a Jaguar service component from PB?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 77
NNTP-Posting-Host: joneil-nt.sybase.com 204.167.42.111
Message-ID: <347_38C43763.7202763B@sybase.com>
References: <347_cbmYzbgg$GA.274@forums.sybase.com> <347_38BAAF9A.AF5D4CB2@sybase.com> <347_majnNosg$GA.202@forums.sybase.com> <347_38BC0F35.8EEAE9A3@sybase.com> <347_0tS#al4g$GA.202@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27042
Article PK: 157979


David Renton wrote:

> Jim,
>
> Hmm.. is there a way then to create an asynchronous and multithreaded
> component in PB?
>
> I can create an asynchronous call by having the calling component set an
> instance variable on a Shared NotConcurrent Service component that loops
> checking the instance variable for something to do. However, then I'm
> limited to one instance of the Service component.
>
> If I make the Service component NotShared and Concurrent, then when I make
> the call on it to set the instance variable, I get a new instance. However,
> the run() method hasn't been invoked on the new instance, so the service
> component never finds that its instance variable has been set. I can't call
> the run() method myself, since that would be a synchronous call, and I would
> not be able to return untill the run() method completes.
>
> Is my understanding correct? Is there a way to have both asynchronous and
> multithreaded in PB components?
>
> Thanks very much for you help,
> David
>
> Jim O'Neil [Sybase] wrote in message <38BC0F35.8EEAE9A3@sybase.com>...
> >David Renton wrote:
> >
> >> Jim,
> >>
> >> When you say that:
> >>
> >> "except PowerBuilder threading support will not
> >> >support multiple threads of execution through one instance (you'd have a
> >> thread
> >> >in run() and a thread in stop() at the same time). So if using a shared
> >> >component you MUST not use concurrency. "
> >>
> >> Do you mean a PowerBuilder client, or does this also apply for a PB
> >> component running in Jaguar?
> >>
> >> Thanks,
> >> David
> >
> >I meant specifically a PowerBuilder component running in Jaguar. The same
> is
> >actually true of Shared Objects in PowerBuilder, it's just that
> PowerBuilder
> >know it can't do this so it doesn't, in Jaguar, it's Jaguar handling the
> >component invocation, so you have to be sure to tell Jaguar not to try to
> do
> >it.
> >--
> >Jim O'Neil
> >Senior Technical Support Engineer
> >Sybase, Inc
> >
> >

Let me know if this paradigm gets you what you want: Create a shared
non-concurrent "standard" component that each instance of the service component
will 'register' with and in that component set up an array of the instance
variables you are checking. Each service component would then essentially get a
unique ID, by making an intercomponent call in the start method perhaps, and you
can use that unique ID to index the instance variable array and thus control the
run loop of the specific instances of the service component. Presumably, you
would have some other manager type interface that would set the values of these
instance variables in this new shared component to halt the run loop.

Hope that makes sense - writing this stuff out in English tends to make it sound
more complicated than it is. Essentially, delegate the setting/retrieving of
the state of the service component to another shared component.

--
Jim O'Neil
Senior Technical Support Engineer
Sybase, Inc


David Renton Posted on 2000-03-08 17:24:15.0Z
Newsgroups: sybase.public.easerver
From: "David Renton" <drenton@winmill.com>
Subject: Re: How to STOP a Jaguar service component from PB?
Date: Wed, 8 Mar 2000 12:24:15 -0500
Lines: 125
X-Newsreader: Microsoft Outlook Express 4.72.3612.1700
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700
NNTP-Posting-Host: support.accint.com 141.154.97.2
Message-ID: <347_3D6ncOSi$GA.251@forums.sybase.com>
References: <347_cbmYzbgg$GA.274@forums.sybase.com> <347_38BAAF9A.AF5D4CB2@sybase.com> <347_majnNosg$GA.202@forums.sybase.com> <347_38BC0F35.8EEAE9A3@sybase.com> <347_0tS#al4g$GA.202@forums.sybase.com> <347_38C43763.7202763B@sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26876
Article PK: 157839

Jim,

The paradigm of using a shared object to control multiple instances of
service components makes sense.

Is there any way to create instances of service components programatically?
I know that you can initialize jaguar to a certain number of instances by
adding the number of instances you want to the
com.sybase.jaguar.server.services property. The roadblock I run into when
creating my own instances is that when I invoke the run method, I am then
stuck waiting for the run method to return. It doesn't seem like there is a
way in PB to create the service object, and start the service object
looping, and then run other code, without waiting for the loop to return.

Is there a way to do this using PB components?

Looking around, I found yesterday that the Order Manager/OrderClient Java
Event Sample provided with Jaguar does exactly what I want - it creates
multiple asynchronous threads. I believe that is the path that probably
makes the most sense to get this functionality, since it doesn't seem there
is a way around the PB thread limitation. Does that make sense? I would
still be curious to know if there is a way to do it using PB.

Thanks very much for you help!
David

Jim O'Neil [Sybase] wrote in message <38C43763.7202763B@sybase.com>...
>David Renton wrote:
>
>> Jim,
>>
>> Hmm.. is there a way then to create an asynchronous and multithreaded
>> component in PB?
>>
>> I can create an asynchronous call by having the calling component set an
>> instance variable on a Shared NotConcurrent Service component that loops
>> checking the instance variable for something to do. However, then I'm
>> limited to one instance of the Service component.
>>
>> If I make the Service component NotShared and Concurrent, then when I
make
>> the call on it to set the instance variable, I get a new instance.
However,
>> the run() method hasn't been invoked on the new instance, so the service
>> component never finds that its instance variable has been set. I can't
call
>> the run() method myself, since that would be a synchronous call, and I
would
>> not be able to return untill the run() method completes.
>>
>> Is my understanding correct? Is there a way to have both asynchronous
and
>> multithreaded in PB components?
>>
>> Thanks very much for you help,
>> David
>>
>> Jim O'Neil [Sybase] wrote in message <38BC0F35.8EEAE9A3@sybase.com>...
>> >David Renton wrote:
>> >
>> >> Jim,
>> >>
>> >> When you say that:
>> >>
>> >> "except PowerBuilder threading support will not
>> >> >support multiple threads of execution through one instance (you'd
have a
>> >> thread
>> >> >in run() and a thread in stop() at the same time). So if using a
shared
>> >> >component you MUST not use concurrency. "
>> >>
>> >> Do you mean a PowerBuilder client, or does this also apply for a PB
>> >> component running in Jaguar?
>> >>
>> >> Thanks,
>> >> David
>> >
>> >I meant specifically a PowerBuilder component running in Jaguar. The
same
>> is
>> >actually true of Shared Objects in PowerBuilder, it's just that
>> PowerBuilder
>> >know it can't do this so it doesn't, in Jaguar, it's Jaguar handling the
>> >component invocation, so you have to be sure to tell Jaguar not to try
to
>> do
>> >it.
>> >--
>> >Jim O'Neil
>> >Senior Technical Support Engineer
>> >Sybase, Inc
>> >
>> >
>
>Let me know if this paradigm gets you what you want: Create a shared
>non-concurrent "standard" component that each instance of the service
component
>will 'register' with and in that component set up an array of the instance
>variables you are checking. Each service component would then essentially
get a
>unique ID, by making an intercomponent call in the start method perhaps,
and you
>can use that unique ID to index the instance variable array and thus
control the
>run loop of the specific instances of the service component. Presumably,
you
>would have some other manager type interface that would set the values of
these
>instance variables in this new shared component to halt the run loop.
>
>Hope that makes sense - writing this stuff out in English tends to make it
sound
>more complicated than it is. Essentially, delegate the setting/retrieving
of
>the state of the service component to another shared component.
>
>--
>Jim O'Neil
>Senior Technical Support Engineer
>Sybase, Inc
>
>


Dave Wolf [Sybase] Posted on 2000-03-09 03:17:34.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: How to STOP a Jaguar service component from PB?
Date: Wed, 8 Mar 2000 22:17:34 -0500
Lines: 149
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: vpn-eme-033.sybase.com 130.214.8.33
Message-ID: <347_tFLzYaXi$GA.251@forums.sybase.com>
References: <347_cbmYzbgg$GA.274@forums.sybase.com> <347_38BAAF9A.AF5D4CB2@sybase.com> <347_majnNosg$GA.202@forums.sybase.com> <347_38BC0F35.8EEAE9A3@sybase.com> <347_0tS#al4g$GA.202@forums.sybase.com> <347_38C43763.7202763B@sybase.com> <347_3D6ncOSi$GA.251@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26838
Article PK: 157804

The next EBF will contain a message service. The documentation shows an
example of using the message service to stop or restart a running service
component that has concurrency disabled. Basically in run you wait on a
message for N seconds. If the message is stop, you stop. Otherwise after
the timeout you loop back and go again.

Dave Wolf
Internet Applications Division

"David Renton" <drenton@winmill.com> wrote in message
news:3D6ncOSi$GA.251@forums.sybase.com...
> Jim,
>
> The paradigm of using a shared object to control multiple instances of
> service components makes sense.
>
> Is there any way to create instances of service components
programatically?
> I know that you can initialize jaguar to a certain number of instances by
> adding the number of instances you want to the
> com.sybase.jaguar.server.services property. The roadblock I run into when
> creating my own instances is that when I invoke the run method, I am then
> stuck waiting for the run method to return. It doesn't seem like there is
a
> way in PB to create the service object, and start the service object
> looping, and then run other code, without waiting for the loop to return.
>
> Is there a way to do this using PB components?
>
> Looking around, I found yesterday that the Order Manager/OrderClient Java
> Event Sample provided with Jaguar does exactly what I want - it creates
> multiple asynchronous threads. I believe that is the path that probably
> makes the most sense to get this functionality, since it doesn't seem
there
> is a way around the PB thread limitation. Does that make sense? I would
> still be curious to know if there is a way to do it using PB.
>
> Thanks very much for you help!
> David
>
> Jim O'Neil [Sybase] wrote in message <38C43763.7202763B@sybase.com>...
> >David Renton wrote:
> >
> >> Jim,
> >>
> >> Hmm.. is there a way then to create an asynchronous and multithreaded
> >> component in PB?
> >>
> >> I can create an asynchronous call by having the calling component set
an
> >> instance variable on a Shared NotConcurrent Service component that
loops
> >> checking the instance variable for something to do. However, then I'm
> >> limited to one instance of the Service component.
> >>
> >> If I make the Service component NotShared and Concurrent, then when I
> make
> >> the call on it to set the instance variable, I get a new instance.
> However,
> >> the run() method hasn't been invoked on the new instance, so the
service
> >> component never finds that its instance variable has been set. I can't
> call
> >> the run() method myself, since that would be a synchronous call, and I
> would
> >> not be able to return untill the run() method completes.
> >>
> >> Is my understanding correct? Is there a way to have both asynchronous
> and
> >> multithreaded in PB components?
> >>
> >> Thanks very much for you help,
> >> David
> >>
> >> Jim O'Neil [Sybase] wrote in message <38BC0F35.8EEAE9A3@sybase.com>...
> >> >David Renton wrote:
> >> >
> >> >> Jim,
> >> >>
> >> >> When you say that:
> >> >>
> >> >> "except PowerBuilder threading support will not
> >> >> >support multiple threads of execution through one instance (you'd
> have a
> >> >> thread
> >> >> >in run() and a thread in stop() at the same time). So if using a
> shared
> >> >> >component you MUST not use concurrency. "
> >> >>
> >> >> Do you mean a PowerBuilder client, or does this also apply for a PB
> >> >> component running in Jaguar?
> >> >>
> >> >> Thanks,
> >> >> David
> >> >
> >> >I meant specifically a PowerBuilder component running in Jaguar. The
> same
> >> is
> >> >actually true of Shared Objects in PowerBuilder, it's just that
> >> PowerBuilder
> >> >know it can't do this so it doesn't, in Jaguar, it's Jaguar handling
the
> >> >component invocation, so you have to be sure to tell Jaguar not to try
> to
> >> do
> >> >it.
> >> >--
> >> >Jim O'Neil
> >> >Senior Technical Support Engineer
> >> >Sybase, Inc
> >> >
> >> >
> >
> >Let me know if this paradigm gets you what you want: Create a shared
> >non-concurrent "standard" component that each instance of the service
> component
> >will 'register' with and in that component set up an array of the
instance
> >variables you are checking. Each service component would then
essentially
> get a
> >unique ID, by making an intercomponent call in the start method perhaps,
> and you
> >can use that unique ID to index the instance variable array and thus
> control the
> >run loop of the specific instances of the service component. Presumably,
> you
> >would have some other manager type interface that would set the values of
> these
> >instance variables in this new shared component to halt the run loop.
> >
> >Hope that makes sense - writing this stuff out in English tends to make
it
> sound
> >more complicated than it is. Essentially, delegate the
setting/retrieving
> of
> >the state of the service component to another shared component.
> >
> >--
> >Jim O'Neil
> >Senior Technical Support Engineer
> >Sybase, Inc
> >
> >
>
>


Dean Jones [Team Sybase] Posted on 2000-02-29 03:24:46.0Z
Newsgroups: sybase.public.easerver
From: "Dean Jones [Team Sybase]" <dean_no_spam_@powerobjects.com>
Subject: Re: How to STOP a Jaguar service component from PB?
Date: Mon, 28 Feb 2000 21:24:46 -0600
Lines: 93
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: dsl131.outtech.com 216.207.145.131
Message-ID: <347_Abv5OVmg$GA.297@forums.sybase.com>
References: <347_cbmYzbgg$GA.274@forums.sybase.com> <347_38BAAF9A.AF5D4CB2@sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27592
Article PK: 158970

That's what I would do. Either use another component or an ini file.

Component A "service component"
Run()
WHILE ib_run
fnv_do_certain_things()
JagSleep( 10 ) /* x seconds */
ib_run = ProfileString( "my.ini", "continue", "component", "true" ) =
"true"

LOOP

Now simply have your client or other component call SetProfile...

HTH

--

Dean Jones, CPD Professional
Team Sybase
PowerTeam, Inc.
http://www.powerobjects.com

Jim O'Neil [Sybase] <joneil@sybase.com> wrote in message
news:38BAAF9A.AF5D4CB2@sybase.com...
> Bas wrote:
>
> > Who has advice:
> >
> > I deployed a service component which does the following in the RUN
method:
> >
> > WHILE ib_run
> > fnv_do_certain_things()
> >
> > LOOP
> >
> > In the STOP method, ib_run is set to FALSE .
> >
> > When I invoke the STOP method from a Client, ib_run is set to false, but
the
> > servicecomponent is not destroyed and stays in the while loop.
> >
> > NOTES:
> > I've added the servicecomponent to the services property with Jaguar
manager.
> > In the INSTANCES tab of the component, only concurrency is marked.
> > If I mark shared instead of concurrency then Powerbuilder does'nt
execute the
> > stop method invocation.
> >
> > ---== Posted via the PFCGuide Web Newsreader ==---
> > http://www.pfcguide.com/_newsgroups/group_list.asp
>
> You're running into a shortcoming or PowerBuilder. If you only have
concurrency
> checked and not sharing, then you should get a completely different
component
> instantiated and have two instances instead of one (I presume you only
want one
> service component instance). If you have shared and concurrency checked,
then it
> would behave the way you want, except PowerBuilder threading support will
not
> support multiple threads of execution through one instance (you'd have a
thread
> in run() and a thread in stop() at the same time). So if using a shared
> component you MUST not use concurrency. The only way to get this to work
with PB
> is to defer the setting of your stopping criteria to another component.
Create a
> shared component that simply is there to set the ib_false variable from
whatever
> client is now calling stop() on the service component and create another
method
> to get the value of ib_false to use in your run() test. While the shared
> component will also not be able to support concurrent requests, the
get/set
> methods will complete very quickly so you shouldn't be tying up any one
client
> for that long.
>
> Or use Java ;>)
>
> --
> Jim O'Neil
> Senior Technical Support Engineer
> Sybase, Inc
>
>


Tim Nesham Posted on 2000-02-28 16:42:00.0Z
Newsgroups: sybase.public.easerver
From: "Tim Nesham" <tim.nesham@born.com>
Subject: Re: How to STOP a Jaguar service component from PB?
Date: Mon, 28 Feb 2000 10:42:00 -0600
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
X-Original-NNTP-Posting-Host: 161.49.6.89
Organization: Quad/Graphics,Inc.
NNTP-Posting-Host: dns2.qgraph.com 206.158.124.2
Message-ID: <347_38baa55c@news.qgraph.com>
References: <347_cbmYzbgg$GA.274@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!news.qgraph.com!161.49.6.89
Xref: forums-1-dub sybase.public.easerver:27656
Article PK: 154569

My fault, you have WHILE ib_run. Sorry, a little quick on the gun.

"Bas" <klaaijsen@hotmail.com> wrote in message
news:cbmYzbgg$GA.274@forums.sybase.com...
> Who has advice:
>
>
> I deployed a service component which does the following in the RUN method:
>
> WHILE ib_run
> fnv_do_certain_things()
>
> LOOP
>
> In the STOP method, ib_run is set to FALSE .
>
> When I invoke the STOP method from a Client, ib_run is set to false, but
the
> servicecomponent is not destroyed and stays in the while loop.
>
> NOTES:
> I've added the servicecomponent to the services property with Jaguar
manager.
> In the INSTANCES tab of the component, only concurrency is marked.
> If I mark shared instead of concurrency then Powerbuilder does'nt execute
the
> stop method invocation.
>
>
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp


Tim Nesham Posted on 2000-02-28 16:39:54.0Z
Newsgroups: sybase.public.easerver
From: "Tim Nesham" <tim.nesham@born.com>
Subject: Re: How to STOP a Jaguar service component from PB?
Date: Mon, 28 Feb 2000 10:39:54 -0600
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
X-Original-NNTP-Posting-Host: 161.49.6.89
Organization: Quad/Graphics,Inc.
NNTP-Posting-Host: dns2.qgraph.com 206.158.124.2
Message-ID: <347_38baa4dd@news.qgraph.com>
References: <347_cbmYzbgg$GA.274@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!news.qgraph.com!161.49.6.89
Xref: forums-1-dub sybase.public.easerver:27657
Article PK: 159021

Don't you really want?:
Looks kinda like an infinite loop you got there.

WHILE ib_run
if ib_run = false then exit
fnv_do_certain_things()

LOOP

"Bas" <klaaijsen@hotmail.com> wrote in message
news:cbmYzbgg$GA.274@forums.sybase.com...
> Who has advice:
>
>
> I deployed a service component which does the following in the RUN method:
>
> WHILE ib_run
> fnv_do_certain_things()
>
> LOOP
>
> In the STOP method, ib_run is set to FALSE .
>
> When I invoke the STOP method from a Client, ib_run is set to false, but
the
> servicecomponent is not destroyed and stays in the while loop.
>
> NOTES:
> I've added the servicecomponent to the services property with Jaguar
manager.
> In the INSTANCES tab of the component, only concurrency is marked.
> If I mark shared instead of concurrency then Powerbuilder does'nt execute
the
> stop method invocation.
>
>
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp