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.

Is it legal for shared PB component to post to itself ?

10 posts in General Discussion (old) Last posting was on 2000-02-18 04:51:27.0Z
Victor Rasputnis Posted on 2000-02-17 16:39:58.0Z
Newsgroups: sybase.public.easerver
From: "Victor Rasputnis" <VictorRasputnis@toast.net>
Subject: Is it legal for shared PB component to post to itself ?
Date: Thu, 17 Feb 2000 11:39:58 -0500
Lines: 12
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
NNTP-Posting-Host: bk01.bankofny.com 160.254.115.80
Message-ID: <347_td9vqbWe$GA.324@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28494
Article PK: 160648

Hello everyone.

Is it safe for shared singleton PB component to Post to itself?

Because, if it is then client can poll for a result and get it (result)
de-facto async.

Thanks,
Victor


Dave Wolf [Sybase] Posted on 2000-02-17 16:47:05.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: Is it legal for shared PB component to post to itself ?
Date: Thu, 17 Feb 2000 11:47:05 -0500
Lines: 21
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: dwolf-nt.sybase.com 157.133.41.127
Message-ID: <347_ujmBfcWe$GA.184@forums.sybase.com>
References: <347_td9vqbWe$GA.324@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28493
Article PK: 160647

No its not safe in PB to be re-entrant on a shared instance.

Dave Wolf
Internet Applications Division

Victor Rasputnis <VictorRasputnis@toast.net> wrote in message
news:td9vqbWe$GA.324@forums.sybase.com...
> Hello everyone.
>
> Is it safe for shared singleton PB component to Post to itself?
>
> Because, if it is then client can poll for a result and get it (result)
> de-facto async.
>
> Thanks,
> Victor
>
>
>


