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.

NetBeans 5.5 + JBoss + PowerBuilder EJB client

2 posts in EJB Client Last posting was on 2008-08-26 09:08:13.0Z
Peter Michaleczky Posted on 2007-10-31 09:17:12.0Z
From: "Peter Michaleczky" <michaleczky.peter@sybase.hu>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: NetBeans 5.5 + JBoss + PowerBuilder EJB client
Lines: 57
Organization: Sybase Products Hungary Kft.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: 195.56.169.86
X-Original-NNTP-Posting-Host: 195.56.169.86
Message-ID: <47285628@forums-1-dub>
Date: 31 Oct 2007 02:17:12 -0700
X-Trace: forums-1-dub 1193825832 195.56.169.86 (31 Oct 2007 02:17:12 -0700)
X-Original-Trace: 31 Oct 2007 02:17:12 -0700, 195.56.169.86
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:774
Article PK: 424873

Hello,

I'm trying to write a simple test EJB in NetBeans, deploy into JBoss 4.0.4
and invoke a method from PB.

Everything works fine, in PB I created the EJB proxy, a JavaVM, an
EJBConnection, but when I use the EJBConnection's Lookup method, it gives
back the TestSessionRemote Java interface, which contains no methods.
NetBeans put my test 'multiply' method into the TestSessionRemoteBusiness
interface. Anybody has any experience what's wrong?

When I generated the proxy, I used TestSessionRemote for remote interface
and TestSessionRemoteHome for home interface. Also tried using
TestSessionRemoteBusiness for remote interface but nothing happened.

Here is the code which invokes the multiply method of EJB:

-----------------------------------------

EJBConnection lnvo_ejb_conn
TestSessionRemote lnvo_TestSessionRemote
TestSessionRemoteHome lnvo_TestSessionRemoteHome

String ls_properties[ ]
String ls_msg
Int li_number

// connecting to application server
ls_properties[1] =
"javax.naming.Context.INITIAL_CONTEXT_FACTORY=org.jnp.interfaces.NamingContextFactory"
ls_properties[2] =
"javax.naming.Context.URL_PKG_PREFIXES=jboss.naming:org.jnp.interfaces"
ls_properties[3] = "javax.naming.Context.PROVIDER_URL=jnp://localhost:1099/"
Try
lnvo_ejb_conn = Create EJBConnection
lnvo_ejb_conn.connectToServer(ls_properties)
Catch (Exception ex)
MessageBox("EJB connect error", ex.GetMessage())
End Try

// invoke
Try
lnvo_TestSessionRemoteHome = lnvo_ejb_conn.Lookup("TestSessionRemoteHome",
"TestSessionBean", "hu.sybase.TestSessionRemoteHome")
lnvo_TestSessionRemote = lnvo_TestSessionRemoteHome.create( )
//li_number = lnvo_TestSessionRemote.multiply( 2, 10 )
Catch (Exception ex2)
messagebox("EJB invoke error", ex2.GetMessage())
End Try

-----------------------------------------

Thanks,

Peter Michaleczky


solar Posted on 2008-08-26 09:08:13.0Z
Reply-To: "solar" <hui.xie@axisoft.com>
From: "solar" <hui.xie@axisoft.com>
Newsgroups: sybase.public.powerbuilder.ejbclient
References: <47285628@forums-1-dub>
Subject: Re: NetBeans 5.5 + JBoss + PowerBuilder EJB client
Lines: 65
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48b3c7fd$1@forums-1-dub>
Date: 26 Aug 2008 02:08:13 -0700
X-Trace: forums-1-dub 1219741693 10.22.241.152 (26 Aug 2008 02:08:13 -0700)
X-Original-Trace: 26 Aug 2008 02:08:13 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:793
Article PK: 424888

Hi,

how do you generate the proxy objects? using PB wizard?

"Peter Michaleczky" <michaleczky.peter@sybase.hu> wrote in message
news:47285628@forums-1-dub...
> Hello,
>
> I'm trying to write a simple test EJB in NetBeans, deploy into JBoss 4.0.4
> and invoke a method from PB.
>
> Everything works fine, in PB I created the EJB proxy, a JavaVM, an
> EJBConnection, but when I use the EJBConnection's Lookup method, it gives
> back the TestSessionRemote Java interface, which contains no methods.
> NetBeans put my test 'multiply' method into the TestSessionRemoteBusiness
> interface. Anybody has any experience what's wrong?
>
> When I generated the proxy, I used TestSessionRemote for remote interface
> and TestSessionRemoteHome for home interface. Also tried using
> TestSessionRemoteBusiness for remote interface but nothing happened.
>
> Here is the code which invokes the multiply method of EJB:
>
> -----------------------------------------
>
> EJBConnection lnvo_ejb_conn
> TestSessionRemote lnvo_TestSessionRemote
> TestSessionRemoteHome lnvo_TestSessionRemoteHome
>
> String ls_properties[ ]
> String ls_msg
> Int li_number
>
> // connecting to application server
> ls_properties[1] =
> "javax.naming.Context.INITIAL_CONTEXT_FACTORY=org.jnp.interfaces.NamingContextFactory"
> ls_properties[2] =
> "javax.naming.Context.URL_PKG_PREFIXES=jboss.naming:org.jnp.interfaces"
> ls_properties[3] =
> "javax.naming.Context.PROVIDER_URL=jnp://localhost:1099/"
> Try
> lnvo_ejb_conn = Create EJBConnection
> lnvo_ejb_conn.connectToServer(ls_properties)
> Catch (Exception ex)
> MessageBox("EJB connect error", ex.GetMessage())
> End Try
>
> // invoke
> Try
> lnvo_TestSessionRemoteHome = lnvo_ejb_conn.Lookup("TestSessionRemoteHome",
> "TestSessionBean", "hu.sybase.TestSessionRemoteHome")
> lnvo_TestSessionRemote = lnvo_TestSessionRemoteHome.create( )
> //li_number = lnvo_TestSessionRemote.multiply( 2, 10 )
> Catch (Exception ex2)
> messagebox("EJB invoke error", ex2.GetMessage())
> End Try
>
> -----------------------------------------
>
> Thanks,
>
> Peter Michaleczky
>