• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

what is metadata interface?

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is metadata interface? how it is useful.
 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EJBMetaData

The EJBMetaData interface allows a client to obtain the enterprise Bean's meta-data information.

I found the following additional information in some forum:

Question: Still, I don't understand what is the ejbMetaData purpose. Why I can't do it in such way?

Context ctx = getInitialContext();
EJBHome home = (EJBHome) ctx.lookup(...);
Class interface = home.getClass();

Answer:
The reason that you cannot perform a lookup on the home interface
and then use reflection on that is as follows... When you get the Class
from the interface (using getClass), this will actually return the Class
of the Home interface STUB not the home interface itself. Therefore any
attempt to retrieve Methods as they are named in the interface will
throw an exception. To do this properly you must get the interface Class
from the ejbMetaData, introspect this to get the relevant methods, then
invoke them on the remote object reference to the EJB.
reply
    Bookmark Topic Watch Topic
  • New Topic