• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

suggest Design Method

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a class productService and interface IProductService in a jar file.

there are 2 web applications which uses productservice.

One of the web application must get diff implementation of a method in product service and other web application neeeds a diff implemetation of same method.

Please suggest a good design......
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Assuming that by "2 web applications" you mean 2 .war files, you can drop the required ProductService implementations in respective WEB-INF folders - either in lib or classes - of each .war. If that is done, then I think these web applications will be able to use whatever implementation available to them. I think this might work because each .war will use it's own classloader. And if you want to share the interface between these two web applications, you could add META-INF alongwith Manifest file and point to a common location which holds the interface. You can try this and let us know.

-Milind
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What exactly is your doubt?
 
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can have several implementations. I don't know what you are expecting about good design. Could you please to elaborate?
 
reply
    Bookmark Topic Watch Topic
  • New Topic