[Lift] Re: JEE stuff (JTA, JPA, AOP etc.)
Very cool. I'm sure there are some things that we can incorporate here. Derek On Sun, Apr 5, 2009 at 7:29 AM, Jonas Bonér jbo...@gmail.com wrote: Hi guys. I have thrown up the little JEE container framework that I wrote for my company last year. I have already written some about what we did on my blog. In short it has support for: - JPA - JPA Template, Genenic Repository etc. - JTA - EJB-style TX semantics: REQUIRED, REQUIRES_NEW, MANDATORY, NEVER, SUPPORTS. It hooks into Hibernate/JPA. Can make use of the AOP framework to allow decorating your methods with: import javax.ejb.{TransactionAttribute, TransactionAttributeType} trait Foo { @TransactionAttribute(TransactionAttributeType.REQUIRED) def foo(msg: String) } - AOP - A simple generic Interceptor/AOP framework. Uses either annotations or the AspectJ pointcut parser. See my blog for a detailed post: http://jonasboner.com/2008/12/09/real-world-scala-managing-cross-cutting-concerns-using-mixin-composition-and-aop.html (last half) - Caching - Annotate your methods with '@Cacheable' to have the cached in a performant way. - DI - We used the Cake Pattern, but used Guice at one point, should be easy to add that again if requested. See this article for details: http://jonasboner.com/2008/10/06/real-world-scala-dependency-injection-di.html You can find all code here: http://github.com/jboner/skalman/tree/master Here is the JTA stuff: http://github.com/jboner/skalman/blob/610ad8918111c56284640f04ff7dcce7c33d3e5b/core/src/main/scala/JTA.scala Please come with feedback if there is anything that would fit Lift. Especially the JTA stuff since that have been discussed to be added. Thanks. Jonas Bonér | Crisp AB http://jonasboner.com http://crisp.se --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: JEE stuff (JTA, JPA, AOP etc.)
Cool. Thanks. I'd need some feedback here, since I don't have much knowledge in what Lift needs and how it can be integrated. 2009/4/5 Derek Chen-Becker dchenbec...@gmail.com: Very cool. I'm sure there are some things that we can incorporate here. Derek On Sun, Apr 5, 2009 at 7:29 AM, Jonas Bonér jbo...@gmail.com wrote: Hi guys. I have thrown up the little JEE container framework that I wrote for my company last year. I have already written some about what we did on my blog. In short it has support for: - JPA - JPA Template, Genenic Repository etc. - JTA - EJB-style TX semantics: REQUIRED, REQUIRES_NEW, MANDATORY, NEVER, SUPPORTS. It hooks into Hibernate/JPA. Can make use of the AOP framework to allow decorating your methods with: import javax.ejb.{TransactionAttribute, TransactionAttributeType} trait Foo { �...@transactionattribute(TransactionAttributeType.REQUIRED) def foo(msg: String) } - AOP - A simple generic Interceptor/AOP framework. Uses either annotations or the AspectJ pointcut parser. See my blog for a detailed post: http://jonasboner.com/2008/12/09/real-world-scala-managing-cross-cutting-concerns-using-mixin-composition-and-aop.html (last half) - Caching - Annotate your methods with '@Cacheable' to have the cached in a performant way. - DI - We used the Cake Pattern, but used Guice at one point, should be easy to add that again if requested. See this article for details: http://jonasboner.com/2008/10/06/real-world-scala-dependency-injection-di.html You can find all code here: http://github.com/jboner/skalman/tree/master Here is the JTA stuff: http://github.com/jboner/skalman/blob/610ad8918111c56284640f04ff7dcce7c33d3e5b/core/src/main/scala/JTA.scala Please come with feedback if there is anything that would fit Lift. Especially the JTA stuff since that have been discussed to be added. Thanks. Jonas Bonér | Crisp AB http://jonasboner.com http://crisp.se -- Jonas Bonér | Crisp AB http://jonasboner.com http://crisp.se --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: JEE stuff (JTA, JPA, AOP etc.)
I think it would be nice to get the Transaction stuff easier to integrate. Perhaps a Transactional marker trait that could be applied to snippet or view classes: trait Transactional { def transactionalMap : PartialFunction[String,Boolean] = { case _ = true } } The transactionalMap def could be used to explicitly make particular snippet methods transactional or not. Just a rough idea. The bulk of the work in this case would be in LiftSession, I believe. Derek On Sun, Apr 5, 2009 at 12:55 PM, Jonas Bonér jbo...@gmail.com wrote: Cool. Thanks. I'd need some feedback here, since I don't have much knowledge in what Lift needs and how it can be integrated. 2009/4/5 Derek Chen-Becker dchenbec...@gmail.com: Very cool. I'm sure there are some things that we can incorporate here. Derek On Sun, Apr 5, 2009 at 7:29 AM, Jonas Bonér jbo...@gmail.com wrote: Hi guys. I have thrown up the little JEE container framework that I wrote for my company last year. I have already written some about what we did on my blog. In short it has support for: - JPA - JPA Template, Genenic Repository etc. - JTA - EJB-style TX semantics: REQUIRED, REQUIRES_NEW, MANDATORY, NEVER, SUPPORTS. It hooks into Hibernate/JPA. Can make use of the AOP framework to allow decorating your methods with: import javax.ejb.{TransactionAttribute, TransactionAttributeType} trait Foo { @TransactionAttribute(TransactionAttributeType.REQUIRED) def foo(msg: String) } - AOP - A simple generic Interceptor/AOP framework. Uses either annotations or the AspectJ pointcut parser. See my blog for a detailed post: http://jonasboner.com/2008/12/09/real-world-scala-managing-cross-cutting-concerns-using-mixin-composition-and-aop.html (last half) - Caching - Annotate your methods with '@Cacheable' to have the cached in a performant way. - DI - We used the Cake Pattern, but used Guice at one point, should be easy to add that again if requested. See this article for details: http://jonasboner.com/2008/10/06/real-world-scala-dependency-injection-di.html You can find all code here: http://github.com/jboner/skalman/tree/master Here is the JTA stuff: http://github.com/jboner/skalman/blob/610ad8918111c56284640f04ff7dcce7c33d3e5b/core/src/main/scala/JTA.scala Please come with feedback if there is anything that would fit Lift. Especially the JTA stuff since that have been discussed to be added. Thanks. Jonas Bonér | Crisp AB http://jonasboner.com http://crisp.se -- Jonas Bonér | Crisp AB http://jonasboner.com http://crisp.se --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---