ComponentClassTransformWorker is supposed to transform only component (and page) classes. The ijection mechanism can be extended in two ways: - by contributing a org.apache.tapestry5.ioc.ObjectProvider - by contributing a org.apache.tapestry5.services.InjectionProvider
A InjectionProvider can transform classes but it is a part of tapestry-core. A ObjectProvider is a part of tapestry-ioc but it can not transform classes. What if you inject the service org.apache.tapestry5.ioc.services.ClassFactory in one of your services? On Sat, Jul 25, 2009 at 5:06 PM, Adriaan Joubert <adriaan...@gmail.com>wrote: > Hi, > > we have a large application that has a fat client interface as well as > a tapestry 5 web front end. > > Tapestry 5 IOC is marvelous and we would like to use it in our client > application. Using tapestry standalone turns out to be easy, however I > have two related issues: > > 1. I'd love to use @Inject in our code > 2. We have our own @Delegate annotation to generate a bunch of > delegate methods for a field (this is for use with the jgoodies > binding framework when extending beans with additional functionality) > > Currently we have our own classloader that uses javassist to modify > the classes and I implemented a javassist Translator to do the donkey > work. > > Digging through Tapestry I found > contributeComponentClassTransformWorker(), so this seems like a good > mechanism to add a transform to deal with our @Delegate annotation. > Unfortunately this is the point where I got lost. > > I cannot add this into the standalone application IOC AppModule, as it > uses a bunch of tapestry classes that are not in the IOC package, > specifically InjectWorker. So do I need to roll my own for use in a > standalone application? > > As far as I can make out these annotations are only processed in > classes loaded through the IOC registry? As I would like to modify > classes that are not loaded through the registry I would need to do > this through the class loader. Sounds as if this could cause problems > when running with Tapestry? > > I'd appreciate any comments or suggestions on how to proceed. > > Thanks! > > Adriaan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Best regards, Igor Drobiazko