Glenn Santa Cruz Posted on 2000-02-17 17:05:52.0Z
Newsgroups: sybase.public.easerver
Date: Thu, 17 Feb 2000 11:05:52 -0600
From: Glenn Santa Cruz <spam?no.glenn_santacruz@dailyaccess.com>
Organization: Daily Access Concepts
X-Mailer: Mozilla 4.7 [en] (Win95; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Is it legal for shared PB component to post to itself ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 24
NNTP-Posting-Host: 12.6.74.30
Message-ID: <347_38AC2A70.97F33181@dailyaccess.com>
References: <347_td9vqbWe$GA.324@forums.sybase.com> <347_ujmBfcWe$GA.184@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28492
Article PK: 154676

Hopefully this doesn't include recursive method calls on an object?
Scenario: non-shared, poolable, bound-thread PB component, upon
invocation of a public method, calls recursive protected method on
itself to perform some calculations. I would think that this design
shouldn't present a problem, since there would be only one thread on all
invocations, but could someone please relieve my concern?

TIA

Glenn

"Dave Wolf [Sybase]" wrote:
>
> No its not safe in PB to be re-entrant on a shared instance.
>
> Dave Wolf
> Internet Applications Division
>
> Victor Rasputnis <VictorRasputnis@toast.net> wrote in message
> news:td9vqbWe$GA.324@forums.sybase.com...
> > Hello everyone.
> >
> > Is it safe for shared singleton PB component to Post to itself?
> >
> > Because, if it is then client can poll for a result and get it (result)
> > de-facto async.
> >
> > Thanks,
> > Victor
> >
> >
> >


Timothy P Beck Posted on 2000-02-17 23:16:21.0Z
Newsgroups: sybase.public.easerver
Reply-To: "Timothy P Beck" <tpbeck@intelliserve.com>
From: "Timothy P Beck" <tpbeck@intelliserve.com>
Subject: Re: Is it legal for shared PB component to post to itself ?
Date: Thu, 17 Feb 2000 18:16:21 -0500
Lines: 62
Organization: IntelliServe LLC
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: fw.southwire.com 204.155.48.30
Message-ID: <347_Yn8#o0Ze$GA.149@forums.sybase.com>
References: <347_td9vqbWe$GA.324@forums.sybase.com> <347_ujmBfcWe$GA.184@forums.sybase.com> <347_38AC2A70.97F33181@dailyaccess.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28435
Article PK: 154669

Glenn,

I'm guessing from your description below that you're not creating another
instance, but rather recalling a method on the same instance as:

function of_dosomething( value )

if value = x then
return value
else
return of_dosomething( value )
end if

If this is the case ... the recurse to your hearts content. If, on the
other hand, you create a new instance (new jag component instance), then ...
it's not a real good idea.

--
Timothy P. Beck
IntelliServe LLC
An Intelligent Choice
www.intelliserve.com
tpbeck@intelliserve.com
(760) 431-1310

Glenn Santa Cruz <spam?no.glenn_santacruz@dailyaccess.com> wrote in message
news:38AC2A70.97F33181@dailyaccess.com...
> Hopefully this doesn't include recursive method calls on an object?
> Scenario: non-shared, poolable, bound-thread PB component, upon
> invocation of a public method, calls recursive protected method on
> itself to perform some calculations. I would think that this design
> shouldn't present a problem, since there would be only one thread on all
> invocations, but could someone please relieve my concern?
>
> TIA
>
> Glenn
>
> "Dave Wolf [Sybase]" wrote:
> >
> > No its not safe in PB to be re-entrant on a shared instance.
> >
> > Dave Wolf
> > Internet Applications Division
> >
> > Victor Rasputnis <VictorRasputnis@toast.net> wrote in message
> > news:td9vqbWe$GA.324@forums.sybase.com...
> > > Hello everyone.
> > >
> > > Is it safe for shared singleton PB component to Post to itself?
> > >
> > > Because, if it is then client can poll for a result and get it
(result)
> > > de-facto async.
> > >
> > > Thanks,
> > > Victor
> > >
> > >
> > >


Glenn Santa Cruz Posted on 2000-02-17 23:39:32.0Z
Newsgroups: sybase.public.easerver
Date: Thu, 17 Feb 2000 17:39:32 -0600
From: Glenn Santa Cruz <spam?no.glenn_santacruz@dailyaccess.com>
Organization: Daily Access Concepts
X-Mailer: Mozilla 4.7 [en] (Win95; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Is it legal for shared PB component to post to itself ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 60
NNTP-Posting-Host: 12.6.74.30
Message-ID: <347_38AC86B4.28AE48A1@dailyaccess.com>
References: <347_td9vqbWe$GA.324@forums.sybase.com> <347_ujmBfcWe$GA.184@forums.sybase.com> <347_38AC2A70.97F33181@dailyaccess.com> <347_Yn8#o0Ze$GA.149@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28431
Article PK: 160449

No, I'm not creating a new instance within the method, but I think that
doing so would not present a problem, either. Seems that the only real
problem would occur if more than one thread were started on the same
instance. Since the component is flagged as non-shared, I don't expect
to see any reentrant calls. (FWIW I don't see how recursive calls can
be reentrant in PowerBuilder anyway.)

Could you please explain a bit further about the problem with creating a
new instance?

Thanks

Glenn

Timothy P Beck wrote:
>
> Glenn,
>
> I'm guessing from your description below that you're not creating another
> instance, but rather recalling a method on the same instance as:
>
> function of_dosomething( value )
>
> if value = x then
> return value
> else
> return of_dosomething( value )
> end if
>
> If this is the case ... the recurse to your hearts content. If, on the
> other hand, you create a new instance (new jag component instance), then ...
> it's not a real good idea.
>
> --
> Timothy P. Beck
> IntelliServe LLC
> An Intelligent Choice
> www.intelliserve.com
> tpbeck@intelliserve.com
> (760) 431-1310
>
> Glenn Santa Cruz <spam?no.glenn_santacruz@dailyaccess.com> wrote in message
> news:38AC2A70.97F33181@dailyaccess.com...
> > Hopefully this doesn't include recursive method calls on an object?
> > Scenario: non-shared, poolable, bound-thread PB component, upon
> > invocation of a public method, calls recursive protected method on
> > itself to perform some calculations. I would think that this design
> > shouldn't present a problem, since there would be only one thread on all
> > invocations, but could someone please relieve my concern?
> >
> > TIA
> >
> > Glenn
> >
> > "Dave Wolf [Sybase]" wrote:
> > >
> > > No its not safe in PB to be re-entrant on a shared instance.
> > >
> > > Dave Wolf
> > > Internet Applications Division
> > >
> > > Victor Rasputnis <VictorRasputnis@toast.net> wrote in message
> > > news:td9vqbWe$GA.324@forums.sybase.com...
> > > > Hello everyone.
> > > >
> > > > Is it safe for shared singleton PB component to Post to itself?
> > > >
> > > > Because, if it is then client can poll for a result and get it
> (result)
> > > > de-facto async.
> > > >
> > > > Thanks,
> > > > Victor
> > > >
> > > >
> > > >


Jim O'Neil [Sybase] Posted on 2000-02-18 02:18:31.0Z
Newsgroups: sybase.public.easerver
Date: Thu, 17 Feb 2000 21:18: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: Is it legal for shared PB component to post to itself ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 39
NNTP-Posting-Host: nomad6-37.sybase.com 157.133.176.37
Message-ID: <347_38ACABF6.16CE85CD@sybase.com>
References: <347_td9vqbWe$GA.324@forums.sybase.com> <347_ujmBfcWe$GA.184@forums.sybase.com> <347_38AC2A70.97F33181@dailyaccess.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28424
Article PK: 160445


Glenn Santa Cruz wrote:

> Hopefully this doesn't include recursive method calls on an object?
> Scenario: non-shared, poolable, bound-thread PB component, upon
> invocation of a public method, calls recursive protected method on
> itself to perform some calculations. I would think that this design
> shouldn't present a problem, since there would be only one thread on all
> invocations, but could someone please relieve my concern?
>
> TIA
>
> Glenn
>

No problem that I'm aware of - if you think about it, this would preclude a
'normal' PowerBuilder application from having any recursion as well.

By the way, I'm not completely sure that you wouldn't be able to have a
NON-CONCURRENT PB component POST a call to itself as an intercomponent call.
If the component is marked as not concurrent, then the 'posted' call would
essentially sit on a queue of requests just as if it were a call from another
component, and since it's a POST (vs. TRIGGER), the thread that initiated the
POST will complete without delay. The next request for the component would
then just be pulled from the queued up requests, regardless of the source of
that request. I'd stay away from POSTing calls on the object itself though
(i.e., this.POST myfunc), because I doubt that Jaguar will be able or even know
to synchronize that request. I'll add the caveat that I haven't tried any of
this though, but I think the reasoning is sound.

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


Glenn Santa Cruz Posted on 2000-02-18 02:59:37.0Z
Newsgroups: sybase.public.easerver
Date: Thu, 17 Feb 2000 20:59:37 -0600
From: Glenn Santa Cruz <spam?no.glenn_santacruz@dailyaccess.com>
Organization: Daily Access Concepts
X-Mailer: Mozilla 4.7 [en] (Win95; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Is it legal for shared PB component to post to itself ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 54
NNTP-Posting-Host: 12.6.74.30
Message-ID: <347_38ACB599.D677E3A6@dailyaccess.com>
References: <347_td9vqbWe$GA.324@forums.sybase.com> <347_ujmBfcWe$GA.184@forums.sybase.com> <347_38AC2A70.97F33181@dailyaccess.com> <347_38ACABF6.16CE85CD@sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28416
Article PK: 160439

Sounds like a "poor man's messaging service" to me :) I suppose you
could create a non-shared PB component (or shared Java component) and
have a non-shared PB component POST method calls to it (a-la
intercomponent calls), thereby simulating a message queue without having
to explicitly construct such a service. Do you think it would be
reliable? (i.e. future-proof for next few versions of Jaguar) Not that
I'm seriously considering placing something like that in production ...
;)

Glenn

"Jim O'Neil [Sybase]" wrote:
>
> Glenn Santa Cruz wrote:
>
> > Hopefully this doesn't include recursive method calls on an object?
> > Scenario: non-shared, poolable, bound-thread PB component, upon
> > invocation of a public method, calls recursive protected method on
> > itself to perform some calculations. I would think that this design
> > shouldn't present a problem, since there would be only one thread on all
> > invocations, but could someone please relieve my concern?
> >
> > TIA
> >
> > Glenn
> >
>
> No problem that I'm aware of - if you think about it, this would preclude a
> 'normal' PowerBuilder application from having any recursion as well.
>
> By the way, I'm not completely sure that you wouldn't be able to have a
> NON-CONCURRENT PB component POST a call to itself as an intercomponent call.
> If the component is marked as not concurrent, then the 'posted' call would
> essentially sit on a queue of requests just as if it were a call from another
> component, and since it's a POST (vs. TRIGGER), the thread that initiated the
> POST will complete without delay. The next request for the component would
> then just be pulled from the queued up requests, regardless of the source of
> that request. I'd stay away from POSTing calls on the object itself though
> (i.e., this.POST myfunc), because I doubt that Jaguar will be able or even know
> to synchronize that request. I'll add the caveat that I haven't tried any of
> this though, but I think the reasoning is sound.
>
> --
> Jim O'Neil
> Senior Technical Support Engineer
> Sybase, Inc


Jim O'Neil [Sybase] Posted on 2000-02-18 04:51:27.0Z
Newsgroups: sybase.public.easerver
Date: Thu, 17 Feb 2000 23:51:27 -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: Is it legal for shared PB component to post to itself ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 25
NNTP-Posting-Host: nomad6-37.sybase.com 157.133.176.37
Message-ID: <347_38ACCFCF.699F13D2@sybase.com>
References: <347_td9vqbWe$GA.324@forums.sybase.com> <347_ujmBfcWe$GA.184@forums.sybase.com> <347_38AC2A70.97F33181@dailyaccess.com> <347_38ACABF6.16CE85CD@sybase.com> <347_38ACB599.D677E3A6@dailyaccess.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28414
Article PK: 160435


Glenn Santa Cruz wrote:

> Sounds like a "poor man's messaging service" to me :) I suppose you
> could create a non-shared PB component (or shared Java component) and
> have a non-shared PB component POST method calls to it (a-la
> intercomponent calls), thereby simulating a message queue without having
> to explicitly construct such a service. Do you think it would be
> reliable? (i.e. future-proof for next few versions of Jaguar) Not that
> I'm seriously considering placing something like that in production ...
> ;)
>
> Glenn

