I'm beginning to think I'm making this harder than it needs to be. At the risk of playing the fool who couldn't figure out his homework, I will attempt to explain how I want to use Guice within JBoss and perhaps some merciful soul can point out my ignorance kindly. =)
I'll use an extremely simple music database as an example. (There is no web front end to this - it's simply acting as a SOAP WS server for now.) Annotations on my MusicWebService and Impl create my wsdl. Let's say my MusicWebService has a "getSongsByArtist(String artistName)" method. Then the flow through my app would be something like: MusicWebServiceImpl.getSongsByArtist -> SongServiceImpl.getSongsByArtist -> SongDaoImpl.getSongsByArtist The Dao returns a list of Song objects up to the service, which returns them up to the Web Service, which then converts them into DTO's and sends them back to whoever called it. Where Guice comes in: * The MusicWebServiceImpl needs a songService (so my module would have something like bind(SongService.class).to(SongServiceImpl); ) * The SongServiceImpl needs a songDao. How do I use Guice to inject these? I will use Guice's AOP features to set transaction boundaries as well (will be using hibernate), but first things first. =) My project will pretty much consist of a whole lot of doing that. There will be times my service will also contact another server via WSs, which I will be using a Guice @Provides to provide the class acting as client to the other WS server... but that's probably beside the point right now. So... there's my ignorance in all its glory. Any tips on the right way to proceed? Was I on the right path? Or are there any recommendations for something specific that I should research? Thanks! -- You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-guice?hl=en.
