I think inner class is a better alternative in this case. But for example think I exposed TenantProcessStoreImpl as a OSGi service and I exposed this as a instance of Axis2ConfigurationContextObserver. Is there any security risk in that or we are avoiding this as only a way of reducing risks which will cause by mistakenly exposing unwanted stuff of the implementation.
Thanks Milinda On Mon, Aug 16, 2010 at 10:56 AM, Afkham Azeez <[email protected]> wrote: > In this case, it may be better to use another classes, perhaps an inner > class or anonymous inner class. Inheritance is often abused. You are going > to register your TenantProcessStoreImpl as an OSGi service. It is better > for you to not expose the entire TenantProcessStoreImpl as an OSGi service, > and only expose a class that implements > Axis2ConfigurationContextObserver. > > Thanks > Azeez > > > On Mon, Aug 16, 2010 at 7:33 AM, Milinda Pathirage <[email protected]>wrote: > >> In this case TenantProcessStoreImpl listen to configuration context >> events(termination) and do the necessary operations to bring back/remove >> process configuration into/from the memory. Why do you think that Tenant's >> process store can't listen to Configuration Context events(termination) if >> tenant's process store is managing process configurations of that tenant? >> Please feel free to suggest if there is a better alternative. >> >> Thanks >> Milinda >> >> On Sun, Aug 15, 2010 at 8:21 PM, Afkham Azeez <[email protected]> wrote: >> >>> I came across the following code. >>> >>> *public class TenantProcessStoreImpl implements >>> TenantProcessStore, ConfigurationContextTerminationListener* >>> >>> Is there an is-a relationship between TenantProcessStoreImpl >>> and ConfigurationContextTerminationListener? We should not simply extend >>> classes or implement interfaces just because we need some behavior in a >>> class. Like I mentioned during the last code review session, we need to >>> think twice before naming classes, methods, attributes etc. etc. including >>> extending classes or implementing interfaces. We cannot afford to forget or >>> ignore what we learnt in the "Software Engineering 101" classes! >>> >>> Anyway, I have removed the ConfigurationContextTerminationListener >>> interface and am using the Axis2ConfigurationContextObserver. So, I'm >>> removing the "implements ConfigurationContextTerminationListener" from this >>> class since there interface methods have been removed. Please provide an >>> implementation of Axis2ConfigurationContextObserver. >>> >>> >>> Thanks >>> -- >>> Afkham Azeez >>> Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com, >>> Lean . Enterprise . Middleware >>> Member; Apache Software Foundation; http://www.apache.org/ >>> email: [email protected] cell: +94 77 3320919 >>> blog: http://blog.afkham.org >>> twitter: http://twitter.com/afkham_azeez >>> linked-in: http://lk.linkedin.com/in/afkhamazeez >>> >>> _______________________________________________ >>> Carbon-dev mailing list >>> [email protected] >>> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>> >>> >> >> >> -- >> Milinda Pathirage >> Technical Lead and Product Manager, Business Process Server - WSO2 Inc; >> http://wso2.com >> Blog: http://blog.mpathirage.com >> >> Lean Enterprise Middleware >> >> _______________________________________________ >> Carbon-dev mailing list >> [email protected] >> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev >> >> > > > -- > Afkham Azeez > Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com, > Lean . Enterprise . Middleware > Member; Apache Software Foundation; http://www.apache.org/ > email: [email protected] cell: +94 77 3320919 > blog: http://blog.afkham.org > twitter: http://twitter.com/afkham_azeez > linked-in: http://lk.linkedin.com/in/afkhamazeez > > _______________________________________________ > Carbon-dev mailing list > [email protected] > https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev > > -- Milinda Pathirage Technical Lead and Product Manager, Business Process Server - WSO2 Inc; http://wso2.com Blog: http://blog.mpathirage.com Lean Enterprise Middleware
_______________________________________________ Carbon-dev mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