No guarantees from me that it's even present-proof ;>) It's probably academic at
this point, but if the first component you mentioned is the 'queue' then you'd want
it shared (because you want only one) and not concurrent (because it's PB),
otherwise, you might end up with multiple instances/queues depending upon the speed
of the POSTs.

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


Dave Wolf [Sybase] Posted on 2000-02-18 02:29:10.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: Is it legal for shared PB component to post to itself ?
Date: Thu, 17 Feb 2000 21:29:10 -0500
Lines: 17
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: 158.159.8.32
Message-ID: <347_WnTswhbe$GA.149@forums.sybase.com>
References: <347_td9vqbWe$GA.324@forums.sybase.com> <347_ujmBfcWe$GA.184@forums.sybase.com> <347_38AC2A70.97F33181@dailyaccess.com> <347_38ACABF6.16CE85CD@sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28421
Article PK: 160440

. I'll add the caveat that I haven't tried any of
> this though, but I think the reasoning is sound.

You dont think I try this stuff either do you??? <wink>

Dave Wolf
Internet Applications Division

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


Dave Wolf [Sybase] Posted on 2000-02-17 18:15:11.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: Is it legal for shared PB component to post to itself ?
Date: Thu, 17 Feb 2000 13:15:11 -0500
Lines: 42
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: dwolf-nt.sybase.com 157.133.41.127
Message-ID: <347_tmP2tNXe$GA.324@forums.sybase.com>
References: <347_td9vqbWe$GA.324@forums.sybase.com> <347_ujmBfcWe$GA.184@forums.sybase.com> <347_38AC2A70.97F33181@dailyaccess.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28478
Article PK: 160635

Im not a PB guru, someone?

Dave Wolf
Internet Applications Division

Glenn Santa Cruz <spam?no.glenn_santacruz@dailyaccess.com> wrote in message
news:38AC2A70.97F33181@dailyaccess.com...
> Hopefully this doesn't include recursive method calls on an object?
> Scenario: non-shared, poolable, bound-thread PB component, upon
> invocation of a public method, calls recursive protected method on
> itself to perform some calculations. I would think that this design
> shouldn't present a problem, since there would be only one thread on all
> invocations, but could someone please relieve my concern?
>
> TIA
>
> Glenn
>
> "Dave Wolf [Sybase]" wrote:
> >
> > No its not safe in PB to be re-entrant on a shared instance.
> >
> > Dave Wolf
> > Internet Applications Division
> >
> > Victor Rasputnis <VictorRasputnis@toast.net> wrote in message
> > news:td9vqbWe$GA.324@forums.sybase.com...
> > > Hello everyone.
> > >
> > > Is it safe for shared singleton PB component to Post to itself?
> > >
> > > Because, if it is then client can poll for a result and get it
(result)
> > > de-facto async.
> > >
> > > Thanks,
> > > Victor
> > >
> > >
> > >