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.

PB 7.0.2 to EJB on EAServer 3.5

4 posts in General Discussion (old) Last posting was on 2000-03-20 16:04:47.0Z
Turk Vojan Posted on 2000-03-17 16:30:27.0Z
Newsgroups: sybase.public.easerver
From: "Turk Vojan" <turk.vojan@mobitel.si>
Subject: PB 7.0.2 to EJB on EAServer 3.5
Date: Fri, 17 Mar 2000 17:30:27 +0100
Lines: 9
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: 193.189.186.50
Message-ID: <347_kCxVx6Ck$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:26196
Article PK: 156865

I am having problems with executing CreateInstance or/and Lookup function
from PB 7.0.2 (build 8011) to EJB (session bean) on EAServer 3.5 (connection
went fine). I always get a Distributed Service Error (err. no. 50). This is
even more strange with Lookup function, which should return 0 or negative
number. EJB was created and deployed with PowerJ (jdk 1.1).

Help?!


Scott McReynolds [Sybase] Posted on 2000-03-17 17:03:25.0Z
Newsgroups: sybase.public.easerver
From: "Scott McReynolds [Sybase]" <scottmc@sybase.com>
Subject: Re: PB 7.0.2 to EJB on EAServer 3.5
Date: Fri, 17 Mar 2000 10:03:25 -0700
Lines: 63
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_ZeaKJNDk$GA.111@forums.sybase.com>
References: <347_kCxVx6Ck$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:26191
Article PK: 156860

Turk,

You cannot use the createInstance method to connect to EJBs from PB. Here
is an example of how to do it. Remember that you need to create the proxie
for the manager and session objects.

Here's the code to instantiate a stateless session bean called EJB/Loan
whose home interface is ejbloan/LoanHome and remote interface
is ejbloan/Loan. The single method is calculate taking a loan amount
(double) and a payment term (integer). I generated the proxies
from PowerBuilder just like you had (and no different from 'normal'
components). This code was pulled out of a bigger test app I have
so there may need to be a bit of tweaking to get it to work on your end, but
I think you can get the gist of it from here.

via JaguarORB

JaguarORB my_orb
CORBAObject my_corbaobj
Manager my_Manager
Session my_session
LoanHome my_loanHome
Loan my_loan

string sORBOptions = ""
my_orb = CREATE uo_JagORB

if my_orb.init(sORBOptions) = 0 then

if my_orb.String_to_Object("iiop://localhost:9000", my_corbaObj) = 0 then
my_corbaObj._narrow(my_manager, "SessionManager/Manager" )

my_Session = my_manager.createSession("jagadmin", "")
my_corbaObj = my_session.lookup("EJB/Loan")

my_corbaObj._narrow(my_LoanHome, "ejbloan/LoanHome")
my_corbaObj = my_LoanHome.create()

my_corbaobj._narrow(my_Loan, "ejbloan/Loan");

em_total.text = String(my_loan.calculate(Double(em_orig.text),
Integer(ddlb_months.text)))
end if
else
MessageBox("Error", "Failed to Resolve Initial References", StopSign!)
end if

"Turk Vojan" <turk.vojan@mobitel.si> wrote in message
news:kCxVx6Ck$GA.285@forums.sybase.com...
> I am having problems with executing CreateInstance or/and Lookup function
> from PB 7.0.2 (build 8011) to EJB (session bean) on EAServer 3.5
(connection
> went fine). I always get a Distributed Service Error (err. no. 50). This
is
> even more strange with Lookup function, which should return 0 or negative
> number. EJB was created and deployed with PowerJ (jdk 1.1).
>
> Help?!
>
>


Turk Vojan Posted on 2000-03-18 14:51:35.0Z
Newsgroups: sybase.public.easerver
From: "Turk Vojan" <turk.vojan@mobitel.si>
Subject: Re: PB 7.0.2 to EJB on EAServer 3.5
Date: Sat, 18 Mar 2000 15:51:35 +0100
Lines: 74
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: 193.189.186.50
Message-ID: <347_k5TNKoOk$GA.285@forums.sybase.com>
References: <347_kCxVx6Ck$GA.285@forums.sybase.com> <347_ZeaKJNDk$GA.111@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:26133
Article PK: 156814

Thanks for your answer. What about using a connection object?
That is where Lookup function doesn't work at my place.

