This works on Tapestry 5.3 or higher. Has been tested with Glassfish 3.1.
Code excerpts are from Flow Logix Tapestry Library
@Contribute(ComponentClassTransformWorker2.class) @Primary public static void provideClassTransformWorkers(OrderedConfiguration<ComponentClassTransformWorker2> configuration) { configuration.addInstance("EJB", EJBAnnotationWorker.class, "before:Property"); } |
(add this to one of your non-tapestry packages)
class SomeTapestryPage { private @EJB MyStatelessBeanLocal localBean; } |
class SomeTapestryPage { private @EJB @Stateful MyStatefulBeanLocal statefulBean; // stored as SessionState object private @EJB @Stateful(isSessionAttribute = true) MyStatefulBeanLocal statefulBean2; // stored as SessionAttribute object } |