• 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

how application client knows about bean?

 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please follow this link: http://java.sun.com/javaee/5/docs/tutorial/doc/bnbnj.html

Look at the code of application client that access the bean.

Note: Application clients are the clients which are not deployed in same JVM.



Above code (annotation) specify that this client is for "Converter bean" (ConverterBean bean and Converter interface).

My confusion is, how does JVM know about this Converter??? Where it is deployed???

Thanks.
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is the black magic of EJB 3...

In fact during deployment of the EJB and the client, the container replaces the annotation by a jndi lookup using the name of the instance variable to locate an EJB... If no EJB is found you will have a NullPointerException using the instance variable.
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Francois-Xavier Douxchamps:
That is the black magic of EJB 3...

In fact during deployment of the EJB and the client, the container replaces the annotation by a jndi lookup using the name of the instance variable to locate an EJB... If no EJB is found you will have a NullPointerException using the instance variable.



But where does container will look up???
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The container is looking for it as a JNDI addressable resource with the given name.

-Cameron McKenzie
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic