• Post Reply Bookmark Topic Watch Topic
  • New Topic

NameNotFoundException for EJB

 
Piter Smith
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been using glassfish appclient locally, by which I mean the same JVM on the same machine. It works fine for executing the client, which connects with CORBA, with syntax along the lines of "appclient -client foo.jar".

However, I cannot seem to get the exact same client code to lookup and execute an EJB remotely across the internet when I pass it different connection properties. I believe this is known as "remoting" or RMI?

I've gone through several PDF's from Oracle on Glassfish admin and running Glassfish. Presumably, I'm misunderstanding a configuration. Please note that the error is . Is there an EAR which I could try to obtain an InitialContext for which is either publicly available, or perhaps some could make available? Alternately, would someone be willing to try to remotely connect to an EAR which I make available?

I'm specifically interested in doing this from Glassfish.

successful run against EJB deployed on localhost:




same JAR, same EAR. The EAR deployed remotely:




client code, using jndi.properties for the connection parameters:




 
K. Tsang
Bartender
Posts: 3609
16
Firefox Browser Java Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure if this is correct. I think for remote JNDI, the lookup code should look like:

 
Piter Smith
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
K. Tsang wrote:I'm not sure if this is correct. I think for remote JNDI, the lookup code should look like:



I think you're right, but I can't quite get it to work right:



and then using gives:






see also:

https://github.com/THUFIR/EntAppClientJWS


and





the Enterprise Application and EJB module:

EntAppEJB
https://github.com/THUFIR/EntAppEJB


the CLI appclient:

EntAppClient
https://github.com/THUFIR/EntAppClient


the remote interface library:

EJBRemoteInterface
https://github.com/THUFIR/EJBRemoteInterface


the CORBA lookup:

EntAppLookup
https://github.com/THUFIR/EntAppLookup
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!