• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NameNotFoundException for EJB

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:




 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic