[wsf-c-dev] [C++] Exceptions in OMFactory
Senaka Fernando
senaka at wso2.com
Wed Nov 7 00:02:57 PST 2007
On Wed, 2007-11-07 at 12:45 +0530, Samisa Abeysinghe wrote:
> Senaka Fernando wrote:
> > On Wed, 2007-11-07 at 11:08 +0530, Samisa Abeysinghe wrote:
> >
> >> Senaka Fernando wrote:
> >>
> >>> On Wed, 2007-11-07 at 09:08 +0530, Samisa Abeysinghe wrote:
> >>>
> >>>
> >>>> Do we need to have a factory for this API?
> >>>>
> >>>>
> >>> Yes, we do, the reason is we need the env for C functions and we are not
> >>> exposing the reference to it. Thus, when we create OM classes the env is
> >>> set through the factory.
> >>>
> >>> The env of the factory is set from the Service Client.
> >>>
> >>>
> >> How come service client set the env of the factory? It does not make
> >> sense.
> >>
> >
> > Well, it is like the service client will own a OM Factory that can
> > create OM Classes.
> That does not sound like correct OO. Service client sends OM and
> receives OM. It has nothing to do with creating OM.
If that's the scenario, We'll have to omit the OM Factory. But, need to
know just one more thing. Who is responsible for allocating the env?
Isn't it the Service Client?
>
> > The service client is a friend of the OM Factory and
> > is the only person who can construct the factory.
> Use of friend is always discouraged. That violates encapsulation.
Yes, it does if the Service Client has nothing to do with the creating
of OM.
>
> Samisa...
>
More information about the Wsf-c-dev
mailing list