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.

EJBConnection Lookup method

6 posts in EJB Client Last posting was on 2003-05-27 22:56:38.0Z
Felix Posted on 2003-05-23 16:19:52.0Z
Newsgroups: sybase.public.powerbuilder.ejbclient
From: Felix
Date: Fri, 23 May 2003 12:19:52 -0400
Subject: EJBConnection Lookup method
Lines: 7
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <359_95193A25069A241B0059B5D385256D2F.0059B5E385256D2F@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:32
Article PK: 424231

Hello,
Could any body explain why do we need to provide fully-qualified class name
of the EJB home interface in the EJBConnection lookup method? This require
to specify server's classpath along, which should be transparent to the
client application. What, if the file structure changes on the server?

Thanks.


Milton_Benavides Posted on 2003-05-23 16:30:29.0Z
Newsgroups: sybase.public.powerbuilder.ejbclient
From: Milton_Benavides
Date: Fri, 23 May 2003 12:30:29 -0400
Subject: Re: EJBConnection Lookup method
Lines: 8
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <359_B947E33263712095005AAE7E85256D2F.005A509185256D2F@webforums>
References: <359_95193A25069A241B0059B5D385256D2F.0059B5E385256D2F@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:34
Article PK: 424234

Try:


// instance variable CartHome MycartHome
// EJB's home interface

long ll_result //Get the home interface
ll_result = myconnect.Lookup(MycartHome,"Cart/Mycart", "com.xyz.CartHome")


Felix Posted on 2003-05-23 16:37:24.0Z
Newsgroups: sybase.public.powerbuilder.ejbclient
From: fELIX
Date: Fri, 23 May 2003 12:37:24 -0400
Subject: Re: EJBConnection Lookup method
Lines: 3
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <359_2B7FADD35EC18B22005B50B185256D2F.005AAE9885256D2F@webforums>
References: <359_95193A25069A241B0059B5D385256D2F.0059B5E385256D2F@webforums> <359_B947E33263712095005AAE7E85256D2F.005A509185256D2F@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:35
Article PK: 424237

Thanks for your response. This is working. But my question is why do we
need to provide fully qualify name of the home interface (com.xyz.CartHome)
along with the Application server's CLASSPATH?


Jim O'Neil [Sybase] Posted on 2003-05-23 20:48:02.0Z
Newsgroups: sybase.public.powerbuilder.ejbclient
From: joneil@sybase.com (Jim O'Neil [Sybase])
Subject: Re: EJBConnection Lookup method
Date: Fri, 23 May 2003 20:48:02 GMT
Organization: Sybase Technical Support
Reply-To: joneil_REMOVETHISPART@sybase.com
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: joneilpc.sybase.com 10.18.61.121
Lines: 26
Message-ID: <359_3ece88fd.31967106@forums.sybase.com>
References: <359_95193A25069A241B0059B5D385256D2F.0059B5E385256D2F@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:36
Article PK: 424235

Agreed, it's not really necessary and there is an enhancement request
to overload the method and provide only two arguments. The proxy type
and the JNDI name. The classname can actually be derived from a
property of the proxy class.

That said though, I don't understand your contention that it requires
you to specify the server's classpath. The home interface class needs
to reside on the client too, and is a part of the client jar file
required by any J2EE app server. There is no dependency on the server
classpath.

On Fri, 23 May 2003 12:19:52 -0400, Felix wrote:

>Hello,
>Could any body explain why do we need to provide fully-qualified class name
>of the EJB home interface in the EJBConnection lookup method? This require
>to specify server's classpath along, which should be transparent to the
>client application. What, if the file structure changes on the server?
>
>Thanks.

Jim O'Neil
Principal Technical Support Engineer
Sybase, Inc.
Concord, MA


Felix Posted on 2003-05-27 22:32:26.0Z
Newsgroups: sybase.public.powerbuilder.ejbclient
From: Felix
Date: Tue, 27 May 2003 18:32:26 -0400
Subject: Re: EJBConnection Lookup method
Lines: 9
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <359_A7167D0AA100000B007BD19385256D33.0076B2C985256D2F@webforums>
References: <359_95193A25069A241B0059B5D385256D2F.0059B5E385256D2F@webforums> <359_3ece88fd.31967106@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:42
Article PK: 424242

Hello Jim,
Thanks for your response. Correct me if I'm wrong, but client's JAR file
should contain only stub classes that are required by the client program at
run time. This is done by creating the proxy.pbl. The home interfaces
reside on the application server, or even some where else and created by
ejb container by the given JNDI name. When home is created, it returns the
stub which corresponds to the PB proxy. Why home interface should reside on
the client is unclear. What will happen
Thanks for your help.


Jim O'Neil [Sybase] Posted on 2003-05-27 22:56:38.0Z
Newsgroups: sybase.public.powerbuilder.ejbclient
From: joneil@sybase.com (Jim O'Neil [Sybase])
Subject: Re: EJBConnection Lookup method
Date: Tue, 27 May 2003 22:56:38 GMT
Organization: Sybase Technical Support
Reply-To: joneil_REMOVETHISPART@sybase.com
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: vpn-concord-058.sybase.com 158.159.8.58
Lines: 31
Message-ID: <359_3ed3eb54.13777751@forums.sybase.com>
References: <359_95193A25069A241B0059B5D385256D2F.0059B5E385256D2F@webforums> <359_3ece88fd.31967106@forums.sybase.com> <359_A7167D0AA100000B007BD19385256D33.0076B2C985256D2F@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:43
Article PK: 424244

See within...

On Tue, 27 May 2003 18:32:26 -0400, Felix wrote:

>Hello Jim,
>Thanks for your response. Correct me if I'm wrong, but client's JAR file
>should contain only stub classes that are required by the client program at
>run time.

Correct!

>>This is done by creating the proxy.pbl.
Not really, the proxy.pbl is really a proxy to the Java stubs, if you
will. Under the covers, PowerBuilder hosts a Java VM, so the same
client JAR you would use for a pure Java client application is still a
requirement. The PowerBuilder proxies allow you to interacts with the
underlying Java classes from within PowerScript.


>>The home interfaces
>reside on the application server, or even some where else and created by
>ejb container by the given JNDI name. When home is created, it returns the
>stub which corresponds to the PB proxy. Why home interface should reside on
>the client is unclear. What will happen
Your understanding is mostly correct. Your only error is equating the
PB proxy with the Java stub that is returned. It is not the same, but
rather a wrapper for the stub.

>Thanks for your help.

Jim O'Neil
Principal Technical Support Engineer
Sybase, Inc.
Concord, MA