Topic
  • 1 reply
  • Latest Post - ‏2008-10-21T11:36:34Z by SystemAdmin
SystemAdmin
SystemAdmin
2768 Posts

Pinned topic PolyMorphic generic servcies shared between EARs ?

‏2008-10-13T14:10:53Z |
I am using a generic service that is used many time by different EAR files.

To be efficient so I dont have to code it for slightly different instances can I deploy it and call it polymorphically from several EAR files?

I am not very familiar with WebSphere so please help me if you can.

The front end is Portal via Spring on WebSphere.

Thanks

Derek Penning
Updated on 2008-10-21T11:36:34Z at 2008-10-21T11:36:34Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    2768 Posts

    Re: PolyMorphic generic servcies shared between EARs ?

    ‏2008-10-21T11:36:34Z  
    I'm not sure how you are using "polymorphically" in this case. The base answer is yes, but you'll still have to code for operational differences. For individual calls, you will also have to know the object type to get the expected response. Traditional polymorphism is based on an ancestor class, with descendents overriding methods as appropriate. For example, with Employee as the base class, Salaried and Hourly would respond differently to a calculatePayment() method.

    Overloading methods is not classic polymorphism, but some consider it close, because the response is different for the same method call but with different signatures.

    If that doesn't address your question properly, feel free to expand.