|
INTERVIEW QUESTIONS
J2EE
EJB
DETAILS
Question: What is the importance of the Narrow class in RMI?
Answer: Since client never talk to bean directly ,client get reference to component interface (EJBObject) by calling create() method on home interface
Client use JNDI to get reference to home interface, for that it first gets the InitialContext
Context ic=new InitialContext(); Object 0=ic.lookup("String");
Client use initial context to lookup bean home, but home stub returned from JNDI lookup might not implement the home interface, To get the stub that is castable to home interface you have to narrow() the object you get from JNDI lookup , so to cast the object we get from JNDI lookup we use narrow() method.
|
|
|
Category |
EJB Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 9523 users |
Added on |
7/14/2011 |
Views |
71812 |
Rate it! |
|
|
Question:
What is the importance of the Narrow class in RMI?
Answer:
Since client never talk to bean directly ,client get reference to component interface (EJBObject) by calling create() method on home interface
Client use JNDI to get reference to home interface, for that it first gets the InitialContext
Context ic=new InitialContext(); Object 0=ic.lookup("String");
Client use initial context to lookup bean home, but home stub returned from JNDI lookup might not implement the home interface, To get the stub that is castable to home interface you have to narrow() the object you get from JNDI lookup , so to cast the object we get from JNDI lookup we use narrow() method. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What is the diff between interface and abstract class?
|
View Answer
|
|
When should we use session bean/entity bean?I was unable to judge?For Example :For Airline Project where we can use EJB's? How can we differentiate the stateful and stateless session beans?
|
View Answer
|
|
What is return type of create method of an entity bean
|
View Answer
|
|
What is default state of session bean in a ejbjar.xml
|
View Answer
|
|
Can we deploy two ejbs with same JNDI name in separate ears
|
View Answer
|
|
How EjbQL ara impemented when it is necessary?
|
View Answer
|
|
How to configure the jdbc driver in welogic server? What are all the necessary jar files to be used?
|
View Answer
|
|
How do J2EE application servers in general and the Weblogic servers in particular help software development?
|
View Answer
|
|
How to achieve clustering and connection pooling in ejb
|
View Answer
|
|
Where is JNDI located (In client or server). If its server, how a client can get the information about which EJB is registered in JNDI ?. How EJB will be registered in JNDI.
|
View Answer
|
|
What is ejbdoc? difference between connector,server,container?
|
View Answer
|
|
What is session synchronization in EJB
|
View Answer
|
|
What is the default transaction attribute in transactions
|
View Answer
|
|
What kind of bean(entity/session) will you use if there are no database transactions and all you use is a read-only database.
|
View Answer
|
|
What is the use of activate, passivate methods in EJB?
|
View Answer
|
|
What are the file used in hibernate?
|
View Answer
|
|
What is the difference synchronized block and normal block?
|
View Answer
|
|
Which deployment descriptor used in struts?
|
View Answer
|
|
What is parent class of Hashtable?
|
View Answer
|
|
How we deploy in weblogic?
|
View Answer
|