Hi Tapestry Users, I quickly knock up a prototype using tapestry-hibernate and have recently injected tapestry services into page classes. The page class therefore doesn't have to change when shifting to JEE env.
I'm moving it now to glassfish and replaced my hibernate queries with simple @EJB stuff - I lay out my project like jumpstart's use of @EJB. Is there a limitation to how/where to use @EJB? All my tapestry services and their implementation are in the services package - is this one of those special packages I should move my services out of? The @EJB works in page classes, but when I want to access my business layers through a tapestry service, it fails with a null pointer. I had another project earlier in the year where accessing through a tapestry service was no problem, but it was not in the .services package. Any pointers would be great, I really don't want to do a bunch of refactoring - hence my workflow :) Cheers Chris Samples here: AppModule.java has @Primary public static void contributeComponentClassTransformWorker( OrderedConfiguration<ComponentClassTransformWorker2> configuration) { configuration.addInstance("EJB", EJBAnnotationWorker.class, "before:Property"); } A tapestry service implementation with hibernate queries that worked in prototype stage to save an entity. @Override public void save(Port savePort) { session.beginTransaction(); session.save(savePort); session.getTransaction().commit(); } And the same function trying to use an @EJB annotated EJBService: @Override public void save(Port savePort) { portEJBService.create(savePort); }