Scott McReynolds [Sybase] <scottmc@sybase.com> wrote in message
news:ZeaKJNDk$GA.111@forums.sybase.com...
> Turk,
>
> You cannot use the createInstance method to connect to EJBs from PB. Here
> is an example of how to do it. Remember that you need to create the
proxie
> for the manager and session objects.
>
> Here's the code to instantiate a stateless session bean called EJB/Loan
> whose home interface is ejbloan/LoanHome and remote interface
> is ejbloan/Loan. The single method is calculate taking a loan amount
> (double) and a payment term (integer). I generated the proxies
> from PowerBuilder just like you had (and no different from 'normal'
> components). This code was pulled out of a bigger test app I have
> so there may need to be a bit of tweaking to get it to work on your end,
but
> I think you can get the gist of it from here.
>
> via JaguarORB
>
> JaguarORB my_orb
> CORBAObject my_corbaobj
> Manager my_Manager
> Session my_session
> LoanHome my_loanHome
> Loan my_loan
>
> string sORBOptions = ""
> my_orb = CREATE uo_JagORB
>
> if my_orb.init(sORBOptions) = 0 then
>
> if my_orb.String_to_Object("iiop://localhost:9000", my_corbaObj) = 0 then
> my_corbaObj._narrow(my_manager, "SessionManager/Manager" )
>
> my_Session = my_manager.createSession("jagadmin", "")
> my_corbaObj = my_session.lookup("EJB/Loan")
>
> my_corbaObj._narrow(my_LoanHome, "ejbloan/LoanHome")
> my_corbaObj = my_LoanHome.create()
>
> my_corbaobj._narrow(my_Loan, "ejbloan/Loan");
>
> em_total.text = String(my_loan.calculate(Double(em_orig.text),
> Integer(ddlb_months.text)))
> end if
> else
> MessageBox("Error", "Failed to Resolve Initial References", StopSign!)
> end if
>
>
> "Turk Vojan" <turk.vojan@mobitel.si> wrote in message
> news:kCxVx6Ck$GA.285@forums.sybase.com...
> > I am having problems with executing CreateInstance or/and Lookup
function
> > from PB 7.0.2 (build 8011) to EJB (session bean) on EAServer 3.5
> (connection
> > went fine). I always get a Distributed Service Error (err. no. 50). This
> is
> > even more strange with Lookup function, which should return 0 or
negative
> > number. EJB was created and deployed with PowerJ (jdk 1.1).
> >
> > Help?!
> >
> >
>
>


Jim O'Neil [Sybase] Posted on 2000-03-20 16:04:47.0Z
Newsgroups: sybase.public.easerver
Date: Mon, 20 Mar 2000 11:04:47 -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: PB 7.0.2 to EJB on EAServer 3.5
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 70
NNTP-Posting-Host: joneil-nt.sybase.com 204.167.42.111
Message-ID: <347_38D64C1F.F50745D2@sybase.com>
References: <347_kCxVx6Ck$GA.285@forums.sybase.com> <347_ZeaKJNDk$GA.111@forums.sybase.com> <347_k5TNKoOk$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:26087
Article PK: 156090


Turk Vojan wrote:

> Thanks for your answer. What about using a connection object?
> That is where Lookup function doesn't work at my place.
>
> Scott McReynolds [Sybase] <scottmc@sybase.com> wrote in message
> news:ZeaKJNDk$GA.111@forums.sybase.com...
> > Turk,
> >
> > You cannot use the createInstance method to connect to EJBs from PB. Here
> > is an example of how to do it. Remember that you need to create the
> proxie
> > for the manager and session objects.
> >
> > Here's the code to instantiate a stateless session bean called EJB/Loan
> > whose home interface is ejbloan/LoanHome and remote interface
> > is ejbloan/Loan. The single method is calculate taking a loan amount
> > (double) and a payment term (integer). I generated the proxies
> > from PowerBuilder just like you had (and no different from 'normal'
> > components). This code was pulled out of a bigger test app I have
> > so there may need to be a bit of tweaking to get it to work on your end,
> but
> > I think you can get the gist of it from here.
> >
> > via JaguarORB
> >
> > JaguarORB my_orb
> > CORBAObject my_corbaobj
> > Manager my_Manager
> > Session my_session
> > LoanHome my_loanHome
> > Loan my_loan
> >
> > string sORBOptions = ""
> > my_orb = CREATE uo_JagORB
> >
> > if my_orb.init(sORBOptions) = 0 then
> >
> > if my_orb.String_to_Object("iiop://localhost:9000", my_corbaObj) = 0 then
> > my_corbaObj._narrow(my_manager, "SessionManager/Manager" )
> >
> > my_Session = my_manager.createSession("jagadmin", "")
> > my_corbaObj = my_session.lookup("EJB/Loan")
> >
> > my_corbaObj._narrow(my_LoanHome, "ejbloan/LoanHome")
> > my_corbaObj = my_LoanHome.create()
> >
> > my_corbaobj._narrow(my_Loan, "ejbloan/Loan");
> >
> > em_total.text = String(my_loan.calculate(Double(em_orig.text),
> > Integer(ddlb_months.text)))
> > end if
> > else
> > MessageBox("Error", "Failed to Resolve Initial References", StopSign!)
> > end if
> >
> >
> > "Turk Vojan" <turk.vojan@mobitel.si> wrote in message
> > news:kCxVx6Ck$GA.285@forums.sybase.com...
> > > I am having problems with executing CreateInstance or/and Lookup
> function
> > > from PB 7.0.2 (build 8011) to EJB (session bean) on EAServer 3.5
> > (connection
> > > went fine). I always get a Distributed Service Error (err. no. 50). This
> > is
> > > even more strange with Lookup function, which should return 0 or
> negative
> > > number. EJB was created and deployed with PowerJ (jdk 1.1).
> > >
> > > Help?!
> > >
> > >
> >
> >

Lookup on the Connection object will not support EJBs in the current release,
that support is currently scheduled for PB 8.0.
--
Jim O'Neil
Senior Technical Support Engineer
Sybase, Inc