• 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:

j2ee newbie question about context and lookup

 
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok
My problem goes deepr than what i suggest at first.
I post another mesage in sun apps section but now my problem goes general :
I have some question about context , jndi ...

1- what does "java:comp/env/" means ?
should i put the last forward slash ?
2- how i should use context and initial context etc.. ?
here is my situation :
I defined two jms resource from the admin console of Sun Apps 8.1: one factory with exact jndi name of : jms/QueueFactory
and one queue with exact name of : jms/dest/queueDestination
Now i tried to access them but i simply can not
it trows exception : javax.naming.NameNotFoundException: No object bound for java:comp/env/jms/QueueFactory
i tried and removed java:comp/env/ from my lookup string with no luck
can some one help me and tell me that :
1-when does that java:comp/env/ is required ?
2-is my following code true ? i write them in netbeans.




I think that my poblem is about the class name for initial_Context_name and provider_url
also with the lookup String.
sorry if it goes too long
 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Aha i made some changes and it works but now it gives another very long exception
the change which i made is i made a typo in QueuesFactory and put an space in its end


and the long long exception is :

I add all jars from lib folder of Application server to my project but still no luck
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic