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.

Challenge! Intercomponent call passing a component reference using PB.

3 posts in General Discussion (old) Last posting was on 2000-03-29 19:51:05.0Z
Ronald Nasby Posted on 2000-03-24 16:17:11.0Z
Newsgroups: sybase.public.easerver
From: "Ronald Nasby" <rnasby@minn.net>
Subject: Challenge! Intercomponent call passing a component reference using PB.
Date: Fri, 24 Mar 2000 10:17:11 -0600
Lines: 15
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: stpns.guidant.com 132.189.76.10
Message-ID: <347_01q3t0al$GA.285@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25745
Article PK: 155793

Using Powerbuilder created components, has anyone had success making an
intercomponent call to some target method that accepts a component reference
as an argument ?

Despite previous postings in this news group and documentation included with
PB all of which infer that this is possible, I have yet to hear of or see
evidence of anyone actually getting this to work.

I been attempting to do this with EAServer 3.1, and 3.5 with weird results.
(See previous posting by me)

Despite the debatable merits of this approach, I'd like to know if this is
supported or not.


Scott McReynolds [Sybase] Posted on 2000-03-27 16:17:14.0Z
Newsgroups: sybase.public.easerver
From: "Scott McReynolds [Sybase]" <scottmc@sybase.com>
Subject: Re: Challenge! Intercomponent call passing a component reference using PB.
Date: Mon, 27 Mar 2000 09:17:14 -0700
Lines: 114
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: scottmc-lpt.sybase.com 157.133.56.40
Message-ID: <347_$JNLaiAm$GA.52@forums.sybase.com>
References: <347_01q3t0al$GA.285@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25642
Article PK: 155706

Ronald

Here is an example that I have done that is similar to what you are looking
for (I think). The difference is that in this case the client is getting
the reference returned to it from the server based on the object that is to
be called.

Scott


The first CCUO (n_pbListener) performs a task.

PRIMARY SERVER OBJECT (N_PBLISTENER)
Protected:
Transaction ltrans
Datastore lds_data
ErrorLogging lel_log
--
Activate
//get logging object
this.GetContextService("ErrorLogging", lel_log)

//setup datastore
lds_data = create datastore
lds_data.dataObject = "d_emp"
ltrans = create transaction

// Profile EAS Demo DB V3
ltrans.DBMS = "ODBC"
ltrans.Database = "EAS Demo DB V3"
ltrans.AutoCommit = False
ltrans.DBParm = "ConnectString='DSN=EAS Demo DB V3;UID=dba;PWD=sql'"

connect using ltrans;

---
public function blob of_runserver ();
int li_loop
blob lblb_data

lds_data.dataObject = "d_emp"
lds_data.setTransObject(ltrans)

lds_data.retrieve()

lds_data.getFullState(lblb_data)


return lblb_data
---
Deactivate
//get logging object
if (isValid(lds_data)) then
destroy lds_data
end if;

disconnect using ltrans;

if (isValid(ltrans)) then
destroy ltrans
end if;




____________________________________________________________________________
______________________

The following CCUO gets the proxy and calls listener using the proxy
returned from the calling server object.


CALLING SERVER OBJECT (N_CALLLISTENER)
Public function asyncexamples_pblistener of_getlistener ()
//define the proxy object to be returned
asyncexamples_pblistener l_asyncexamples_pblistener

//define the transaction object for intercomponent call
TransactionServer its_jag

//get the transaction object
this.GetContextService ("TransactionServer", its_jag)

//create the proxy object
its_jag.CreateInstance(l_asyncexamples_pblistener,
"AsyncExamples/pbListener")

//return the proxy object
return l_asyncexamples_pblistener.of_runserver ()

"Ronald Nasby" <rnasby@minn.net> wrote in message
news:01q3t0al$GA.285@forums.sybase.com...
> Using Powerbuilder created components, has anyone had success making an
> intercomponent call to some target method that accepts a component
reference
> as an argument ?
>
> Despite previous postings in this news group and documentation included
with
> PB all of which infer that this is possible, I have yet to hear of or see
> evidence of anyone actually getting this to work.
>
> I been attempting to do this with EAServer 3.1, and 3.5 with weird
results.
> (See previous posting by me)
>
> Despite the debatable merits of this approach, I'd like to know if this is
> supported or not.
>
>


Ronald Nasby Posted on 2000-03-29 19:51:05.0Z
Newsgroups: sybase.public.easerver
From: "Ronald Nasby" <rnasby@minn.net>
Subject: Re: Challenge! Intercomponent call passing a component reference using PB.
Date: Wed, 29 Mar 2000 13:51:05 -0600
Lines: 18
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: stpns.guidant.com 132.189.76.10
Message-ID: <347_VUAwsjbm$GA.52@forums.sybase.com>
References: <347_01q3t0al$GA.285@forums.sybase.com> <347_$JNLaiAm$GA.52@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25321
Article PK: 155427

Thanks for the response Scott. Thanks for the example code as well.

Like you say, your example is close, but not exactly what I was attempting.
What I would really like to see is an example of that sort involving only
server components. Ideally, one component calling a factory method twice to
get two stateful components ComponentRef1 and ComponentRef2 and then
executing a method on ComponentRef1 that takes as an argument ComponentRef2.

For the moment I've given up on this approach. The motivation for this was
to come up with a way to maintain state between stateless intercomponent
calls. I've since looked at passing either structures, or an XML message id
pointer into a DLL, wrapping an XML DOM API. I decided to go with the XML
id approach, because intercomponent calls should be faster, an we are
already pretty heavy into using XML for processing.

Thanks again.