|
From: Venkatesh S. <Ven...@lc...> - 2004-09-02 13:32:20
|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Please read the disclaimer at the bottom of this e-mail. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ We have virtually the same sort of setup as detailed by Eric and it seems t= o work fine. Anyone has any other experience.. ??? -----Original Message----- From: wra...@li... [mailto:wra...@li...]On Behalf Of EXT-Smith, Eric M Sent: 02 September 2004 13:23 To: wra...@li... Subject: [Wrapper-user] RE: Integration methods; something different? Andrew, >> The alternative is to create an interface that all my service classes >> must implement, so that a generic WrapperListener implementor can=20 >> provide a controlled startup and shutdown. This can be implemented >> using the current API, but does not seem as flexible. On the contrary, IMHO this is an extremely flexible way to do what you are asking. Consider this... The interface between the platform (e.g.: Windows) and your service only provides for a few simple actions. Generally these are Start/Stop, Pause/Resume and Install/Uninstall. If you have a single class that implements these interfaces (for the platform) and calls a corresponding class in your service to provide these actions, then you have effectively created a single service launcher that can, by using a specialized .conf file, operate for all of your services. >>=20 >> What I want to avoid is having to create a WrapperListener implementation >> for each service class I create. Not having to use reflection would also be nice... If you implement a single WrapperListener that calls into an implemented interface in your service, and you provide the details for this interaction in your .conf file (in my implementation it is a single parameter to my service class), then the reflection is performed only once for your service. And it is performed only when the service initializes itself. I put together a simple WrapperListener in about 100 lines (including javadocs) that does this for all of our services. This let me build my services as follows: +- - - - - - - - - - - - - - - + | +-----+ +-----------------+ | +------------------+ +----------------+ | JSW |<>| WrapperListener |<->| ServiceInterface |<->| Standalone App | | +-----+ +-----------------+ | +------------------+ +----------------+ +- - - - - - - - - - - - - - - + Now I can take my service wrapper, implement my ServiceInterface with the commands necessary to operate my application, and I can take any app that I have and run it either as a standalone application, or as a service. All of this by implementing one interface, distributing it in its own jar, adding a parameter in my .conf file, and if necessary an installation program (InstallAnywhere/InstallShield/MSI/etc...). This has allowed my team to put together multiple services for license services, file services, logging services, etc... without each developer requiring specific knowledge of service development or configuration. They only need to know ServiceInterface and how their application works. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Eric M. Smith Harpoon Technologies Office : (314) 233-4204 ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idP47&alloc_id=10808&op=3Dick _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user ********************************************************************** This email is intended for the named recipient(s) only. Its contents are confidential and may only be retained by the named recipient(s) and may only be copied or disclosed with the consent of=20 LCH.Clearnet Limited. If you are not an intended recipient please delete this e-mail and notify pos...@lc.... The contents of this email are subject to contract in all cases,=20 and LCH.Clearnet Limited makes no contractual commitment save where confirmed by hard copy. LCH.Clearnet Limited accepts no liability,=20 including liability for negligence, in respect of any statement in=20 this email. LCH.Clearnet Limited, Registered Office: Aldgate House,=20 33 Aldgate High Street, London EC3N 1EA. Recognised as a Clearing=20 House under the Financial Services & Markets Act 2000. Reg in England No.25= 932=20 Telephone: +44 20 7426 7000 Internet: http://www.lchclearnet.c= om ********************************************************************** |