Hi,
Anyway if you take the workaround it means that you'll be handling the
scope by yourself

Ajith

On 6/21/06, Deepal Jayasinghe <[EMAIL PROTECTED]> wrote:
Axis2 current implementation only support default constructor case , and
you have a workaround;
- You have to write your own message receiver and use that as your
message receiver for your service
- And once the message receiver get the request or when it create
service impl class , you can create that the way you want.

N:B :- writing message receivers is not a big deal , so you can easily
achieve your goal by writing a custom message receiver

sol myr wrote:

> Hi,
>
> Is there a way to instantiate Service classes through a factory,
> rather than the 'no arg' 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 :)
>
>
> ------------------------------------------------------------------------
> Yahoo! Messenger with Voice. Make PC-to-Phone Calls
> 
<http://us.rd.yahoo.com/mail_us/taglines/postman1/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com>
> to the US (and 30+ countries) for 2ยข/min or less.


--
Thanks,
Deepal
................................................................
~Future is Open~




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Ajith Ranabahu

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to