• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

JNDI lookup from Applet

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Friends,
I am working on an application that requires me to post some data from an applet to the database. The architecture of system doesn't allow me to access the database directly, and only through ejb's. Thereby requiring me to call some ejb from the applet.
Can i make that lookup from applet context? This is very much possible that my client and/or server are behind some firewall.
plz. suggest some way out ...
thanks in advance
regards
raghav..
 
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As per the Blue prints, applets cannot access the database directly. Hence the work around is to use EJB to access a db.
 
Raghvendra Sharma
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Madhu,
Thanks for your reply, but what wanted to know was that if only i could go for a JNDI lookup from within an applet.
 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah u can do that......
 
Raghvendra Sharma
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Sanjay,
Thanks for reply.
I was told by someone in my project's architecture team that the applet might not allow the jndi lookups since it is out of the server context.
I didn't fully understood his views but just conveyed my thoughts to javaranch as a question. Would you plz be kind enough to help me get some more information on this topic. some material with you, or with some other site etc.
Links would do fine.
thanks again,
regards
raghav..
 
sandy gupta
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First Things first.
DID U CALL ME SANJAY......I AM NOT SANJAY SIR.....MY NAME IS SAHIL..............
Ok and bout who ever told u that applets cannot use the JNDI was only partially correct coz applets can and cannot. See the basic reason why an applet cannot use JNDI is because applets have a security restriction in that they cannot use the applications that use the native code....and JNDI more often than not does(e.g the WINDOWS REGISTRY)........i guess this is what the guy who told u said...........but the part that he forgot to mention( or did not know) was that in case u have a trusted domain then by using Weblogic delegation, u can use JNDI in an applet being run on a secure client.
HTH
S A H I L
 
Raghvendra Sharma
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
S A H I L,
Sorry for misspelling your name.
Thanks for the description. Thanks a lot, i hope that gives me enough grounds for arguing with the architecture team of my project who were straight away asking me to change my approach towards the application.
By the way, i am building a test applet that has three threads
one of them shows the question and interacts with the user.
Second one fetches questions from the database and dumps them in some data structure.
third one goes to the database after every question and submits the response of the student to the database.
i was planning to use the jndi lookup etc from first and third threads.
what do you say, how is the flow, fine or bad.
suggest

regards
raghav..
 
reply
    Bookmark Topic Watch Topic
  • New Topic