Lifted,

i gotta say this thread of activity is just so cool. It's what i always
dreamed open source would be like. The community essentially gets to access
and think with each others' best minds and act with each others' best
talents to arrive on a path to a better concrete realization of feature,
function and design. We all know, individually and collectively, just how
hard it is to make excellent software and know that we're more likely to
achieve that aim working together. i can't help but notice that there is no
explicit representation of the profit motive here. Each of us might
individually be in contact with some aspect of profit motive, but it does
not have an explicit representation in this little snippet of process. That
gives this entrepreneur pause for thought.

Best wishes,

--greg

On Tue, Jun 9, 2009 at 3:46 PM, David Pollak
<feeder.of.the.be...@gmail.com>wrote:

>
>
> On Tue, Jun 9, 2009 at 1:08 PM, Jonas Bonér <jbo...@gmail.com> wrote:
>
>>
>> Now I have deleted the lib dir with all jars and fixed the POM.
>
>
> Thanks!
>
>
>>
>>
>> 2009/6/9 Derek Chen-Becker <dchenbec...@gmail.com>:
>> > In my email above I have the link to the Maven artifacts for Atomikos:
>> >
>> > http://mvnrepository.com/artifact/com.atomikos
>> >
>> > I think that the dependency you want is:
>> >
>> > <dependency>
>> >     <groupId>com.atomikos</groupId>
>> >     <artifactId>transactions-jta</artifactId>
>> >     <version>3.2.3</version>
>> > </dependency>
>> >
>> > Derek
>> >
>> > On Tue, Jun 9, 2009 at 12:54 PM, Meredith Gregory <
>> lgreg.mered...@gmail.com>
>> > wrote:
>> >>
>> >> Jonas,
>> >>
>> >> Awesome! i look forward to digging into this stuff!
>> >>
>> >> Best wishes,
>> >>
>> >> --greg
>> >>
>> >> On Tue, Jun 9, 2009 at 6:18 AM, Jonas Bonér <jbo...@gmail.com> wrote:
>> >>>
>> >>> Hey guys.
>> >>>
>> >>> I have hacked together an early draft of the JTA transaction stuff.
>> >>>
>> >>> I have wrapped it up in a monad. Here  are some examples of usage:
>> >>>
>> >>>  for {
>> >>>   ctx <- TransactionContext.Required
>> >>>   entity <- updatedEntities
>> >>>   if !ctx.isRollbackOnly
>> >>>  } {
>> >>>   // transactional stuff
>> >>>   ctx.getEntityManager.merge(entity)
>> >>>  }
>> >>>
>> >>> val users = for {
>> >>>   ctx <- TransactionContext.Required
>> >>>   name <- userNames
>> >>>  } yield {
>> >>>   // transactional stuff
>> >>>   val query = ctx.getEntityManager.createNamedQuery("findUserByName")
>> >>>   query.setParameter("userName", name)
>> >>>   query.getSingleResult
>> >>>  }
>> >>>
>> >>> If you don't like the monadic approach you can just use the high-order
>> >>> functions:
>> >>>
>> >>> TransactionContext.withTxRequired {
>> >>>    ... // REQUIRED semantics
>> >>>
>> >>>  TransactionContext.withTxRequiresNew {
>> >>>    ... // REQUIRES_NEW semantics
>> >>>  }
>> >>> }
>> >>>
>> >>> I have implemented the same semantics as used in the EJB spec.
>> >>> Required, RequiresNew, Mandatory, Supports, Never. All these are
>> >>> monadic objects in the TransactionContext object.
>> >>> I don't have a webapp to try this out, so I would be happy to get all
>> >>> kinds of feedback, but API wise and bug reports or fixes.
>> >>>
>> >>> This API is hooked into Derek's Scala-JPA stuff. I had my own impl of
>> >>> this but replaced it with Derek's work.
>> >>>
>> >>> Derek,
>> >>> please go through the integration to see if I have done it correctly,
>> >>> and where things code be improved.
>> >>>
>> >>> All committers,
>> >>> feel free to hack and change this code anyway you want.
>> >>>
>> >>> The code is in a branch (wip-jta-jonas), you can find it here:
>> >>>
>> >>>
>> http://github.com/dpp/liftweb/tree/3783b9e2200cc57dd72baa1bd8cabdb1365ee923/lift-jta
>> >>>
>> >>> Check the ScalaDoc (or the source) for the documentation on usage,
>> >>> semantics etc.
>> >>> Also see the README for configuration in persistence.xml etc.
>> >>>
>> >>> Currently it is hard-coded to use the Atomikos Transaction library and
>> >>> Hibernate JPA, that would have to be configurable + some other options
>> >>> as well. See the TODOs in the code.
>> >>>
>> >>> As I said, this needs feedback and testing. Thanks.
>> >>>
>> >>> --
>> >>> Jonas Bonér
>> >>>
>> >>> twitter: @jboner
>> >>> blog:    http://jonasboner.com
>> >>> work:   http://crisp.se
>> >>> work:   http://scalablesolutions.se
>> >>> code:   http://github.com/jboner
>> >>>
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> L.G. Meredith
>> >> Managing Partner
>> >> Biosimilarity LLC
>> >> 1219 NW 83rd St
>> >> Seattle, WA 98117
>> >>
>> >> +1 206.650.3740
>> >>
>> >> http://biosimilarity.blogspot.com
>> >>
>> >>
>> >
>> >
>> > >
>> >
>>
>>
>>
>> --
>> Jonas Bonér
>>
>> twitter: @jboner
>> blog:    http://jonasboner.com
>> work:   http://crisp.se
>> work:   http://scalablesolutions.se
>> code:   http://github.com/jboner
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Git some: http://github.com/dpp
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to