On May 27, 2013, at 1002AM, Greg Trasuk wrote: > > On Mon, 2013-05-27 at 08:47, Peter Firmstone wrote: >> Well done Greg, hey I noticed you've got an annotation called Init, this >> would allow a service to be exported and have any threads started after >> construction wouldn't it? >> > > Eventually, yes. Right now, the annotations are part of a stripped-down > dependency-injection framework that sets up all the components that form > the container itself. (I did have reasons for not using an > off-the-shelf DI framework - see the AnnotatedClassDeployer source code > for them). For the record, yes, initialization is a separate operation > from construction. > > One of those components is one or more "deployers" that knows how to > interpret a given file and startup a service instance. As it stands, > I've written a deployer that executes services that are written to the > "com.sun.jini.start" conventions, like Reggie, Outrigger, etc. > Basically this is so that the container can host all the infrastructure > services if desired. > > Longer-term, I'd like to see a deployer that deploys services written to > a more developer-friendly convention (that we will need to develop). > One option for that would be to have a CDI-like framework, where you > would simply annotate a class with "@Service" or something similar, and > let the deployer take care of all the startup and publication details. > > Historically, my goal has been to make creating a Jini service as easy > as writing servlets. Nowadays, I think we have to aim for "as easy as > creating EJBs using CDI", which is arguably pretty easy.
Apologies for sounding like a broken record, but this was (is) a goal of Rio as well. All you need is a POJO (and if you like Spring integration thats available as well). Its really even simpler if you use the Rio Maven archetype, you get a project generated for you, with test code, and deployment configuration (http://www.rio-project.org/tutorial/service/service-intro.html). Would it be of interest to discuss how you may take advantage of whats out there? Regards Dennis