How does EJB support polymorphism?
Submitted by: AdministratorPosted in EJB Interview Questions, HR Interview Questions
Because an EJB consists of multiple “parts”, inheritance is achievable in a rather limited fashion (see FAQ answer on inheritance here). There have been noteworthy suggestions on using multiple inheritance of the remote interface to achieve polymorphism, but the problem of how to share method signatures across whole EJBs remains to be addressed. The following is one solution to achieving polymorphism with Session Beans. It has been tried and tested on Web Logic Apps Server 4.50 with no problems so far.
We will use an example to show how it's done. Say, there are 2 session beans, Tiger and Lion that share some method signatures but provide different implementations of the methods.
• Animal Home and Animal are the home and remote interfaces. The signatures of the polymorphic methods are in Animal.
• Animal Bean is the base implementation bean.
• Tiger Bean and Lion Bean extend from Animal Bean. They may override the methods of Animal Bean, implementing different behaviors.
Submitted by: Administrator
Because an EJB consists of multiple “parts”, inheritance is achievable in a rather limited fashion (see FAQ answer on inheritance here). There have been noteworthy suggestions on using multiple inheritance of the remote interface to achieve polymorphism, but the problem of how to share method signatures across whole EJBs remains to be addressed. The following is one solution to achieving polymorphism with Session Beans. It has been tried and tested on Web Logic Apps Server 4.50 with no problems so far.
We will use an example to show how it's done. Say, there are 2 session beans, Tiger and Lion that share some method signatures but provide different implementations of the methods.
• Animal Home and Animal are the home and remote interfaces. The signatures of the polymorphic methods are in Animal.
• Animal Bean is the base implementation bean.
• Tiger Bean and Lion Bean extend from Animal Bean. They may override the methods of Animal Bean, implementing different behaviors.
Submitted by: Administrator
Read Online Human Resource (HR) Job Interview Questions And Answers
Top Human Resource (HR) Questions
☺ | What appeals to you about this job? |
☺ | What was the toughest decision you ever had to make? |
☺ | What do you find most attractive about this position? What seems least attractive about it? |
☺ | What has prompted you to apply for this position? |
☺ | What was the toughest challenge you have ever faced? |
Top Best Management Categories
☺ | Store Keeper Interview Questions. |
☺ | Administrative Officer Interview Questions. |
☺ | Good Team Leader Interview Questions. |
☺ | Hotel Management Interview Questions. |
☺ | Project Coordinator Interview Questions. |