• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Axis2 - could axis instantiate a Service through Factory, instead of Constructor ?

 
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm trying out the new Axis2, and was wondering:
Is there a way to ask axis2 to instantiate my Service class through a factory, rather than a constructor ?

I mean, usually the "services.xml" is something like:
- < service >
- < parameter name="ServiceClass" locked="false" > package.MyService
So the axis2 servlet instantiates the service by calling "new MyService()".

Unfortunately, my service has a private constructor (for a good reason), and can only be instantiated through
- MyFactory.createInstance()
So I'm looking for is something in the lines of :
- < parameter name="ServiceFactory" > package.MyFactory

Is there an easy way to achieve this ?

Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic