Hi Adam, Sorry, for (very)late response. Got tied up with some other tasks and forgot all about it...
It's not like I'm in love with Spring. In fact at this point the main reason(s) I have for still using it is for it's transaction management. And as our apps run in a servlet container(tomcat) I've not really considered ejb's as an alternative. Your comment about ejb's got me interested and I started doing some research. Turns out JEE 6 Web Profile looks pretty interesting (with glassfish). We mostly use spring for dependency injection and transaction management. As an experiment I replaced all spring annotations with 'jee' ones. * @Autowired->@Inject * @Component->@Named * @Transactional->@TransactionAttribute Spring happily uses the annotations as long as the're on the classpath. Then I refactored our spring java configuration to a separate module and did all wiring from there. This is now a drop in module. In a jee 6 server I would exclude the spring module and everything will be wired up by CDI. For me this is quite interesting and means I now have zero dependencies on spring in our app modules. All business code uses standard jee/jsr's, but spring is still used under the hood. I could stop here, but what if I wanted to take the final step and move to a jee 6 compliant server. How would I make that play with Tapestry? *=Server=* * Use a JEE 6 Web Profile compliant server (like Glassfish). * Does anyone have experience with development? Does Tapestry live reload work? *=Injecting beans from CDI=* Following this path my beans and ejb's are now managed by CDI(Weld). How would I get access to these beans in Tapestry? I've seen long discussions on the list about tapestry and jsr 299 and 330. Believe Igor has committed something for 330. Don't know if there are any plans for jsr 299 though (as portable extension?). Sorry - this turned out quite lengthy, but to summarize: How do you use tapestry in a jee server with cdi? (Or even just cdi) cheers Magnus On Sat, Apr 2, 2011 at 3:44 PM, Adam Zimowski <zimowsk...@gmail.com> wrote: > > I need spring [...] for things like jpa support and transactions and > other things ... > > I guess you're not an EJB fan :-) You don't need spring. In fact, our > Ecom app runs on pure Tapestry+TapIOC (plus Apache commons lang) with > EJB3 in the middle tier doing all the heavy lifting you're talking > about (Transactions, Hibernate/JPA, Endeca, PeopleSoft, and much more) > > We used to heavily rely on Spring in the previous Struts-based version > of our app, but since we've moved to Tapestry, we kissed Spring good > bye and nobody misses it here :) > > Adam > > On Fri, Apr 1, 2011 at 5:35 PM, Magnus Kvalheim <mag...@kvalheim.dk> > wrote: > > Hi thanks for your reply, > > > > Looking back on my original mail I now realize I've been unclear... > > > > To clarify: What I do want to achieve is to > > + Not rely on xml for configuration > > + Inject spring beans into tapestry > > (+) Injecting tapestry services into spring is desired > > > > Your suggestion would probably work, but it's not what I want as I's like > to > > use the @Inject for spring beans. > > Sorry for the confusion... > > > > > > On another note... > > > > Tapestry IOC is much more desirable than spring in many ways. > > I need spring (at least I believe I do) for things like jpa support and > > transactions and other things, but the bootstrapping in tapestry of > modules, > > contributions, decoration.++ is something I would like to get into 'core' > > and not just 'web'. > > > > Why is it that the tapestry module is only for web - can't it > > be re-factored/reconfigured so that it can be more closely integrated > with > > spring applications... > > > > I'd love to fully embrace tapestry IOC for my core infrastructure, but > cant > > see how I'd get the same functionality - especially in terms of > transaction > > management (I'd like to hear from those who have made the transition, and > > how they did it). > > Is it's possible(I believe it is) to make an enhanced tapestry-spring > module > > which is not only for web, but can integrate tighter with spring - I > think > > it would be a great win. > > (Probably there is way to implement tapestry ioc contributions, advisors > > etc.. for spring beans as well...) > > > > I'd like to hear some feedback to check if I'm completely off base here - > or > > if it's indeed a good idea... > > I know I'd rather configure spring from tapestry ioc if I could... > > > > Thoughts? > > > > cheers > > Magnus > > > > > > On Fri, Apr 1, 2011 at 5:13 PM, 3kkkdang <cvcv2...@hotmail.com> wrote: > > > >> I will do this: > >> extends TapestrFilter, in its constructor use > WebApplicationContextUtils > >> to > >> get spring context and set this context as ASO static property. finally > in > >> tapestry page class, get spring context through ASO. > >> > >> never got chance to try this, it might work. any comments? > >> > >> -- > >> View this message in context: > >> > http://tapestry.1045711.n5.nabble.com/Java-based-spring-configuration-tp3394086p4275778.html > >> Sent from the Tapestry - User mailing list archive at Nabble.com. > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > >> For additional commands, e-mail: users-h...@tapestry.apache.org > >> > >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >