[Lift] Re: File uploads sans SHtml

2009-09-21 Thread Charles F. Munat

Perfect. I was hoping it was that simple. Thanks.

Mind if I put that on the wiki?

Chas.

David Pollak wrote:
> 
> Select a file to upload: 
> 
> 
> 
> 
> for {r <- S.request; f <- r.uploadedFiles if f.name  == 
> "i_like_mice"} yield (f.mimeType, f.fileStream)
> 
> 
> On Mon, Sep 21, 2009 at 5:47 PM, Charles F. Munat  > wrote:
> 
> 
> I'm using ExtJS to upload a file using a homemade file upload field (for
> styling purposes). I've only used the SHtml feature in the past. I can
> see that the file is in the POST. How does one get it back out?
> 
> Let's say it's a Word Doc or a PDF (it's actually a résumé). I want to
> save it to the drive (or dump it in a BLOB) and pull it back out again
> to attach to an email.
> 
> Best practice on this?
> 
> BTW, the demo here:
> 
> http://demo.liftweb.net/file_upload
> 
> is giving me a 500 error.
> 
> Chas.
> 
> 
> 
> 
> 
> -- 
> 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
> 
> > 

--~--~-~--~~~---~--~~
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] Autogenerated PKs and MetaMapper

2009-09-21 Thread Thomas Rampelberg

I've been working at getting MetaMapper to work with primary keys that
aren't auto-generated (or longs). Towards this end, I've got a patch
for MetaMapper.scala that I'd like to get in. Who could I talk about
the process for that?

In addition, as part of implementing the functionality, I ran into
some interesting problems. The most interesting one has to do with
dbIndexFieldIndicatesSaved_?. The default (i_is_! != defaultValue)
works great for cases where you're using the default value for the
actual primary key. Unfortunately, if you use something like this when
you're actively setting the primary key yourself there are some
unfortunate side effects (nothing gets saved to the database).

To get around this, I'm doing something along these lines:

class InfoHashPrimaryKey[T<:Mapper[T]] (
  override val fieldOwner: T) extends MappedStringPrimaryKey[T] (
fieldOwner, 20) with LifecycleCallbacks {
private var _saved = false
override def dbIndexFieldIndicatesSaved_? = _saved
override def afterSave = _saved = true
  }

Would there happen to be a better way to do this? Leveraging an
afterSave hook seems like potential overkill.

--~--~-~--~~~---~--~~
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: File uploads sans SHtml

2009-09-21 Thread David Pollak

Select a file to upload: 




for {r <- S.request; f <- r.uploadedFiles if f.name == "i_like_mice"}
yield (f.mimeType, f.fileStream)


On Mon, Sep 21, 2009 at 5:47 PM, Charles F. Munat  wrote:

>
> I'm using ExtJS to upload a file using a homemade file upload field (for
> styling purposes). I've only used the SHtml feature in the past. I can
> see that the file is in the POST. How does one get it back out?
>
> Let's say it's a Word Doc or a PDF (it's actually a résumé). I want to
> save it to the drive (or dump it in a BLOB) and pull it back out again
> to attach to an email.
>
> Best practice on this?
>
> BTW, the demo here:
>
> http://demo.liftweb.net/file_upload
>
> is giving me a 500 error.
>
> Chas.
>
> >
>


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

--~--~-~--~~~---~--~~
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: File uploads sans SHtml

2009-09-21 Thread Ross Mellgren

I haven't done it myself, but it looks like you could probably use

def myFunc(file: FileParamHolder): Any = ...
S.addFunctionMap("nameOfField", BinFuncHolder(myFunc _))

I'm not sure about the lifetime on the function mapping and whether it  
may live too long though.

-Ross

On Sep 21, 2009, at 8:47 PM, Charles F. Munat wrote:

>
> I'm using ExtJS to upload a file using a homemade file upload field  
> (for
> styling purposes). I've only used the SHtml feature in the past. I can
> see that the file is in the POST. How does one get it back out?
>
> Let's say it's a Word Doc or a PDF (it's actually a résumé). I want to
> save it to the drive (or dump it in a BLOB) and pull it back out again
> to attach to an email.
>
> Best practice on this?
>
> BTW, the demo here:
>
> http://demo.liftweb.net/file_upload
>
> is giving me a 500 error.
>
> Chas.
>
> >


--~--~-~--~~~---~--~~
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: Concurrent Web Service Requests?

2009-09-21 Thread David Pollak
There's a difference between some experimental stuff and the robust stuff
that one can build robust web apps on.  I've got my finger in a fair number
of the projects that you mention and I don't think (with the exception of
Robey's stuff which I haven't played with a lot) I would trust my app to
them.
More broadly, doing premature optimization doesn't help things.  The JVM,
even with one thread per IO, and still serve hundreds of pages per second.
 Yes, if you're Twitter or LinkedIn, you have to worry about things like the
number of threads your actually consuming, but for an app that's going to
server 100 requests per second, even if you've got 5 threads working in
parallel per concurrent request to render the page, you're not pushing any
limits.

On Mon, Sep 21, 2009 at 7:28 PM, espeed  wrote:

>
> On Sep 21, 5:30 pm, David Pollak 
> wrote:
> > Threads are used in Scala actors, but only while processing a message
> (actor
> > jobs are allocated to threads in a thread pool).  In the case of asking
> your
> > external ad server for information, Scala Actors are not going to help
> you
> > because they have not been integrated with the JVM's NIO library (NIO ~=
> > Unix I/O Select)  Erlang's actor scheduler is IO aware, Scala's is not.
>
> Googling for "Scala actors NIO" turned up a recent paper by Matthias
> Schmidt at Sun. There is a section on combing the Scala actor model
> with NIO...
>
> http://blogs.sun.com/schmidtm/entry/high_performance_tcp_ip_programming
>
> http://blogs.sun.com/schmidtm/resource/nio-whitepaper/High-Performance-TCPIP-JVM.edit.Final.Formatted.pdf
>
> I also found this from the upcoming O'Reilly book "Programming Scala,"
> by Dean Wampler and Alex Payne...
>
> Chapter 9. Robust, Scalable Concurrency with Actors
> http://programming-scala.labs.oreilly.com/ch09.html
>
> "The open-source Naggati library adds a Scala-friendly layer atop MINA
> that, according to its author, “makes it easy to build protocol
> filters [using a] sequential style”. Essentially, Naggati is a DSL for
> parsing network protocols, with MINA’s powerful NIO abilities under
> the hood."
>
> - James
>
> >
>


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

--~--~-~--~~~---~--~~
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: Concurrent Web Service Requests?

2009-09-21 Thread espeed

On Sep 21, 5:30 pm, David Pollak 
wrote:
> Threads are used in Scala actors, but only while processing a message (actor
> jobs are allocated to threads in a thread pool).  In the case of asking your
> external ad server for information, Scala Actors are not going to help you
> because they have not been integrated with the JVM's NIO library (NIO ~=
> Unix I/O Select)  Erlang's actor scheduler is IO aware, Scala's is not.

Googling for "Scala actors NIO" turned up a recent paper by Matthias
Schmidt at Sun. There is a section on combing the Scala actor model
with NIO...

http://blogs.sun.com/schmidtm/entry/high_performance_tcp_ip_programming
http://blogs.sun.com/schmidtm/resource/nio-whitepaper/High-Performance-TCPIP-JVM.edit.Final.Formatted.pdf

I also found this from the upcoming O'Reilly book "Programming Scala,"
by Dean Wampler and Alex Payne...

Chapter 9. Robust, Scalable Concurrency with Actors
http://programming-scala.labs.oreilly.com/ch09.html

"The open-source Naggati library adds a Scala-friendly layer atop MINA
that, according to its author, “makes it easy to build protocol
filters [using a] sequential style”. Essentially, Naggati is a DSL for
parsing network protocols, with MINA’s powerful NIO abilities under
the hood."

- James

--~--~-~--~~~---~--~~
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] File uploads sans SHtml

2009-09-21 Thread Charles F. Munat

I'm using ExtJS to upload a file using a homemade file upload field (for 
styling purposes). I've only used the SHtml feature in the past. I can 
see that the file is in the POST. How does one get it back out?

Let's say it's a Word Doc or a PDF (it's actually a résumé). I want to 
save it to the drive (or dump it in a BLOB) and pull it back out again 
to attach to an email.

Best practice on this?

BTW, the demo here:

http://demo.liftweb.net/file_upload

is giving me a 500 error.

Chas.

--~--~-~--~~~---~--~~
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: Turning off garbage collection

2009-09-21 Thread Charles F. Munat

Now that's a clever idea.

David Pollak wrote:
> 
> 
> On Sep 21, 12:21 pm, "Charles F. Munat"  wrote:
>> Why a once every 75 second ajax request to the server if it's not
>> necessary? But I can live with it.
> 
> http://github.com/dpp/liftweb/issues#issue/69
> 
>> Chas.
>>
>>
>>
>> David Pollak wrote:
>>
>>> On Mon, Sep 21, 2009 at 6:34 AM, Xavi Ramirez >> > wrote:
>>> Doesn't that disable garbage collection for the whole site?
>>> Is it possible to turn off on specific pages?
>>> It's currently not possible to turn of Lift's GUID <-> Function GC on a
>>> page by page basis.
>>> What's the use case for this?  Why is a once every 75 second ajax
>>> request to the server causing issues?
>>> Thanks,
>>> Xavi
>>> On Mon, Sep 21, 2009 at 4:41 AM, Timothy Perrett
>>>  wrote:
>>>  > Chas,
>>>  > This has been asked a million times on list - did you not try
>>>  > searching one of the many archives?
>>>  > LiftRules.enableLiftGC = false;
>>>  > Tim
>>>  > On 21 Sep 2009, at 08:37, Charles F. Munat wrote:
>>>  >> Is it possible to turn off garbage collection on an individual
>>> page if
>>>  >> there's nothing to be garbage collected on that page? If so, how
>>> does
>>>  >> one do it?
>>>  >> Is it possible to turn off garbage collection completely? If so,
>>> how?
>>>  >> I can't seem to find this anywhere.
>>>  >> Chas.
>>> --
>>> Lift, the simply functional web frameworkhttp://liftweb.net
>>> Beginning Scalahttp://www.apress.com/book/view/1430219890
>>> Follow me:http://twitter.com/dpp
>>> Git some:http://github.com/dpp
> > 
> 

--~--~-~--~~~---~--~~
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: Turning off garbage collection

2009-09-21 Thread Charles F. Munat

Oh, ho... payback, eh? Well, given that I worked 54 of the past 72 
hours, I can get to that wiki article in, oh, probably about six months?

Remind me. :-)

Chas.

P.S. I already 'fessed up that I did a few Google searches and gave up.

That said, and joking aside, the hardest part of finding information is 
choosing the right search terms. Regularly, I'll see someone search for 
something using some reasonable terms, get nothing, and then someone 
else comes along and alters the search terms slightly and gets the right 
thing right away. That happened to me recently with a NetBeans tutorial 
that I forgot to bookmark and then spent days trying to find again.

Timothy Perrett wrote:
> Chas,
> 
> Ironically, my first draft response was pretty much RTFM but I canned  
> it because it was not appropriate ;-)
> 
> I replied in the way I did because your closing comments were "I can't  
> seem to find this anywhere." - by definition, it made it sound like  
> you had spent time searching etc which prompted me to ask where / what  
> you had looked for because this is a well documented question and as  
> you say, it was surprising to hear that you were unable to find a  
> solution.
> 
> Perhaps you could write up a wiki article to aid others in the  
> future...?
> 
> Cheers, Tim
> 
> 
> 
> On 21 Sep 2009, at 20:30, Charles F. Munat wrote:
> 
>> I agree that RTFM is bad. It pisses people off and they go away. I  
>> think
>> David's policy is probably the best I've ever encountered on a list.
>>
>> That said, Tim didn't really say RTFM and he did answer the  
>> question, he
>> just voiced surprise that I didn't find it on my own. I was too
>> exhausted and didn't want to waste more list time with the explanation
>> (it would sound whiny anyway). But I probably should've looked harder.
>> Then again, now Xavi and I know that per-page turning off the GC is  
>> not
>> possible.
>>
>> Man, three hours sleep is just not sufficient.
>>
>> Chas.
>>
>> David Pollak wrote:
>>>
>>> On Mon, Sep 21, 2009 at 1:41 AM, Timothy Perrett
>>>  wrote:
>>>
>>>
>>>Chas,
>>>
>>>This has been asked a million times on list - did you not try
>>>searching one of the many archives?
>>>
>>>
>>> Folks,
>>>
>>> Our stated policy is that RTFM is not a valid response on this list.
>>> Folks, even Lift committers like Charles, are not expected to know
>>> everything about Lift or follow every thread.
>>>
>>> If someone asks the same question over and over again, has an area  
>>> that
>>> they've worked on extensively and asks a basic question about that  
>>> area,
>>> or in some other way clearly and repeatedly off-puts basic efforts on
>>> their part to the rest of the list, we discuss it in private,  
>>> either on
>>> the Lift committers list or one on one with me.  We (usually I) then
>>> privately let that person know that they have been consuming more
>>> resources on this list than they have been giving back.
>>>
>>> Thanks,
>>>
>>> David
>>>
>>>
>>>LiftRules.enableLiftGC = false;
>>>
>>>Tim
>>>
>>>
>>>On 21 Sep 2009, at 08:37, Charles F. Munat wrote:
>>>
 Is it possible to turn off garbage collection on an individual
>>>page if
 there's nothing to be garbage collected on that page? If so, how  
 does
 one do it?

 Is it possible to turn off garbage collection completely? If so,  
 how?

 I can't seem to find this anywhere.

 Chas.

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

--~--~-~--~~~---~--~~
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: Turning off garbage collection

2009-09-21 Thread David Pollak



On Sep 21, 12:21 pm, "Charles F. Munat"  wrote:
> Why a once every 75 second ajax request to the server if it's not
> necessary? But I can live with it.

http://github.com/dpp/liftweb/issues#issue/69

>
> Chas.
>
>
>
> David Pollak wrote:
>
> > On Mon, Sep 21, 2009 at 6:34 AM, Xavi Ramirez  > > wrote:
>
> >     Doesn't that disable garbage collection for the whole site?
>
> >     Is it possible to turn off on specific pages?
>
> > It's currently not possible to turn of Lift's GUID <-> Function GC on a
> > page by page basis.
>
> > What's the use case for this?  Why is a once every 75 second ajax
> > request to the server causing issues?
>
> >     Thanks,
> >     Xavi
>
> >     On Mon, Sep 21, 2009 at 4:41 AM, Timothy Perrett
> >      wrote:
>
> >      > Chas,
>
> >      > This has been asked a million times on list - did you not try
> >      > searching one of the many archives?
>
> >      > LiftRules.enableLiftGC = false;
>
> >      > Tim
>
> >      > On 21 Sep 2009, at 08:37, Charles F. Munat wrote:
>
> >      >> Is it possible to turn off garbage collection on an individual
> >     page if
> >      >> there's nothing to be garbage collected on that page? If so, how
> >     does
> >      >> one do it?
>
> >      >> Is it possible to turn off garbage collection completely? If so,
> >     how?
>
> >      >> I can't seem to find this anywhere.
>
> >      >> Chas.
>
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Git some:http://github.com/dpp
--~--~-~--~~~---~--~~
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: You are not banned from this group!!

2009-09-21 Thread Erik Engbrecht
...or carrier pigeon...
http://www.neatorama.com/2009/09/10/httpwww-reuters-comarticleoddlyenoughnewsidustre5885pm20090909/


On Mon, Sep 21, 2009 at 7:14 PM, Meredith Gregory
wrote:

> Dear Chas,
>
> Didn't you know... more than half the data in world is still flying over
> sneakernet. ;-)
>
> Best wishes,
>
> --greg
>
>
> On Mon, Sep 21, 2009 at 2:58 PM, Charles F. Munat  wrote:
>
>>
>> But were the sneakers any good?
>>
>> Chas.
>>
>> David Pollak wrote:
>> > Folks,
>> >
>> > Google Groups has apparently sent messages to a number of folks posting
>> > to the Lift group telling them that they were banned.  This is simply
>> > wrong and sucks for the people who received the messages.
>> >
>> > There has been one substantive poster who was so abusive on the Lift
>> > list that he was banned (this was after a number of private emails to
>> > the party).  We ban spammers (people posting links to adult sites, cheap
>> > knock-off Nike shoes, etc.)  I accidentally banned a person once because
>> > I mis-read his mail and it sounded like he was selling sneakers.
>> >
>> > So, if you've received email stating you were banned, please forward the
>> > email to me (yes, this is an exception to the rule of not contacting me
>> > personally).  If you have a screen shot of being banned, please send it
>> > to me.
>> >
>> > I will gladly buy beer/coffee/food for anyone who gets such a notice.  I
>> > sincerely apologize for any problems this is causing.
>> >
>> > And, *YOU ARE NOT BANNED!!*
>> >
>> > Thanks,
>> >
>> > David
>> >
>> > --
>> > 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
>
>
> >
>


-- 
http://erikengbrecht.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
-~--~~~~--~~--~--~---



[Lift] Re: You are not banned from this group!!

2009-09-21 Thread Meredith Gregory
Dear Chas,

Didn't you know... more than half the data in world is still flying over
sneakernet. ;-)

Best wishes,

--greg

On Mon, Sep 21, 2009 at 2:58 PM, Charles F. Munat  wrote:

>
> But were the sneakers any good?
>
> Chas.
>
> David Pollak wrote:
> > Folks,
> >
> > Google Groups has apparently sent messages to a number of folks posting
> > to the Lift group telling them that they were banned.  This is simply
> > wrong and sucks for the people who received the messages.
> >
> > There has been one substantive poster who was so abusive on the Lift
> > list that he was banned (this was after a number of private emails to
> > the party).  We ban spammers (people posting links to adult sites, cheap
> > knock-off Nike shoes, etc.)  I accidentally banned a person once because
> > I mis-read his mail and it sounded like he was selling sneakers.
> >
> > So, if you've received email stating you were banned, please forward the
> > email to me (yes, this is an exception to the rule of not contacting me
> > personally).  If you have a screen shot of being banned, please send it
> > to me.
> >
> > I will gladly buy beer/coffee/food for anyone who gets such a notice.  I
> > sincerely apologize for any problems this is causing.
> >
> > And, *YOU ARE NOT BANNED!!*
> >
> > Thanks,
> >
> > David
> >
> > --
> > 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
-~--~~~~--~~--~--~---



[Lift] Re: Problems with crudify rewrite and sitemap access protection

2009-09-21 Thread David Pollak
On Fri, Sep 18, 2009 at 1:46 PM, Jeppe Nejsum Madsen wrote:

>
> David Pollak  writes:
>
> >  http://localhost:8080/assets/edit/5817, an anonymous
> >> user is not redirected to the login page (at least, not before
> >> findForParam is called)
> >>
> >> Any clues?
> >>
> >
> > SiteMap is applied after URL rewriting.  URL rewriting happens very, very
> > early in the HTTP service cycle.  We don't know what the URL is and how
> it
> > should be applied before the rewrite.
>
> I had a feeling this was the case. I seem to run into this a lot with
> CRUDify ;-(
>
> > If the CRUDify page is actually displayed, this is a bug.  But the
> > findForParam method will be invoked because this is part of URL
> rewriting.
>
> The crudify page is not displayed. If I fix my findForParam to work
> without the logged in user I have two solutions the way I see it:
>
> 1) If I do
>
> find(By(id,in.toInt),By(account,
> User.currentUser.dmap(0L)(_.account.is)))
>
> I will of course not find the record since account is 0. This gives a
> 404, so doesn't really work
>
> 2) If I do
>
> User.currentUser.dmap(Full(new Vehicle):Box[Vehicle])(acc =>
> find(By(id,in.toInt),By(account, acc.account.is)))
>
> it seems to work by returning a default Vehicle in the anonymous
> case. This seems to work as long as the creation doesn't have any side
> effects. Conceptually not so nice, but gets the job done...
>

I recently made a change that puts the current session around the re-write
phase if there is a session.  Can you put together a simple example for me
of it not working and I'll debug from there.


>
> The only  description of the Lift request lifecycle I've found is this:
> http://wiki.liftweb.net/index.php/How_lift_processes_HTTP_requests. Is
> this up to date?
>

No.


>
> I'm not sure how much of the Lift machinery is available during the
> different stages, is this described somewhere?
>
> /Jeppe
>
>
> >
>


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

--~--~-~--~~~---~--~~
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: alternate webroot using Boot?

2009-09-21 Thread David Pollak
On Tue, Sep 15, 2009 at 10:52 AM, tonyc  wrote:

>
> Thanks David.
>
> It will mean developers can introduce lift gradually without a big
> bang approach, which is what I'm trying to do.
>
> It's quite normal to change the url-pattern on servlets/filters and
> it's also unusual for a filter which acts on *.html files in the root
> to override the default  action (of serving up an html file).
>
> When dynamically changing the content of an html file before serving
> up, it's probably a sign that an alternative file extension and/or
> location is needed. JSPs (ugh!), do end in *.jsp, not *.html so that
> the web container "knows" not to serve them directly up, ie. they are
> picked up by the JSP Servlet, not a filter that matches on every url.
>

Lift supports URL rewriting for inbound requests, so you could turn
/something/index into /index.  The challenge as I see it is that Lift also
re-writes URLs on the way out and that might cause issues (the URLs would
not be correctly re-written from /index to /something/index).

I'll open a ticket because this also has to do with context paths and Lift
is pretty rigid about context paths.


>
> Maybe there is a way with what's already there, but I'm missing
> something?
>
> Cheers,
>
> Tony.
>
> On Sep 16, 2:58 am, David Pollak 
> wrote:
> > On Tue, Sep 15, 2009 at 1:57 AM, tonyc  wrote:
> >
> > > I'm considering lift for an alternative web framework but need to
> > > maintain a whole bunch of servlets / filters that already live in my
> > > web.xml.
> >
> > > This is the closest thread to this subject so I thought I'd post here.
> >
> > > I'm trying to get the LiftFilter to match on a distinct url-pattern to
> > > allow the other filters/servlets to continue matching their current
> > > url patterns.
> >
> > > For this reason I need LiftFilter to match on say "lift-test/*" and so
> > > it receives requests like http:///lift-test/index.html, but NOT
> > > like http:///index.html
> >
> > I think you have to put the index.html file in /lift-test/index.html
> >
> > If this becomes a common occurrence, I think we can introduce something
> into
> > LiftRules that will "offset" where things are looked up and also the
> > re-writing of URL.
> >
> >
> >
> >
> >
> > > Trouble is, I'm now a bit confused where to put the (lift) index.html
> > > in the webapp and/or what I need to change in Boot.scala.
> >
> > > Scala plays nicely with Java, and I'd like to be able to get web
> > > frameworks playing nicely as well.
> >
> > > I've already cobbled together spring/gwt/restlet/apachecxf so I guess
> > > I'm a glutton for punishment;)
> >
> > > I suspect there's quite a few people want to integrate Lift with their
> > > pre-existing webapps, so I'm hoping somebody has solved it already.
> >
> > > Cheers,
> >
> > > Tony.
> >
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Git some:http://github.com/dpp
>
> >
>


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

--~--~-~--~~~---~--~~
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: Bug in MappedEmail: emailPattern is wrong

2009-09-21 Thread David Pollak
Awaiting review board approval.

On Sun, Sep 20, 2009 at 2:23 AM, Richard Dallaway wrote:

>
> Apologies if I've duplicated the ticket, but I couldn't find it one,
> and this issue is going to impact me too.
>
> http://github.com/dpp/liftweb/issues/#issue/65
>
> Cheers
> Richard
>
> On Fri, Sep 18, 2009 at 6:32 PM, David Pollak
>  wrote:
> > Please open a ticket
> >
> > On Wed, Sep 16, 2009 at 11:27 AM, harryh  wrote:
> >>
> >> Hrm, MappedEmail is now rejecting e-mails with a - in the part before
> >> the @.
> >>
> >> is %-+ being interpreted as % through + and not % OR - OR + ?
> >>
> >> -harryh, who is easily confused by regular expressions
> >>
>
> >
>


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

--~--~-~--~~~---~--~~
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: Turning off garbage collection

2009-09-21 Thread Timothy Perrett

Chas,

Ironically, my first draft response was pretty much RTFM but I canned  
it because it was not appropriate ;-)

I replied in the way I did because your closing comments were "I can't  
seem to find this anywhere." - by definition, it made it sound like  
you had spent time searching etc which prompted me to ask where / what  
you had looked for because this is a well documented question and as  
you say, it was surprising to hear that you were unable to find a  
solution.

Perhaps you could write up a wiki article to aid others in the  
future...?

Cheers, Tim



On 21 Sep 2009, at 20:30, Charles F. Munat wrote:

>
> I agree that RTFM is bad. It pisses people off and they go away. I  
> think
> David's policy is probably the best I've ever encountered on a list.
>
> That said, Tim didn't really say RTFM and he did answer the  
> question, he
> just voiced surprise that I didn't find it on my own. I was too
> exhausted and didn't want to waste more list time with the explanation
> (it would sound whiny anyway). But I probably should've looked harder.
> Then again, now Xavi and I know that per-page turning off the GC is  
> not
> possible.
>
> Man, three hours sleep is just not sufficient.
>
> Chas.
>
> David Pollak wrote:
>>
>>
>> On Mon, Sep 21, 2009 at 1:41 AM, Timothy Perrett
>>  wrote:
>>
>>
>>Chas,
>>
>>This has been asked a million times on list - did you not try
>>searching one of the many archives?
>>
>>
>> Folks,
>>
>> Our stated policy is that RTFM is not a valid response on this list.
>> Folks, even Lift committers like Charles, are not expected to know
>> everything about Lift or follow every thread.
>>
>> If someone asks the same question over and over again, has an area  
>> that
>> they've worked on extensively and asks a basic question about that  
>> area,
>> or in some other way clearly and repeatedly off-puts basic efforts on
>> their part to the rest of the list, we discuss it in private,  
>> either on
>> the Lift committers list or one on one with me.  We (usually I) then
>> privately let that person know that they have been consuming more
>> resources on this list than they have been giving back.
>>
>> Thanks,
>>
>> David
>>
>>
>>LiftRules.enableLiftGC = false;
>>
>>Tim
>>
>>
>>On 21 Sep 2009, at 08:37, Charles F. Munat wrote:
>>
>>>
>>> Is it possible to turn off garbage collection on an individual
>>page if
>>> there's nothing to be garbage collected on that page? If so, how  
>>> does
>>> one do it?
>>>
>>> Is it possible to turn off garbage collection completely? If so,  
>>> how?
>>>
>>> I can't seem to find this anywhere.
>>>
>>> Chas.
>>>

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


--~--~-~--~~~---~--~~
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: You are not banned from this group!!

2009-09-21 Thread TylerWeir

I accidentally banned two people. I checked the list and thought I had
corrected it.
It appears I missed someone.

Sorry for the mistake.


On Sep 21, 5:21 pm, David Pollak 
wrote:
> Folks,
> Google Groups has apparently sent messages to a number of folks posting to
> the Lift group telling them that they were banned.  This is simply wrong and
> sucks for the people who received the messages.
>
> There has been one substantive poster who was so abusive on the Lift list
> that he was banned (this was after a number of private emails to the party).
>  We ban spammers (people posting links to adult sites, cheap knock-off Nike
> shoes, etc.)  I accidentally banned a person once because I mis-read his
> mail and it sounded like he was selling sneakers.
>
> So, if you've received email stating you were banned, please forward the
> email to me (yes, this is an exception to the rule of not contacting me
> personally).  If you have a screen shot of being banned, please send it to
> me.
>
> I will gladly buy beer/coffee/food for anyone who gets such a notice.  I
> sincerely apologize for any problems this is causing.
>
> And, *YOU ARE NOT BANNED!!*
>
> Thanks,
>
> David
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Git some:http://github.com/dpp
--~--~-~--~~~---~--~~
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: Concurrent Web Service Requests?

2009-09-21 Thread David Pollak
On Mon, Sep 21, 2009 at 3:19 PM, espeed  wrote:

>
> On Sep 21, 4:29 pm, David Pollak 
> wrote:
> > Well.. there's a Java way of doing exactly that: fork/join on a thread.
>  Seehttp://java.sun.com/javase/6/docs/api/java/lang/Thread.html
> >
> > But to weave this into the page rendering, there would be some work
> required
> > on your part: forking the threads early in the page render cycle and then
> > harvesting their results as each snippet is called.
> >
> > It might be an interesting feature for Lift, however, to allow for the
> > forking of snippet execution that would be resolved at the end of page
> > rendering.  I've added a ticket to add this feature to Lift.
>
>
> Wouldn't it be more efficient to use lightweight actors for this
> instead of forking threads?  I have been looking at Erlang too and may
> be confused about the Scala actor model because I am new to Scala, but
> I thought one of the points of the Scala actor model is not to use
> threads in a case like this.
>

Threads are used in Scala actors, but only while processing a message (actor
jobs are allocated to threads in a thread pool).  In the case of asking your
external ad server for information, Scala Actors are not going to help you
because they have not been integrated with the JVM's NIO library (NIO ~=
Unix I/O Select)  Erlang's actor scheduler is IO aware, Scala's is not.

In terms of efficiency, having an extra 50-100 threads floating around the
JVM is not going to slow anything down noticeably.  Having an extra 2,000
threads will (lots of space for the stack and lots of entries in the
kernel's scheduler).

I expect that the actual Lift implementation will have a plugable design
such that we can use the standard JVM thread pooling or Akka actors (which
may benefit from not using an actual thread during IO waits).


>
> >
>


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

--~--~-~--~~~---~--~~
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: Code Plugability in Lift

2009-09-21 Thread Timothy Perrett

I know we've discussed this before, but ultimately we'd like to wrap
JPA with a Record front end somehow...

Cheers, Tim

On Sep 21, 10:42 pm, David Pollak 
wrote:
> On Mon, Sep 21, 2009 at 2:03 PM, glenn  wrote:
>
> > David,
>
> > Does this mean you could write an entity class, like so:
>
> > class User(val firstName: String, val lastName: String, val userName:
> > String, val email: String, val password: String) with myTrait {...}
>
> > and it would be useable in either a JPA or mapper or record
> > implementation?
>
> No.  Mapper/Record require a richer representation of fields than Pojos.
>  The reason for this can be found 
> athttp://blog.lostlake.org/index.php?/archives/19-Keeping-the-meaning-w...
>
>
>
>
>
>
>
> > That would be the ticket.
>
> > Glenn
>
> > On Sep 21, 12:47 pm, David Pollak 
> > wrote:
> > > This is an impedance mis-match between POJOs (what JPA expects) and the
> > > richer fields that Mapper and Record have.
> > > I'm working on an interface (
> >http://github.com/dpp/liftweb/blob/master/lift-util/src/main/scala/ne...)
> > > that should be a base trait on everything in Lift that's gettable or
> > > gettable/settable.
>
> > > Then you could write a trait that looks like:
>
> > > trait MyThing {  def name: PSettableValueHolder[String]
> > > *
> > > *
> > > * def getName(): String = name.is*
> > > * def setName(in: String) = name.set(in)*
> > > *
> > > *
> > > * *
>
> > > }
>
> > > Such a trait should be able to bridge a JPA implementation and a Lift
> > mapper
> > > implementation.
>
> > > If you've got a better solution, please code it up and let's talk about
> > it.
>
> > > On Mon, Sep 21, 2009 at 9:31 AM, glenn  wrote:
>
> > > > Forgive me. I'm bringing up the subject of modularization in Lift
> > > > under a new heading, but the last discussion was, sadly, all over the
> > > > map and only served to emphasize the problem. So let me narrow it
> > > > down, a bit, here, and ask:
>
> > > > How is it possible to create two different snippet implementations, or
> > > > two different models, one JPA and one not, or one using the mapper
> > > > framework and another the record, and replace one with the other
> > > > without having to recompile the application?
>
> > > > We're not talking here about interface design - you still have to deal
> > > > with boot.  And traits, as has been suggested by others...well, you'd
> > > > better not expose them to the world outside your implementation, as
> > > > any changes would require recompilation. In other words, you can't
> > > > really use traits for your interface.
>
> > > > To use Lift in the enterprise does require that teams be able to work
> > > > independently, doesn't it.
>
> > > > Glenn
>
> > > --
> > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > Follow me:http://twitter.com/dpp
> > > Git some:http://github.com/dpp
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Git some:http://github.com/dpp
--~--~-~--~~~---~--~~
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: Session locking...

2009-09-21 Thread Timothy Perrett

Gah, I should have thought of that! This should do what I need - i'll
give it a whirl... thanks chaps.

Cheers, Tim

> The session tear-down is well integrated with SessionVars.  In your
> SessionVar, you call registerCleanupFunc:
>
> object myLock extends SessionVar[Box[String]](Empty) {
>   registerCleanupFunc(session => myLock.is.foreach(id => unlock(id)))
> }
>

--~--~-~--~~~---~--~~
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: Concurrent Web Service Requests?

2009-09-21 Thread espeed

On Sep 21, 4:29 pm, David Pollak 
wrote:
> Well.. there's a Java way of doing exactly that: fork/join on a thread.  
> Seehttp://java.sun.com/javase/6/docs/api/java/lang/Thread.html
>
> But to weave this into the page rendering, there would be some work required
> on your part: forking the threads early in the page render cycle and then
> harvesting their results as each snippet is called.
>
> It might be an interesting feature for Lift, however, to allow for the
> forking of snippet execution that would be resolved at the end of page
> rendering.  I've added a ticket to add this feature to Lift.


Wouldn't it be more efficient to use lightweight actors for this
instead of forking threads?  I have been looking at Erlang too and may
be confused about the Scala actor model because I am new to Scala, but
I thought one of the points of the Scala actor model is not to use
threads in a case like this.

--~--~-~--~~~---~--~~
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: Pain Building Lift

2009-09-21 Thread runt

excellent, thanaks a lot.

Case closed.

On Sep 21, 1:27 am, Tim Nelson  wrote:
> The appendices were not included in the printed book. You can get them
> online here:http://www.apress.com/book/downloadfile/4390
>
> Also, they are included in the os version of the 
> book:http://groups.google.com/group/the-lift-book
>
> Tim
>
> On Sun, Sep 20, 2009 at 7:44 AM, runt  wrote:
>
> > Thank you all for the responses.
>
> > I try and build everything from source - and no it is not always easy
> > but I like doing it. I sudo'd because I was in /usr/local/src - on my
> > machine this did require sudo. I had already played around with lift
> > using the maven commands and from the Eclipse IDE - this is well
> > documented online and in the books I have bought. Did the hello world
> > thing (from your book Derek, p.s. where are the Appendixes? Seriously
> > I can't find them in the copy I paid for from Apress), then tried to
> > build from source...
>
> > And this is an example where an idiot compiling from source is evil -
> > the problem was path related. Running java -version reports the 1.6
> > java I downloaded and installed from sun. Running mvn -version shows
> > otherwise (on my mac now as I had this light bulb moment at home)
>
> > myee-riris-macbook-pro:liftweb runt$ /opt/apache-maven-2.2.1/bin/mvn -
> > version
> > Apache Maven 2.2.1 (r801777; 2009-08-07 05:16:01+1000)
> > Java version: 1.5.0_16
> > Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
> > Home
> > Default locale: en_US, platform encoding: MacRoman
> > OS name: "mac os x" version: "10.5.8" arch: "i386" Family: "unix"
>
> > Fixed the path to use my 1.6 java. Can now build successfully, and
> > have been checking it out. Happiness++.
>
> > My apologies for spamming you with my stupidity. Take pleasure in
> > knowing said stupidity is immortalised on the web.
>
> > On Sep 20, 6:06 am, mond ray mond  wrote:
> > > Ha - beat you ;-)
>
> > > [INFO]
> > > 
> > > [INFO] BUILD SUCCESSFUL
> > > [INFO]
> > > 
> > > [INFO] Total time: 7 minutes 56 seconds
> > > [INFO] Finished at: Sat Sep 19 22:02:30 CEST 2009
> > > [INFO] Final Memory: 47M/85M
> > > [INFO]
> > > 
> > > bash-3.2$
>
> > > Must have been the 'clean'.  My missus says I should tidy up more
> > > often too!
>
> > > Thanks for the support
>
> > > Best regards
>
> > > Ray
>
> > > On Sep 19, 7:03 pm, David Pollak 
> > > wrote:
>
> > > > On my Mac OS X box:
>
> > > > pony:liftweb dpp$ mvn -version
> > > > Maven version: 2.0.9
> > > > Java version: 1.6.0_15
> > > > OS name: "mac os x" version: "10.6" arch: "i386" Family: "mac"
> > > > pony:liftweb dpp$
>
> > > > Here's the build log:
>
> > > > pony:~ dpp$ cd tmp/
> > > > pony:tmp dpp$ git clone git://github.com/dpp/liftweb.git
> > > > Initialized empty Git repository in /Users/dpp/tmp/liftweb/.git/
> > > > remote: Counting objects: 35122, done.
> > > > remote: Compressing objects: 100% (12807/12807), done.
> > > > remote: Total 35122 (delta 14036), reused 34877 (delta 13857)
> > > > Receiving objects: 100% (35122/35122), 18.53 MiB | 907 KiB/s, done.
> > > > Resolving deltas: 100% (14036/14036), done.
> > > > pony:tmp dpp$ cd liftweb/
> > > > pony:liftweb dpp$ git tag
> > > > 0.10
> > > > 0.9
> > > > 1.0
> > > > 1.0.1
> > > > 1.0.2
> > > > 1.1-M1
> > > > 1.1-M3
> > > > 1.1-M4
> > > > 1.1-M5
> > > > bonded_to_rev_121_baf_dpp
> > > > buy_a_feature_svn_130
> > > > igo_1_0
> > > > innovation_games_oneline_1_0
> > > > osgi01
> > > > teched08_demo_jam
> > > > pony:liftweb dpp$ git checout 1.0.2
> > > > git: 'checout' is not a git-command. See 'git --help'.
>
> > > > Did you mean this?
> > > >     checkout
> > > > pony:liftweb dpp$ git checkout 1.0.2
> > > > Note: moving to '1.0.2' which isn't a local branch
> > > > If you want to create a new branch from this checkout, you may do so
> > > > (now or later) by using -b with the checkout command again. Example:
> > > >   git checkout -b 
> > > > HEAD is now at eb3efbd... [release] prepare 1.0.2
> > > > pony:liftweb dpp$ mvn clean install
> > > > [INFO] Scanning for projects...
> > > > [INFO] Reactor build order:
> > > > [INFO]   Lift
> > > > [INFO]   Lift Utils
> > > > [INFO]   Lift WebKit
> > > > [INFO]   Lift Mapper
> > > > [INFO]   Lift Machine
> > > > [INFO]   Lift Record
> > > > [INFO]   Lift Textile
> > > > [INFO]   Lift Facebook
> > > > [INFO]   Lift AMQP
> > > > [INFO]   Lift XMPP
> > > > [INFO]   Lift Widgets
> > > > [INFO]   Lift OpenID
> > > > [INFO]   Lift OAuth
> > > > [INFO]   Lift PayPal
> > > > [INFO]   Lift TestKit
> > > > [INFO]   Lift Core (full lift)
> > > > [INFO]   Lift Sites
> > > > [INFO]   Lift Example
> > > > [INFO]   Skittr Example
> > > > [INFO]   HelloLift example application
> > > > [INFO]   HelloDarwin tutorial application
> > > > [INFO]   JPA D

[Lift] Re: You are not banned from this group!!

2009-09-21 Thread Charles F. Munat

But were the sneakers any good?

Chas.

David Pollak wrote:
> Folks,
> 
> Google Groups has apparently sent messages to a number of folks posting 
> to the Lift group telling them that they were banned.  This is simply 
> wrong and sucks for the people who received the messages.
> 
> There has been one substantive poster who was so abusive on the Lift 
> list that he was banned (this was after a number of private emails to 
> the party).  We ban spammers (people posting links to adult sites, cheap 
> knock-off Nike shoes, etc.)  I accidentally banned a person once because 
> I mis-read his mail and it sounded like he was selling sneakers.
> 
> So, if you've received email stating you were banned, please forward the 
> email to me (yes, this is an exception to the rule of not contacting me 
> personally).  If you have a screen shot of being banned, please send it 
> to me.
> 
> I will gladly buy beer/coffee/food for anyone who gets such a notice.  I 
> sincerely apologize for any problems this is causing.
> 
> And, *YOU ARE NOT BANNED!!*
> 
> Thanks,
> 
> David
> 
> -- 
> 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
> 
> > 

--~--~-~--~~~---~--~~
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: Session locking...

2009-09-21 Thread David Pollak
On Sun, Sep 20, 2009 at 5:37 AM, Timothy Perrett wrote:

>
> Hmm - see what you mean Derek. It seems like it would be really
> helpful to have a addSetupFunction method on LiftSession - what are
> your thoughts?
>

The session tear-down is well integrated with SessionVars.  In your
SessionVar, you call registerCleanupFunc:

object myLock extends SessionVar[Box[String]](Empty) {
  registerCleanupFunc(session => myLock.is.foreach(id => unlock(id)))
}


>
> Cheers, Tim
>
> On Sep 19, 9:17 pm, Derek Chen-Becker  wrote:
> > S.session.foreach { _.addCleanupFunction { sess => ... } }, I think
> should
> > work. I haven't looked at the session code in a while. You would need to
> > register that call for each user's session. Alternatively, there's
> > LiftSession.onShutdownSession, but I think that that call comes later in
> the
> > shutdown process, and may not work correctly.
> >
> > Derek
> >
> > On Sat, Sep 19, 2009 at 11:10 AM, Timothy Perrett
> > wrote:
> >
> >
> >
> >
> >
> > > Guys,
> >
> > > I have a situation where i need to sort of present some kind of
> > > locking to the users of this application. For instance, user A opens
> > > thing Z (perhaps i update the database with some flag or whatever)
> > > then user B attempts  to open thing Z from another terminal. Its at
> > > that point that I want user B to be told that its locked or being
> > > edited by another user. So far, so good.
> >
> > > However, if user A dropped out without saving or whatever (thus
> > > unsetting the locked flag) it would be locked for all. To that end, I
> > > was wondering if its possible to register some kind of session
> > > destruction callback. By that I mean lift keeps sessions open for as
> > > long as the browser window is open, so when the session is killed off
> > > i could just have some function execute to unlock the thing Z or
> > > whatever.
> >
> > > Is there a way to do this?
> >
> > > Cheers, Tim
> >
>


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

--~--~-~--~~~---~--~~
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: Code Plugability in Lift

2009-09-21 Thread David Pollak
On Mon, Sep 21, 2009 at 2:03 PM, glenn  wrote:

>
> David,
>
> Does this mean you could write an entity class, like so:
>
> class User(val firstName: String, val lastName: String, val userName:
> String, val email: String, val password: String) with myTrait {...}
>
> and it would be useable in either a JPA or mapper or record
> implementation?
>

No.  Mapper/Record require a richer representation of fields than Pojos.
 The reason for this can be found at
http://blog.lostlake.org/index.php?/archives/19-Keeping-the-meaning-with-the-bytes.html


>
> That would be the ticket.
>
> Glenn
>
> On Sep 21, 12:47 pm, David Pollak 
> wrote:
> > This is an impedance mis-match between POJOs (what JPA expects) and the
> > richer fields that Mapper and Record have.
> > I'm working on an interface (
> http://github.com/dpp/liftweb/blob/master/lift-util/src/main/scala/ne...)
> > that should be a base trait on everything in Lift that's gettable or
> > gettable/settable.
> >
> > Then you could write a trait that looks like:
> >
> > trait MyThing {  def name: PSettableValueHolder[String]
> > *
> > *
> > * def getName(): String = name.is*
> > * def setName(in: String) = name.set(in)*
> > *
> > *
> > * *
> >
> > }
> >
> > Such a trait should be able to bridge a JPA implementation and a Lift
> mapper
> > implementation.
> >
> > If you've got a better solution, please code it up and let's talk about
> it.
> >
> >
> >
> > On Mon, Sep 21, 2009 at 9:31 AM, glenn  wrote:
> >
> > > Forgive me. I'm bringing up the subject of modularization in Lift
> > > under a new heading, but the last discussion was, sadly, all over the
> > > map and only served to emphasize the problem. So let me narrow it
> > > down, a bit, here, and ask:
> >
> > > How is it possible to create two different snippet implementations, or
> > > two different models, one JPA and one not, or one using the mapper
> > > framework and another the record, and replace one with the other
> > > without having to recompile the application?
> >
> > > We're not talking here about interface design - you still have to deal
> > > with boot.  And traits, as has been suggested by others...well, you'd
> > > better not expose them to the world outside your implementation, as
> > > any changes would require recompilation. In other words, you can't
> > > really use traits for your interface.
> >
> > > To use Lift in the enterprise does require that teams be able to work
> > > independently, doesn't it.
> >
> > > Glenn
> >
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Git some:http://github.com/dpp
> >
>


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

--~--~-~--~~~---~--~~
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: javascript disabled on mobile phone browsers

2009-09-21 Thread koveen



Hi Marius,

thank you for the reply. I guessed it would be possible to turn of all
javascript (and now I know how to do it, thank you very much!!) but
I'd hoped
for some solution in between.

I saw a presentation about Wicket in which the writer showed a
solution in
which an onclick element worked with and without javascript involved.

If javascript was turned on, it renewed the page partially, if
javascript
was turned off, the java part of the framework took over and the page
was
refreshed totally.

Being a newby with Lift/Java/Scala, (and maybe lazy) I hoped for some
resembling feature in Lift, assuming it would be a more common
problem.

Thanks anyway,

Ko

On Sep 21, 5:29 am, "marius d."  wrote:
> Yes .. you can use lift with zero javascript. But obviously you won't
> have comet, you need to turn off auto Ajax and comet generation from
> LiftRules
>
> LiftRules.enableLiftGC = false;
> Liftules.autoIncludeComet = session => false
> Liftules.autoIncludeAjax = session => false
>
> Br's,
> Marius
>
> On Sep 20, 6:18 am, koveen  wrote:
>
>
>
> > Hi,
>
> > I am new to this lift group and just starting to build a website for
> > mobile phone users. While I like to use dynamically loaded pages, I am
> > afraid that some older mobile phone browsers don't support Javascript.
>
> > Is there a way to include Javascript in my web-pages, but to keep a
> > working site is Javascript is not supported?
>
> > Thanks,
>
> > Ko- Hide quoted text -
>
> - Show quoted text -

--~--~-~--~~~---~--~~
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: Concurrent Web Service Requests?

2009-09-21 Thread David Pollak
On Mon, Sep 21, 2009 at 1:19 PM, espeed  wrote:

>
> On Sep 21, 2:33 pm, David Pollak 
> wrote:
> > Lift only uses event-based Actors for supporting CometActors.  All parts
> of
> > the standard HTTP request/response cycle (except for the CometActors) are
> > handled on a single thread.
>
> Hi David -
>
> Thanks for your quick response. If an app developer wants to
> parallelize requests to Web services, what is the recommended way to
> do this in Lift?
>
> For example, in Rails you might do something like this, where the time
> to gather all the data for the page is limited to the longest request
> instead of the sum of all requests:
>
> t1 = Thread.new do
>  @news_data = NewsClient.getNewsData()
> end
> t2 = Thread.new do
>  @advertisements = AdsClient.getAdsByLocation(zip)
> end
> t1.join
> t2.join
>
> Is there a Lift event-based actor API for this or what is the Lift way
> of doing this?
>

Well.. there's a Java way of doing exactly that: fork/join on a thread.  See
http://java.sun.com/javase/6/docs/api/java/lang/Thread.html

But to weave this into the page rendering, there would be some work required
on your part: forking the threads early in the page render cycle and then
harvesting their results as each snippet is called.

It might be an interesting feature for Lift, however, to allow for the
forking of snippet execution that would be resolved at the end of page
rendering.  I've added a ticket to add this feature to Lift.


>
> Thanks again.
>
> James
>
>
>
> >
>


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

--~--~-~--~~~---~--~~
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: Code Plugability in Lift

2009-09-21 Thread glenn

David,

What about using implicits?

implicit def stringDataWrapper(s :String) = ...

to apply the requisite trait. Is that doable?

Glenn

On Sep 21, 2:03 pm, glenn  wrote:
> David,
>
> Does this mean you could write an entity class, like so:
>
> class User(val firstName: String, val lastName: String, val userName:
> String, val email: String, val password: String) with myTrait {...}
>
> and it would be useable in either a JPA or mapper or record
> implementation?
>
> That would be the ticket.
>
> Glenn
>
> On Sep 21, 12:47 pm, David Pollak 
> wrote:
>
> > This is an impedance mis-match between POJOs (what JPA expects) and the
> > richer fields that Mapper and Record have.
> > I'm working on an interface 
> > (http://github.com/dpp/liftweb/blob/master/lift-util/src/main/scala/ne...)
> > that should be a base trait on everything in Lift that's gettable or
> > gettable/settable.
>
> > Then you could write a trait that looks like:
>
> > trait MyThing {  def name: PSettableValueHolder[String]
> > *
> > *
> > * def getName(): String = name.is*
> > * def setName(in: String) = name.set(in)*
> > *
> > *
> > * *
>
> > }
>
> > Such a trait should be able to bridge a JPA implementation and a Lift mapper
> > implementation.
>
> > If you've got a better solution, please code it up and let's talk about it.
>
> > On Mon, Sep 21, 2009 at 9:31 AM, glenn  wrote:
>
> > > Forgive me. I'm bringing up the subject of modularization in Lift
> > > under a new heading, but the last discussion was, sadly, all over the
> > > map and only served to emphasize the problem. So let me narrow it
> > > down, a bit, here, and ask:
>
> > > How is it possible to create two different snippet implementations, or
> > > two different models, one JPA and one not, or one using the mapper
> > > framework and another the record, and replace one with the other
> > > without having to recompile the application?
>
> > > We're not talking here about interface design - you still have to deal
> > > with boot.  And traits, as has been suggested by others...well, you'd
> > > better not expose them to the world outside your implementation, as
> > > any changes would require recompilation. In other words, you can't
> > > really use traits for your interface.
>
> > > To use Lift in the enterprise does require that teams be able to work
> > > independently, doesn't it.
>
> > > Glenn
>
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Git some:http://github.com/dpp
--~--~-~--~~~---~--~~
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] You are not banned from this group!!

2009-09-21 Thread David Pollak
Folks,
Google Groups has apparently sent messages to a number of folks posting to
the Lift group telling them that they were banned.  This is simply wrong and
sucks for the people who received the messages.

There has been one substantive poster who was so abusive on the Lift list
that he was banned (this was after a number of private emails to the party).
 We ban spammers (people posting links to adult sites, cheap knock-off Nike
shoes, etc.)  I accidentally banned a person once because I mis-read his
mail and it sounded like he was selling sneakers.

So, if you've received email stating you were banned, please forward the
email to me (yes, this is an exception to the rule of not contacting me
personally).  If you have a screen shot of being banned, please send it to
me.

I will gladly buy beer/coffee/food for anyone who gets such a notice.  I
sincerely apologize for any problems this is causing.

And, *YOU ARE NOT BANNED!!*

Thanks,

David

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

--~--~-~--~~~---~--~~
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: FacebookRestApi examples?

2009-09-21 Thread Keith K

FYI -- I switched over to the java-based API and things seem smoother.
(com.google.code.facebookapi). It sure is nice to have the ability to
use java jars in scala...

-Keith

On Sep 18, 1:49 pm, Keith K  wrote:
> Hi, Jon,
>
> Good to hear you're making progress.  I'm now able to get a session
> established, as well as a FacebookClient. However, when I try to use
> it as follows, I get NullPointerExceptions no matter which of teh
> following method calls I use.
>
>         val fbClient: FacebookClient = new FacebookClient
> (FacebookSession(fbSessionKey, 0L, fbUid))
>
>         fbClient !? GetInfo(List(123, 456, 789), Name, Hometown)
>
>         fbClient.getInfo(List(fbUid.toLong, 3534L), AboutMe,
> FirstName, LastName)
>
>         fbClient !? SendNotifications(hello, fbUid.toLong)
>
> They all result in :
>
> Message: java.lang.NullPointerException
>         net.liftweb.ext_api.facebook.FacebookClient$$anonfun$2.apply
> (FacebookRestApi.scala:46)
>         net.liftweb.ext_api.facebook.FacebookClient$$anonfun$2.apply
> (FacebookRestApi.scala:46)
>         scala.List.map(List.scala:812)
>         net.liftweb.ext_api.facebook.FacebookClient$.call
> (FacebookRestApi.scala:46)
>         net.liftweb.ext_api.facebook.FacebookClient.callMethod
> (FacebookRestApi.scala:148)
>         com.liftworkshop.snippet.GameUtil.fbTest(GameUtil.scala:110)
>
> Maybe this is because I am using an infinite session key, but I doubt
> it since the call is not even making it out to FB.
>
> If you happen to have some code you'd be willing to share (JSON or
> not) I'd love to take a look. Thanks,
>
> -Keith
>
> On Sep 17, 1:43 pm, jon  wrote:
>
> > Hi Keith,
>
> > You're missing a step in the process.  The auth_token needs to be
> > authenticated withfacebookbefore you request a session.  You would
> > do this by visiting a url like
>
> >http://www.facebook.com/login.php?api_key=KEY&auth_token=TOKENina
> > web browser.
>
> > I am using the FB API in a connect application, but have forked to
> > speak json and added a few extra calls.
>
> > - Jon
>
> > On Sep 15, 8:02 pm, Keith K  wrote:
>
> > > I don't see any thing obviously wrong in thefacebookpackage's method
> > > def genSignature(allParams: List[(String, Any)], secret: String).
>
> > > Wish I did!
>
> > > -Keith
>
> > > On Sep 15, 3:34 pm, Keith K  wrote:
>
> > > > Hello,
>
> > > > I am able to get a certain distance, to the point where FB gives me
> > > > back an authToken.  Here is my code.
>
> > > >         println("FacebookRestApi.apiKey = " + FacebookRestApi.apiKey);
>
> > > >         val respNode: Node = FacebookClient !? (AuthCreateToken);
> > > >         val authToken = respNode.text;
>
> > > >         println("authToken = " + authToken);
>
> > > >         val fbSession: Option[FacebookSession] =
> > > > FacebookSession.fromAuthToken(authToken)
>
> > > >         println("fbSession = " + fbSession.toString);
>
> > > > This doesn't include the code for the apiKey and secret. I see the
> > > > following output:
>
> > > > FacebookRestApi.apiKey = 25548077c8db93252a947a525d93be02
> > > > authToken = cd86be265bfcacf96a2dc392ffed874c
> > > > fbSession = None
>
> > > > Maybe as a scala newbie, I'm not handling the fbSession code properly,
> > > > but it's coming back with None, which seems weird to me.
>
> > > > On Sep 15, 2:02 pm, TylerWeir  wrote:
>
> > > > > I believe Jorge did the original implementation.
>
> > > > > I'm not sure if anyone else is using it.
>
> > > > > I'd suggest starting on your own app and post when you hit a stumbling
> > > > > block.  Someone on the list will take a look.
>
> > > > > On Sep 15, 4:46 pm, Keith K  wrote:
>
> > > > > > Hello,
>
> > > > > > Are there any code examples that use the LiftFacebookpackage?  I
> > > > > > encountered one in the Lift Book, but it is incomplete.  I have 
> > > > > > spent
> > > > > > a lot of time searching, but am only able to find the implementation
> > > > > > of it, not any unit test or some sample code to set up a session,
> > > > > >facebookclient, etc.  Thanks,
>
> > > > > > -Keith
>
>
--~--~-~--~~~---~--~~
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: HSQL support

2009-09-21 Thread sergey

Oh that's great!

I really forgot about h2.

Thank you!

David Pollak:
> On Sun, Sep 20, 2009 at 5:18 PM, sergey  wrote:
>
> >
> > Hi!
> >
> > My question is - does Lift support HSQL now?
> >
>
> No and we have no plans to support HSQL.  We support H2.
>
> Is there a particular reason that you need HSQL?
>
>
> > (I have the following error when trying to create connection to HSQL-
> > scala.MatchError: HSQL Database Engine)
> >
> > Thank you
> >
> > >
> >
>
>
> --
> 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

--~--~-~--~~~---~--~~
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: Code Plugability in Lift

2009-09-21 Thread glenn

David,

Does this mean you could write an entity class, like so:

class User(val firstName: String, val lastName: String, val userName:
String, val email: String, val password: String) with myTrait {...}

and it would be useable in either a JPA or mapper or record
implementation?

That would be the ticket.

Glenn

On Sep 21, 12:47 pm, David Pollak 
wrote:
> This is an impedance mis-match between POJOs (what JPA expects) and the
> richer fields that Mapper and Record have.
> I'm working on an interface 
> (http://github.com/dpp/liftweb/blob/master/lift-util/src/main/scala/ne...)
> that should be a base trait on everything in Lift that's gettable or
> gettable/settable.
>
> Then you could write a trait that looks like:
>
> trait MyThing {  def name: PSettableValueHolder[String]
> *
> *
> * def getName(): String = name.is*
> * def setName(in: String) = name.set(in)*
> *
> *
> * *
>
> }
>
> Such a trait should be able to bridge a JPA implementation and a Lift mapper
> implementation.
>
> If you've got a better solution, please code it up and let's talk about it.
>
>
>
> On Mon, Sep 21, 2009 at 9:31 AM, glenn  wrote:
>
> > Forgive me. I'm bringing up the subject of modularization in Lift
> > under a new heading, but the last discussion was, sadly, all over the
> > map and only served to emphasize the problem. So let me narrow it
> > down, a bit, here, and ask:
>
> > How is it possible to create two different snippet implementations, or
> > two different models, one JPA and one not, or one using the mapper
> > framework and another the record, and replace one with the other
> > without having to recompile the application?
>
> > We're not talking here about interface design - you still have to deal
> > with boot.  And traits, as has been suggested by others...well, you'd
> > better not expose them to the world outside your implementation, as
> > any changes would require recompilation. In other words, you can't
> > really use traits for your interface.
>
> > To use Lift in the enterprise does require that teams be able to work
> > independently, doesn't it.
>
> > Glenn
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Git some:http://github.com/dpp
--~--~-~--~~~---~--~~
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: Concurrent Web Service Requests?

2009-09-21 Thread espeed

On Sep 21, 2:33 pm, David Pollak 
wrote:
> Lift only uses event-based Actors for supporting CometActors.  All parts of
> the standard HTTP request/response cycle (except for the CometActors) are
> handled on a single thread.

Hi David -

Thanks for your quick response. If an app developer wants to
parallelize requests to Web services, what is the recommended way to
do this in Lift?

For example, in Rails you might do something like this, where the time
to gather all the data for the page is limited to the longest request
instead of the sum of all requests:

t1 = Thread.new do
  @news_data = NewsClient.getNewsData()
end
t2 = Thread.new do
  @advertisements = AdsClient.getAdsByLocation(zip)
end
t1.join
t2.join

Is there a Lift event-based actor API for this or what is the Lift way
of doing this?

Thanks again.

James



--~--~-~--~~~---~--~~
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: Dependency hell? More JPA trouble...

2009-09-21 Thread Charles F. Munat

That's super useful. Thanks! As I suspected, it's the joda-time jar. But 
luckily so far it seems to work with the other version of gclib.

Chas.

Aaron Valade wrote:
> On Sep 21, 2009, at 9:00 AM, Charles F. Munat wrote:
> 
>> Thanks. Pulling the JTA exception out and deleting the 2.0.2 jar  
>> worked.
>> Now to figure out what's adding that 2.0.2.jar...
> 
> Try running "mvn dependency:tree".  It will show you exactly what jars  
> are being pulled in by what dependencies.
> 
> - A
> 
> > 
> 

--~--~-~--~~~---~--~~
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: Concurrent Web Service Requests?

2009-09-21 Thread David Pollak
Lift only uses event-based Actors for supporting CometActors.  All parts of
the standard HTTP request/response cycle (except for the CometActors) are
handled on a single thread.
Having a single thread handle an HTTP request is not materially less
efficient in terms of multi-core CPU utilization than an event-based Actor.
 The reason for using event-based Actors is to not consume an OS thread
during very long wait periods.  Handing the thread back to the thread pool
means that you're not consuming stack or OS thread-based resources during a
long wait.  Waiting for a query to execute is not a long wait and one would
likely take more of a performance hit to put the thread back into the thread
pool and then get a new thread once the query was done than to block the
thread on IO during the query.

I should point out that JVM-based threading sits directly on top of OS
threading, so you can use as many cores as you have and have a fairness
algorithm that is OS based when you use JVM threads (which Scala does.)
 This contrasts markedly from Python and Ruby (MRI) which cannot use more
than 1 CPU per program (Python because of the global lock and Ruby because
them implementation is pure crap.)  Erlang implements its own threading
model and does better with IO than the JVM because its threading model is
optimized for giving slices to processes that have available IO resources.

When I did a recent benchmark of Lift, I was seeing that all 8 CPUs (4 cores
with 2 hyper-threads each) were being used to serve content because the
requests were parallel and the web container allocated one thread to each
request.

In terms of Lift's use of Scala Actors, it currently does use Scala Actors
for some pieces, but that's changing.  Given the persistent problems with
Scala actors, we are switching over to our own Actor implementation that
avoids Scala Actors' memory retention, etc. problems.

On Mon, Sep 21, 2009 at 12:01 PM, espeed  wrote:

>
> I have been researching Web frameworks that will take advantage of
> multi-core chips, and I'm trying to get a picture for how Lift uses
> Scala's event-based actors for incoming page requests and how an
> application developer would use actors in Lift to make concurrent Web
> service or DB requests.
>
> From what I understand, incoming page requests are initially handled
> by a thread and then passed off to an event-based actor so the thread
> isn't tied up during the entire page request. For pages that are
> composed of data from multiple Web services or multiple DB calls, the
> page's app developer would create multiple event-based actor requests
> to the different Web services or the DB, depending on where the data
> is located. Correct? -- And if so, is there an example of how to do
> this the Lift way?
>
> Also, does Lift use the Scala event-based actors library its own?
>
> Thank you.
>
> James
>
>
>
>
>
>
> >
>


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

--~--~-~--~~~---~--~~
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: Code Plugability in Lift

2009-09-21 Thread David Pollak
This is an impedance mis-match between POJOs (what JPA expects) and the
richer fields that Mapper and Record have.
I'm working on an interface (
http://github.com/dpp/liftweb/blob/master/lift-util/src/main/scala/net/liftweb/util/ValueHolder.scala)
that should be a base trait on everything in Lift that's gettable or
gettable/settable.

Then you could write a trait that looks like:

trait MyThing {  def name: PSettableValueHolder[String]
*
*
* def getName(): String = name.is*
* def setName(in: String) = name.set(in)*
*
*
* *
}


Such a trait should be able to bridge a JPA implementation and a Lift mapper
implementation.

If you've got a better solution, please code it up and let's talk about it.


On Mon, Sep 21, 2009 at 9:31 AM, glenn  wrote:

>
> Forgive me. I'm bringing up the subject of modularization in Lift
> under a new heading, but the last discussion was, sadly, all over the
> map and only served to emphasize the problem. So let me narrow it
> down, a bit, here, and ask:
>
> How is it possible to create two different snippet implementations, or
> two different models, one JPA and one not, or one using the mapper
> framework and another the record, and replace one with the other
> without having to recompile the application?
>
> We're not talking here about interface design - you still have to deal
> with boot.  And traits, as has been suggested by others...well, you'd
> better not expose them to the world outside your implementation, as
> any changes would require recompilation. In other words, you can't
> really use traits for your interface.
>
> To use Lift in the enterprise does require that teams be able to work
> independently, doesn't it.
>
> Glenn
>
>
>
> >
>


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

--~--~-~--~~~---~--~~
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: How to mixin both MegaProtoUser & CRUDify?

2009-09-21 Thread David Pollak
Gakkk... I'm not sure it can be done.  You're welcome to try different
combinations of abstract override, etc. in the traits and see if you can
come up with an elegant or at least workable solution.

On Mon, Sep 21, 2009 at 6:40 AM, Jeppe Nejsum Madsen wrote:

>
> Hi,
>
> For my User singleton object I would like to mixin both MegaProtoUser
> (to get self-service editing capabilities) as well as CRUDify (to get
> admin editing capabilities).
>
> Problem is, they both contain an editPath val. Is there any other option
> than pulling in either trait into my app and rename the val accordingly?
>
> /Jeppe
>
> >
>


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

--~--~-~--~~~---~--~~
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: Turning off garbage collection

2009-09-21 Thread Charles F. Munat

I agree that RTFM is bad. It pisses people off and they go away. I think 
David's policy is probably the best I've ever encountered on a list.

That said, Tim didn't really say RTFM and he did answer the question, he 
just voiced surprise that I didn't find it on my own. I was too 
exhausted and didn't want to waste more list time with the explanation 
(it would sound whiny anyway). But I probably should've looked harder. 
Then again, now Xavi and I know that per-page turning off the GC is not 
possible.

Man, three hours sleep is just not sufficient.

Chas.

David Pollak wrote:
> 
> 
> On Mon, Sep 21, 2009 at 1:41 AM, Timothy Perrett 
>  wrote:
> 
> 
> Chas,
> 
> This has been asked a million times on list - did you not try
> searching one of the many archives?
> 
> 
> Folks,
> 
> Our stated policy is that RTFM is not a valid response on this list. 
>  Folks, even Lift committers like Charles, are not expected to know 
> everything about Lift or follow every thread.
> 
> If someone asks the same question over and over again, has an area that 
> they've worked on extensively and asks a basic question about that area, 
> or in some other way clearly and repeatedly off-puts basic efforts on 
> their part to the rest of the list, we discuss it in private, either on 
> the Lift committers list or one on one with me.  We (usually I) then 
> privately let that person know that they have been consuming more 
> resources on this list than they have been giving back. 
> 
> Thanks,
> 
> David
> 
> 
> LiftRules.enableLiftGC = false;
> 
> Tim
> 
> 
> On 21 Sep 2009, at 08:37, Charles F. Munat wrote:
> 
>  >
>  > Is it possible to turn off garbage collection on an individual
> page if
>  > there's nothing to be garbage collected on that page? If so, how does
>  > one do it?
>  >
>  > Is it possible to turn off garbage collection completely? If so, how?
>  >
>  > I can't seem to find this anywhere.
>  >
>  > Chas.
>  >
>  > >
>  >
> 
> 
> 
> 
> 
> 
> -- 
> 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
> 
> > 

--~--~-~--~~~---~--~~
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: Turning off garbage collection

2009-09-21 Thread Charles F. Munat

Why a once every 75 second ajax request to the server if it's not 
necessary? But I can live with it.

Chas.

David Pollak wrote:
> 
> 
> On Mon, Sep 21, 2009 at 6:34 AM, Xavi Ramirez  > wrote:
> 
> 
> Doesn't that disable garbage collection for the whole site?
> 
> Is it possible to turn off on specific pages?
> 
> 
> It's currently not possible to turn of Lift's GUID <-> Function GC on a 
> page by page basis.
> 
> What's the use case for this?  Why is a once every 75 second ajax 
> request to the server causing issues?
>  
> 
> 
> Thanks,
> Xavi
> 
> On Mon, Sep 21, 2009 at 4:41 AM, Timothy Perrett
>  wrote:
>  >
>  > Chas,
>  >
>  > This has been asked a million times on list - did you not try
>  > searching one of the many archives?
>  >
>  > LiftRules.enableLiftGC = false;
>  >
>  > Tim
>  >
>  >
>  > On 21 Sep 2009, at 08:37, Charles F. Munat wrote:
>  >
>  >>
>  >> Is it possible to turn off garbage collection on an individual
> page if
>  >> there's nothing to be garbage collected on that page? If so, how
> does
>  >> one do it?
>  >>
>  >> Is it possible to turn off garbage collection completely? If so,
> how?
>  >>
>  >> I can't seem to find this anywhere.
>  >>
>  >> Chas.
>  >>
>  >> >
>  >>
>  >
>  >
>  > >
>  >
> 
> 
> 
> 
> 
> -- 
> 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
> 
> > 

--~--~-~--~~~---~--~~
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: Turning off garbage collection

2009-09-21 Thread Charles F. Munat

That was my original question, but as it turns out, I don't need it at 
all at the moment, so Tim's reply was sufficient. I would like to know 
the answer, though.

Chas.

Xavi Ramirez wrote:
> Doesn't that disable garbage collection for the whole site?
> 
> Is it possible to turn off on specific pages?
> 
> Thanks,
> Xavi
> 
> On Mon, Sep 21, 2009 at 4:41 AM, Timothy Perrett
>  wrote:
>> Chas,
>>
>> This has been asked a million times on list - did you not try
>> searching one of the many archives?
>>
>> LiftRules.enableLiftGC = false;
>>
>> Tim
>>
>>
>> On 21 Sep 2009, at 08:37, Charles F. Munat wrote:
>>
>>> Is it possible to turn off garbage collection on an individual page if
>>> there's nothing to be garbage collected on that page? If so, how does
>>> one do it?
>>>
>>> Is it possible to turn off garbage collection completely? If so, how?
>>>
>>> I can't seem to find this anywhere.
>>>
>>> Chas.
>>>
>>
> 
> > 
> 

--~--~-~--~~~---~--~~
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] Concurrent Web Service Requests?

2009-09-21 Thread espeed

I have been researching Web frameworks that will take advantage of
multi-core chips, and I'm trying to get a picture for how Lift uses
Scala's event-based actors for incoming page requests and how an
application developer would use actors in Lift to make concurrent Web
service or DB requests.

>From what I understand, incoming page requests are initially handled
by a thread and then passed off to an event-based actor so the thread
isn't tied up during the entire page request. For pages that are
composed of data from multiple Web services or multiple DB calls, the
page's app developer would create multiple event-based actor requests
to the different Web services or the DB, depending on where the data
is located. Correct? -- And if so, is there an example of how to do
this the Lift way?

Also, does Lift use the Scala event-based actors library its own?

Thank you.

James






--~--~-~--~~~---~--~~
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: Alternate Lift builds?

2009-09-21 Thread Kevin Wright
properties and profiles aren't mutually exclusive.
In a typical workflow, the property will just be another level of
indirection:
developer sets property which sets profile
instead of:
developer sets profile
So profiles are still the underlying mechanism for configuring units of
behaviour.



Why would we want this indirection then?

- The property can hold a string or numeric value that can be used
elsewhere, such as release versions.
- properties can be given default values if not expressly provided
- Properties can be provided by other mechanisms, not just command-line
arguments
- A single profile can be enabled by multiple properties
- Multiple profiles can be enabled from a single property





On Mon, Sep 21, 2009 at 3:59 PM, Ryan Donahue  wrote:

> The default profile we have is just so that a developer doesn't have to
> provide the release version when invoking maven on the command line.  I
> didn't want to require more typing :)
>
> > Taken that you can inject special project.version via -D but what about
> > having other dependent modules using that special version as well? You'd
> > still need to have them controlled by injecting special property.
> I'm not sure what you are asking.  Are you referring to submodules within
> one project?  If so, your module POMs would also use the property.  For
> example, our module POMs have:
>
> 
> ${releaseVersion}
> ...
> 
> ...
> ${releaseVersion}
> ...
>
> > In this scenario, apart from the pom.xml growing bigger, do you foresee
> > any distinct disadvantage opting for the profile path (instead of
> > property injection)?
> I think of profiles as way to adjust the build according to the environment
> in which the build is occurring (in my case developer's machine versus
> hudson CI) rather than for per-version/per-branch adjustment.  But, I don't
> see any disadvantages for using a profile other than release version seems
> to be one good candidate for singling out.  At utipu, passing a
> releaseVersion property to maven means we can quickly/easily make new
> branches that are ready for CI.  It also helps in cutting releases, because
> we don't have to make any commits to repository to change a release version
> from 1.0-SNAPSHOT to 1.0.
>
> I stated in my first response that this approach may or may not be
> appropriate for a framework for two reasons: (1) If you are building the
> framework from source and using the result in other projects locally, you
> might have to specify the version in the maven command line when building
> the framework (this really depends on what value you use for the
> releaseVersion in the default profile); and (2) I haven't seen anybody else
> do it this way.
>
>
>
>
> On Mon, Sep 21, 2009 at 10:10 AM, Indrajit Raychaudhuri <
> indraj...@gmail.com> wrote:
>
>>
>> Ryan,
>>
>> Your comment:
>>  > (we just use "dev" so local developers' .war files are built as
>> "utipu-dev.war")
>> made me perceive that you go for manual build for dev. But, yes, point
>> accepted.
>>
>> Taken that you can inject special project.version via -D but what about
>> having other dependent modules using that special version as well? You'd
>> still need to have them controlled by injecting special property.
>>
>> In this scenario, apart from the pom.xml growing bigger, do you foresee
>> any distinct disadvantage opting for the profile path (instead of
>> property injection)?
>>
>> Cheers, Indrajit
>>
>> On 21/09/09 7:18 PM, Ryan Donahue wrote:
>> > In fact it works for multiple Hudson builds.  We have serveral hudson
>> > builds running concurrently: one for the currently released version, one
>> > for the trunk, and others for customer-specific builds.  Only one maven
>> > profile is needed for the Hudson builds because these builds pass the
>> > version in to maven.
>> >
>> >
>> > On Mon, Sep 21, 2009 at 9:42 AM, Indrajit Raychaudhuri
>> > mailto:indraj...@gmail.com>> wrote:
>> >
>> >
>> > Ryan,
>> >
>> > Nice workflow! But I guess this works better when one is a Hudson
>> build
>> > and the other a manual build. What David was looking for is involves
>> two
>> > Hudson builds.
>> >
>> > Do you think this would serve the purpose using Maven profile (mvn
>> -P
>> > instead of mvn -D)?
>> >
>> http://github.com/dpp/liftweb/commit/45dc2e55bd37104aa2a56990914b38a1895b18f6
>> >
>> >
>> > Cheers, Indrajit
>> >
>> >
>> > On 21/09/09 6:28 PM, Ryan Donahue wrote:
>> >  >
>> >  > We pass the release version into maven from hudson.
>> >  >
>> >  > In the POM:
>> >  > ${releaseVersion}
>> >  >
>> >  > In the hudson build's maven goals and options field:
>> >  > -DreleaseVersion=1.1-SNAPSHOT
>> >  >
>> >  > Actually, we go a little further by creating a hudson build
>> property
>> >  > called releaseVersion.  Then the maven options include:
>> >  > -DreleaseVersion=${releaseVersion}.
>> >  > This results in a prompt whenever you do a manual build, allowing
>> you
>

[Lift] Code Plugability in Lift

2009-09-21 Thread glenn

Forgive me. I'm bringing up the subject of modularization in Lift
under a new heading, but the last discussion was, sadly, all over the
map and only served to emphasize the problem. So let me narrow it
down, a bit, here, and ask:

How is it possible to create two different snippet implementations, or
two different models, one JPA and one not, or one using the mapper
framework and another the record, and replace one with the other
without having to recompile the application?

We're not talking here about interface design - you still have to deal
with boot.  And traits, as has been suggested by others...well, you'd
better not expose them to the world outside your implementation, as
any changes would require recompilation. In other words, you can't
really use traits for your interface.

To use Lift in the enterprise does require that teams be able to work
independently, doesn't it.

Glenn



--~--~-~--~~~---~--~~
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: lift-json serialization

2009-09-21 Thread Joni Freeman

Oh, I see the point now and agree that this is useful. Let's add thia
to API. Thanks a lot!

Cheers Joni

On Sep 21, 6:52 pm, Tim Nelson  wrote:
> First of all thanks for a great library. I'm finding lift-json quite useful
> in my current project.
>
> I have a use case where I need to convert a case class into a JObject. The
> code is there, but it's wrapped inside the Serialization object. So, I took
> the liberty of moving the serialize method to the Extraction object and made
> it publicly accessible. You can see my changes here:
>
> http://github.com/eltimn/liftweb/commit/30310f4800b2aeb880b246e99dc79...
>
> It doesn't affect the current API at all and all tests passed. What do you
> think?
>
> Feel free to move it wherever you think it should be. As long as it's
> publicly accessible, I'll be happy.
>
> Thanks,
> Tim
--~--~-~--~~~---~--~~
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: lift-json serialization

2009-09-21 Thread Joni Freeman

Hi Tim,

Thanks for the kind words! The serialization functions should already
be publicly accessible, you just need to import them into scope:

import net.liftweb.json.Serialization.{read, write}

val ser = write(...)

val obj = read[..](ser)

Cheers Joni

On Sep 21, 6:52 pm, Tim Nelson  wrote:
> First of all thanks for a great library. I'm finding lift-json quite useful
> in my current project.
>
> I have a use case where I need to convert a case class into a JObject. The
> code is there, but it's wrapped inside the Serialization object. So, I took
> the liberty of moving the serialize method to the Extraction object and made
> it publicly accessible. You can see my changes here:
>
> http://github.com/eltimn/liftweb/commit/30310f4800b2aeb880b246e99dc79...
>
> It doesn't affect the current API at all and all tests passed. What do you
> think?
>
> Feel free to move it wherever you think it should be. As long as it's
> publicly accessible, I'll be happy.
>
> Thanks,
> Tim
--~--~-~--~~~---~--~~
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] lift-json serialization

2009-09-21 Thread Tim Nelson
First of all thanks for a great library. I'm finding lift-json quite useful
in my current project.

I have a use case where I need to convert a case class into a JObject. The
code is there, but it's wrapped inside the Serialization object. So, I took
the liberty of moving the serialize method to the Extraction object and made
it publicly accessible. You can see my changes here:

http://github.com/eltimn/liftweb/commit/30310f4800b2aeb880b246e99dc79031d0373d08

It doesn't affect the current API at all and all tests passed. What do you
think?

Feel free to move it wherever you think it should be. As long as it's
publicly accessible, I'll be happy.

Thanks,
Tim

--~--~-~--~~~---~--~~
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: Alternate Lift builds?

2009-09-21 Thread Ryan Donahue
The default profile we have is just so that a developer doesn't have to
provide the release version when invoking maven on the command line.  I
didn't want to require more typing :)

> Taken that you can inject special project.version via -D but what about
> having other dependent modules using that special version as well? You'd
> still need to have them controlled by injecting special property.
I'm not sure what you are asking.  Are you referring to submodules within
one project?  If so, your module POMs would also use the property.  For
example, our module POMs have:


${releaseVersion}
...

...
${releaseVersion}
...

> In this scenario, apart from the pom.xml growing bigger, do you foresee
> any distinct disadvantage opting for the profile path (instead of
> property injection)?
I think of profiles as way to adjust the build according to the environment
in which the build is occurring (in my case developer's machine versus
hudson CI) rather than for per-version/per-branch adjustment.  But, I don't
see any disadvantages for using a profile other than release version seems
to be one good candidate for singling out.  At utipu, passing a
releaseVersion property to maven means we can quickly/easily make new
branches that are ready for CI.  It also helps in cutting releases, because
we don't have to make any commits to repository to change a release version
from 1.0-SNAPSHOT to 1.0.

I stated in my first response that this approach may or may not be
appropriate for a framework for two reasons: (1) If you are building the
framework from source and using the result in other projects locally, you
might have to specify the version in the maven command line when building
the framework (this really depends on what value you use for the
releaseVersion in the default profile); and (2) I haven't seen anybody else
do it this way.




On Mon, Sep 21, 2009 at 10:10 AM, Indrajit Raychaudhuri  wrote:

>
> Ryan,
>
> Your comment:
>  > (we just use "dev" so local developers' .war files are built as
> "utipu-dev.war")
> made me perceive that you go for manual build for dev. But, yes, point
> accepted.
>
> Taken that you can inject special project.version via -D but what about
> having other dependent modules using that special version as well? You'd
> still need to have them controlled by injecting special property.
>
> In this scenario, apart from the pom.xml growing bigger, do you foresee
> any distinct disadvantage opting for the profile path (instead of
> property injection)?
>
> Cheers, Indrajit
>
> On 21/09/09 7:18 PM, Ryan Donahue wrote:
> > In fact it works for multiple Hudson builds.  We have serveral hudson
> > builds running concurrently: one for the currently released version, one
> > for the trunk, and others for customer-specific builds.  Only one maven
> > profile is needed for the Hudson builds because these builds pass the
> > version in to maven.
> >
> >
> > On Mon, Sep 21, 2009 at 9:42 AM, Indrajit Raychaudhuri
> > mailto:indraj...@gmail.com>> wrote:
> >
> >
> > Ryan,
> >
> > Nice workflow! But I guess this works better when one is a Hudson
> build
> > and the other a manual build. What David was looking for is involves
> two
> > Hudson builds.
> >
> > Do you think this would serve the purpose using Maven profile (mvn -P
> > instead of mvn -D)?
> >
> http://github.com/dpp/liftweb/commit/45dc2e55bd37104aa2a56990914b38a1895b18f6
> >
> >
> > Cheers, Indrajit
> >
> >
> > On 21/09/09 6:28 PM, Ryan Donahue wrote:
> >  >
> >  > We pass the release version into maven from hudson.
> >  >
> >  > In the POM:
> >  > ${releaseVersion}
> >  >
> >  > In the hudson build's maven goals and options field:
> >  > -DreleaseVersion=1.1-SNAPSHOT
> >  >
> >  > Actually, we go a little further by creating a hudson build
> property
> >  > called releaseVersion.  Then the maven options include:
> >  > -DreleaseVersion=${releaseVersion}.
> >  > This results in a prompt whenever you do a manual build, allowing
> you
> >  > to change the releaseVersion property (good for release builds).
> >  >
> >  > If you go this route, you'll want to have at least 2 profiles in
> the
> >  > POM, one for hudson builds invoked when the releaseVersion
> > property is
> >  > present and a default profile for developers that sets the
> >  > releaseVersion property to some default (we just use "dev" so
> local
> >  > developers' .war files are built as "utipu-dev.war").  We use this
> >  > strategy for utipu.com  (not a lift app) as
> > well as for our internal
> >  > lift apps.  It works well for us, but may or may not be
> appropriate
> >  > for a framework build.
> >  >
> >  >
> >  >
> >  > On Sep 18, 7:38 pm, David Pollak > >
> >  > wrote:
> >  >> Folks,
> >  >> Is there a clean and easy way that anyone knows of to have Hudso

[Lift] Re: Dependency hell? More JPA trouble...

2009-09-21 Thread Aaron Valade

On Sep 21, 2009, at 9:00 AM, Charles F. Munat wrote:

> Thanks. Pulling the JTA exception out and deleting the 2.0.2 jar  
> worked.
> Now to figure out what's adding that 2.0.2.jar...

Try running "mvn dependency:tree".  It will show you exactly what jars  
are being pulled in by what dependencies.

- A

--~--~-~--~~~---~--~~
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: Turning off garbage collection

2009-09-21 Thread David Pollak
On Mon, Sep 21, 2009 at 1:41 AM, Timothy Perrett wrote:

>
> Chas,
>
> This has been asked a million times on list - did you not try
> searching one of the many archives?
>

Folks,

Our stated policy is that RTFM is not a valid response on this list.  Folks,
even Lift committers like Charles, are not expected to know everything about
Lift or follow every thread.

If someone asks the same question over and over again, has an area that
they've worked on extensively and asks a basic question about that area, or
in some other way clearly and repeatedly off-puts basic efforts on their
part to the rest of the list, we discuss it in private, either on the Lift
committers list or one on one with me.  We (usually I) then privately let
that person know that they have been consuming more resources on this list
than they have been giving back.

Thanks,

David


> LiftRules.enableLiftGC = false;
>
> Tim
>
>
> On 21 Sep 2009, at 08:37, Charles F. Munat wrote:
>
> >
> > Is it possible to turn off garbage collection on an individual page if
> > there's nothing to be garbage collected on that page? If so, how does
> > one do it?
> >
> > Is it possible to turn off garbage collection completely? If so, how?
> >
> > I can't seem to find this anywhere.
> >
> > Chas.
> >
> > >
> >
>
>
> >
>


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

--~--~-~--~~~---~--~~
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: Turning off garbage collection

2009-09-21 Thread David Pollak
On Mon, Sep 21, 2009 at 7:11 AM, Xavi Ramirez  wrote:

>
> No use case.  Just curious...
>

K -- I've there's a reasonable use case (e.g., this page is for mobile
devices where a ping is costly), open a ticket and we'll work on it.


>
> On Mon, Sep 21, 2009 at 10:04 AM, David Pollak
>  wrote:
> >
> >
> > On Mon, Sep 21, 2009 at 6:34 AM, Xavi Ramirez 
> wrote:
> >>
> >> Doesn't that disable garbage collection for the whole site?
> >>
> >> Is it possible to turn off on specific pages?
> >
> > It's currently not possible to turn of Lift's GUID <-> Function GC on a
> page
> > by page basis.
> > What's the use case for this?  Why is a once every 75 second ajax request
> to
> > the server causing issues?
> >
> >>
> >> Thanks,
> >> Xavi
> >>
> >> On Mon, Sep 21, 2009 at 4:41 AM, Timothy Perrett
> >>  wrote:
> >> >
> >> > Chas,
> >> >
> >> > This has been asked a million times on list - did you not try
> >> > searching one of the many archives?
> >> >
> >> > LiftRules.enableLiftGC = false;
> >> >
> >> > Tim
> >> >
> >> >
> >> > On 21 Sep 2009, at 08:37, Charles F. Munat wrote:
> >> >
> >> >>
> >> >> Is it possible to turn off garbage collection on an individual page
> if
> >> >> there's nothing to be garbage collected on that page? If so, how does
> >> >> one do it?
> >> >>
> >> >> Is it possible to turn off garbage collection completely? If so, how?
> >> >>
> >> >> I can't seem to find this anywhere.
> >> >>
> >> >> Chas.
> >> >>
> >> >> >
> >> >>
> >> >
> >> >
> >> > >
> >> >
> >>
> >>
> >
> >
> >
> > --
> > 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
> >
> > >
> >
>
> >
>


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

--~--~-~--~~~---~--~~
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: Turning off garbage collection

2009-09-21 Thread Xavi Ramirez

No use case.  Just curious...

On Mon, Sep 21, 2009 at 10:04 AM, David Pollak
 wrote:
>
>
> On Mon, Sep 21, 2009 at 6:34 AM, Xavi Ramirez  wrote:
>>
>> Doesn't that disable garbage collection for the whole site?
>>
>> Is it possible to turn off on specific pages?
>
> It's currently not possible to turn of Lift's GUID <-> Function GC on a page
> by page basis.
> What's the use case for this?  Why is a once every 75 second ajax request to
> the server causing issues?
>
>>
>> Thanks,
>> Xavi
>>
>> On Mon, Sep 21, 2009 at 4:41 AM, Timothy Perrett
>>  wrote:
>> >
>> > Chas,
>> >
>> > This has been asked a million times on list - did you not try
>> > searching one of the many archives?
>> >
>> > LiftRules.enableLiftGC = false;
>> >
>> > Tim
>> >
>> >
>> > On 21 Sep 2009, at 08:37, Charles F. Munat wrote:
>> >
>> >>
>> >> Is it possible to turn off garbage collection on an individual page if
>> >> there's nothing to be garbage collected on that page? If so, how does
>> >> one do it?
>> >>
>> >> Is it possible to turn off garbage collection completely? If so, how?
>> >>
>> >> I can't seem to find this anywhere.
>> >>
>> >> Chas.
>> >>
>> >> >
>> >>
>> >
>> >
>> > >
>> >
>>
>>
>
>
>
> --
> 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
>
> >
>

--~--~-~--~~~---~--~~
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: Alternate Lift builds?

2009-09-21 Thread Indrajit Raychaudhuri

Ryan,

Your comment:
 > (we just use "dev" so local developers' .war files are built as 
"utipu-dev.war")
made me perceive that you go for manual build for dev. But, yes, point 
accepted.

Taken that you can inject special project.version via -D but what about 
having other dependent modules using that special version as well? You'd 
still need to have them controlled by injecting special property.

In this scenario, apart from the pom.xml growing bigger, do you foresee 
any distinct disadvantage opting for the profile path (instead of 
property injection)?

Cheers, Indrajit

On 21/09/09 7:18 PM, Ryan Donahue wrote:
> In fact it works for multiple Hudson builds.  We have serveral hudson
> builds running concurrently: one for the currently released version, one
> for the trunk, and others for customer-specific builds.  Only one maven
> profile is needed for the Hudson builds because these builds pass the
> version in to maven.
>
>
> On Mon, Sep 21, 2009 at 9:42 AM, Indrajit Raychaudhuri
> mailto:indraj...@gmail.com>> wrote:
>
>
> Ryan,
>
> Nice workflow! But I guess this works better when one is a Hudson build
> and the other a manual build. What David was looking for is involves two
> Hudson builds.
>
> Do you think this would serve the purpose using Maven profile (mvn -P
> instead of mvn -D)?
> 
> http://github.com/dpp/liftweb/commit/45dc2e55bd37104aa2a56990914b38a1895b18f6
>
>
> Cheers, Indrajit
>
>
> On 21/09/09 6:28 PM, Ryan Donahue wrote:
>  >
>  > We pass the release version into maven from hudson.
>  >
>  > In the POM:
>  > ${releaseVersion}
>  >
>  > In the hudson build's maven goals and options field:
>  > -DreleaseVersion=1.1-SNAPSHOT
>  >
>  > Actually, we go a little further by creating a hudson build property
>  > called releaseVersion.  Then the maven options include:
>  > -DreleaseVersion=${releaseVersion}.
>  > This results in a prompt whenever you do a manual build, allowing you
>  > to change the releaseVersion property (good for release builds).
>  >
>  > If you go this route, you'll want to have at least 2 profiles in the
>  > POM, one for hudson builds invoked when the releaseVersion
> property is
>  > present and a default profile for developers that sets the
>  > releaseVersion property to some default (we just use "dev" so local
>  > developers' .war files are built as "utipu-dev.war").  We use this
>  > strategy for utipu.com  (not a lift app) as
> well as for our internal
>  > lift apps.  It works well for us, but may or may not be appropriate
>  > for a framework build.
>  >
>  >
>  >
>  > On Sep 18, 7:38 pm, David Pollak >
>  > wrote:
>  >> Folks,
>  >> Is there a clean and easy way that anyone knows of to have Hudson do
>  >> alternate builds from different Git branches and put them in
> SNAPSHOTS with
>  >> different versions (e.g., 1.1-SNAPSHOT_DPP_ACTOR)?
>  >>
>  >> I am making some wholesale changes to Lift's use of Actors
> (basically
>  >> getting rid of all Scala Actors and creating some simple traits
> that Akka or
>  >> other systems can implement so that Lift-based systems can
> choose different
>  >> Actor implementations.
>  >>
>  >> Given that these changes are non-trivial, I'd like to run a
> parallel version
>  >> of Lift for at least a few weeks and get feedback on the API
> changes and
>  >> performance before committing the code to the main branch, but I
> want the
>  >> code to available in Hudson.
>  >>
>  >> So... any ideas?
>  >>
>  >> Thanks,
>  >>
>  >> David
>  >>
>  >> --
>  >> Lift, the simply functional web frameworkhttp://liftweb.net
> 
>  >> Beginning Scalahttp://www.apress.com/book/view/1430219890
> 
>  >> Follow me:http://twitter.com/dpp
>  >> Git some:http://github.com/dpp
>  > >
>
>
>
>
> >

--~--~-~--~~~---~--~~
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: Turning off garbage collection

2009-09-21 Thread David Pollak
On Mon, Sep 21, 2009 at 6:34 AM, Xavi Ramirez  wrote:

>
> Doesn't that disable garbage collection for the whole site?
>
> Is it possible to turn off on specific pages?
>

It's currently not possible to turn of Lift's GUID <-> Function GC on a page
by page basis.

What's the use case for this?  Why is a once every 75 second ajax request to
the server causing issues?


>
> Thanks,
> Xavi
>
> On Mon, Sep 21, 2009 at 4:41 AM, Timothy Perrett
>  wrote:
> >
> > Chas,
> >
> > This has been asked a million times on list - did you not try
> > searching one of the many archives?
> >
> > LiftRules.enableLiftGC = false;
> >
> > Tim
> >
> >
> > On 21 Sep 2009, at 08:37, Charles F. Munat wrote:
> >
> >>
> >> Is it possible to turn off garbage collection on an individual page if
> >> there's nothing to be garbage collected on that page? If so, how does
> >> one do it?
> >>
> >> Is it possible to turn off garbage collection completely? If so, how?
> >>
> >> I can't seem to find this anywhere.
> >>
> >> Chas.
> >>
> >> >
> >>
> >
> >
> > >
> >
>
> >
>


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

--~--~-~--~~~---~--~~
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: Alternate Lift builds?

2009-09-21 Thread Ryan Donahue
In fact it works for multiple Hudson builds.  We have serveral hudson builds
running concurrently: one for the currently released version, one for the
trunk, and others for customer-specific builds.  Only one maven profile is
needed for the Hudson builds because these builds pass the version in to
maven.


On Mon, Sep 21, 2009 at 9:42 AM, Indrajit Raychaudhuri
wrote:

>
> Ryan,
>
> Nice workflow! But I guess this works better when one is a Hudson build
> and the other a manual build. What David was looking for is involves two
> Hudson builds.
>
> Do you think this would serve the purpose using Maven profile (mvn -P
> instead of mvn -D)?
>
> http://github.com/dpp/liftweb/commit/45dc2e55bd37104aa2a56990914b38a1895b18f6
>
>
> Cheers, Indrajit
>
>
> On 21/09/09 6:28 PM, Ryan Donahue wrote:
> >
> > We pass the release version into maven from hudson.
> >
> > In the POM:
> > ${releaseVersion}
> >
> > In the hudson build's maven goals and options field:
> > -DreleaseVersion=1.1-SNAPSHOT
> >
> > Actually, we go a little further by creating a hudson build property
> > called releaseVersion.  Then the maven options include:
> > -DreleaseVersion=${releaseVersion}.
> > This results in a prompt whenever you do a manual build, allowing you
> > to change the releaseVersion property (good for release builds).
> >
> > If you go this route, you'll want to have at least 2 profiles in the
> > POM, one for hudson builds invoked when the releaseVersion property is
> > present and a default profile for developers that sets the
> > releaseVersion property to some default (we just use "dev" so local
> > developers' .war files are built as "utipu-dev.war").  We use this
> > strategy for utipu.com (not a lift app) as well as for our internal
> > lift apps.  It works well for us, but may or may not be appropriate
> > for a framework build.
> >
> >
> >
> > On Sep 18, 7:38 pm, David Pollak
> > wrote:
> >> Folks,
> >> Is there a clean and easy way that anyone knows of to have Hudson do
> >> alternate builds from different Git branches and put them in SNAPSHOTS
> with
> >> different versions (e.g., 1.1-SNAPSHOT_DPP_ACTOR)?
> >>
> >> I am making some wholesale changes to Lift's use of Actors (basically
> >> getting rid of all Scala Actors and creating some simple traits that
> Akka or
> >> other systems can implement so that Lift-based systems can choose
> different
> >> Actor implementations.
> >>
> >> Given that these changes are non-trivial, I'd like to run a parallel
> version
> >> of Lift for at least a few weeks and get feedback on the API changes and
> >> performance before committing the code to the main branch, but I want
> the
> >> code to available in Hudson.
> >>
> >> So... any ideas?
> >>
> >> Thanks,
> >>
> >> David
> >>
> >> --
> >> Lift, the simply functional web frameworkhttp://liftweb.net
> >> Beginning Scalahttp://www.apress.com/book/view/1430219890
> >> Follow me:http://twitter.com/dpp
> >> Git some:http://github.com/dpp
> > >
>
> >
>

--~--~-~--~~~---~--~~
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: Alternate Lift builds?

2009-09-21 Thread Indrajit Raychaudhuri

Ryan,

Nice workflow! But I guess this works better when one is a Hudson build 
and the other a manual build. What David was looking for is involves two 
Hudson builds.

Do you think this would serve the purpose using Maven profile (mvn -P 
instead of mvn -D)?
http://github.com/dpp/liftweb/commit/45dc2e55bd37104aa2a56990914b38a1895b18f6 


Cheers, Indrajit


On 21/09/09 6:28 PM, Ryan Donahue wrote:
>
> We pass the release version into maven from hudson.
>
> In the POM:
> ${releaseVersion}
>
> In the hudson build's maven goals and options field:
> -DreleaseVersion=1.1-SNAPSHOT
>
> Actually, we go a little further by creating a hudson build property
> called releaseVersion.  Then the maven options include:
> -DreleaseVersion=${releaseVersion}.
> This results in a prompt whenever you do a manual build, allowing you
> to change the releaseVersion property (good for release builds).
>
> If you go this route, you'll want to have at least 2 profiles in the
> POM, one for hudson builds invoked when the releaseVersion property is
> present and a default profile for developers that sets the
> releaseVersion property to some default (we just use "dev" so local
> developers' .war files are built as "utipu-dev.war").  We use this
> strategy for utipu.com (not a lift app) as well as for our internal
> lift apps.  It works well for us, but may or may not be appropriate
> for a framework build.
>
>
>
> On Sep 18, 7:38 pm, David Pollak
> wrote:
>> Folks,
>> Is there a clean and easy way that anyone knows of to have Hudson do
>> alternate builds from different Git branches and put them in SNAPSHOTS with
>> different versions (e.g., 1.1-SNAPSHOT_DPP_ACTOR)?
>>
>> I am making some wholesale changes to Lift's use of Actors (basically
>> getting rid of all Scala Actors and creating some simple traits that Akka or
>> other systems can implement so that Lift-based systems can choose different
>> Actor implementations.
>>
>> Given that these changes are non-trivial, I'd like to run a parallel version
>> of Lift for at least a few weeks and get feedback on the API changes and
>> performance before committing the code to the main branch, but I want the
>> code to available in Hudson.
>>
>> So... any ideas?
>>
>> Thanks,
>>
>> David
>>
>> --
>> Lift, the simply functional web frameworkhttp://liftweb.net
>> Beginning Scalahttp://www.apress.com/book/view/1430219890
>> Follow me:http://twitter.com/dpp
>> Git some:http://github.com/dpp
> >

--~--~-~--~~~---~--~~
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] How to mixin both MegaProtoUser & CRUDify?

2009-09-21 Thread Jeppe Nejsum Madsen

Hi,

For my User singleton object I would like to mixin both MegaProtoUser
(to get self-service editing capabilities) as well as CRUDify (to get
admin editing capabilities). 

Problem is, they both contain an editPath val. Is there any other option
than pulling in either trait into my app and rename the val accordingly?

/Jeppe

--~--~-~--~~~---~--~~
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: Turning off garbage collection

2009-09-21 Thread Xavi Ramirez

Doesn't that disable garbage collection for the whole site?

Is it possible to turn off on specific pages?

Thanks,
Xavi

On Mon, Sep 21, 2009 at 4:41 AM, Timothy Perrett
 wrote:
>
> Chas,
>
> This has been asked a million times on list - did you not try
> searching one of the many archives?
>
> LiftRules.enableLiftGC = false;
>
> Tim
>
>
> On 21 Sep 2009, at 08:37, Charles F. Munat wrote:
>
>>
>> Is it possible to turn off garbage collection on an individual page if
>> there's nothing to be garbage collected on that page? If so, how does
>> one do it?
>>
>> Is it possible to turn off garbage collection completely? If so, how?
>>
>> I can't seem to find this anywhere.
>>
>> Chas.
>>
>> >
>>
>
>
> >
>

--~--~-~--~~~---~--~~
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: Dependency hell? More JPA trouble...

2009-09-21 Thread Charles F. Munat

Thanks. Pulling the JTA exception out and deleting the 2.0.2 jar worked. 
Now to figure out what's adding that 2.0.2.jar...

Chas.

Viktor Klang wrote:
> The first two looks like jar version mismatch problems, and hte last 
> indicates a missing dependency on the Java Transaction Api
> 
> On Mon, Sep 21, 2009 at 2:24 PM, Charles F. Munat  > wrote:
> 
> 
> I am getting the following error. I've been up all night trying to track
> this down with no luck. It seems it has something to do with the GCLib
> dependency (and, in fact, when I look at the JavaDocs for GCLib, there
> is no such method).
> 
> In the target WEB-INF/lib directory, I find:
> 
> cglib-2.1_3.jar
> cglib-full-2.0.2.jar
> 
> Message: java.lang.NoSuchMethodError:
> net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V
> 
> org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:126)
> 
> org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
> 
> org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
> 
> org.hibernate.tuple.entity.AbstractEntityTuplizer.(AbstractEntityTuplizer.java:135)
> 
> org.hibernate.tuple.entity.PojoEntityTuplizer.(PojoEntityTuplizer.java:55)
> 
> org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.(EntityEntityModeToTuplizerMapping.java:56)
> 
> org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:295)
> 
> org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:434)
> 
> org.hibernate.persister.entity.JoinedSubclassEntityPersister.(JoinedSubclassEntityPersister.java:91)
> 
> org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58)
> 
> org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:226)
> 
> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
> 
> org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
> 
> org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
> 
> org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
> 
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
> 
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
>org.scala_libs.jpa.LocalEMF.(LocalEM.scala:55)
>org.scala_libs.jpa.LocalEMF.(LocalEM.scala:52)
>com.munat.tales.model.Model$.(Model.scala:23)
>com.munat.tales.model.Model$.(Model.scala)
> etc.
> 
> If I eliminate cglib-2.1_3.jar, I get this:
> 
> Message: java.lang.NoSuchMethodError:
> net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V
> 
> org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:126)
> 
> org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
> 
> org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
> 
> org.hibernate.tuple.entity.AbstractEntityTuplizer.(AbstractEntityTuplizer.java:135)
> 
> org.hibernate.tuple.entity.PojoEntityTuplizer.(PojoEntityTuplizer.java:55)
> 
> org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.(EntityEntityModeToTuplizerMapping.java:56)
> 
> org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:295)
> 
> org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:434)
> 
> org.hibernate.persister.entity.JoinedSubclassEntityPersister.(JoinedSubclassEntityPersister.java:91)
> 
> org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58)
> 
> org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:226)
> 
> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
> 
> org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
> 
> org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
> 
> org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
> 
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
> 
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
>org.scala_libs.jpa.LocalEMF.(LocalEM.scala:55)
>org.scala_libs.jpa.LocalEMF.(LocalEM.scala:52)
> etc.
> 
> If I eliminate the cglib-full-2.0.2.jar I get this:
> 
> Message: java.lang.NoClassDefFoundError:
> javax/transaction/SystemException
> 
> org.hibernate.ejb.EntityManagerFactoryImpl

[Lift] Re: Alternate Lift builds?

2009-09-21 Thread Ryan Donahue

We pass the release version into maven from hudson.

In the POM:
${releaseVersion}

In the hudson build's maven goals and options field:
-DreleaseVersion=1.1-SNAPSHOT

Actually, we go a little further by creating a hudson build property
called releaseVersion.  Then the maven options include:
-DreleaseVersion=${releaseVersion}.
This results in a prompt whenever you do a manual build, allowing you
to change the releaseVersion property (good for release builds).

If you go this route, you'll want to have at least 2 profiles in the
POM, one for hudson builds invoked when the releaseVersion property is
present and a default profile for developers that sets the
releaseVersion property to some default (we just use "dev" so local
developers' .war files are built as "utipu-dev.war").  We use this
strategy for utipu.com (not a lift app) as well as for our internal
lift apps.  It works well for us, but may or may not be appropriate
for a framework build.



On Sep 18, 7:38 pm, David Pollak 
wrote:
> Folks,
> Is there a clean and easy way that anyone knows of to have Hudson do
> alternate builds from different Git branches and put them in SNAPSHOTS with
> different versions (e.g., 1.1-SNAPSHOT_DPP_ACTOR)?
>
> I am making some wholesale changes to Lift's use of Actors (basically
> getting rid of all Scala Actors and creating some simple traits that Akka or
> other systems can implement so that Lift-based systems can choose different
> Actor implementations.
>
> Given that these changes are non-trivial, I'd like to run a parallel version
> of Lift for at least a few weeks and get feedback on the API changes and
> performance before committing the code to the main branch, but I want the
> code to available in Hudson.
>
> So... any ideas?
>
> Thanks,
>
> David
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Git some:http://github.com/dpp
--~--~-~--~~~---~--~~
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: Dependency hell? More JPA trouble...

2009-09-21 Thread Viktor Klang
The first two looks like jar version mismatch problems, and hte last
indicates a missing dependency on the Java Transaction Api

On Mon, Sep 21, 2009 at 2:24 PM, Charles F. Munat  wrote:

>
> I am getting the following error. I've been up all night trying to track
> this down with no luck. It seems it has something to do with the GCLib
> dependency (and, in fact, when I look at the JavaDocs for GCLib, there
> is no such method).
>
> In the target WEB-INF/lib directory, I find:
>
> cglib-2.1_3.jar
> cglib-full-2.0.2.jar
>
> Message: java.lang.NoSuchMethodError:
> net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V
>
> org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:126)
>
> org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
>
> org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
>
> org.hibernate.tuple.entity.AbstractEntityTuplizer.(AbstractEntityTuplizer.java:135)
>
> org.hibernate.tuple.entity.PojoEntityTuplizer.(PojoEntityTuplizer.java:55)
>
> org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.(EntityEntityModeToTuplizerMapping.java:56)
>
> org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:295)
>
> org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:434)
>
> org.hibernate.persister.entity.JoinedSubclassEntityPersister.(JoinedSubclassEntityPersister.java:91)
>
> org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58)
>
> org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:226)
>
> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
>
> org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
>
> org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
>
> org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
>org.scala_libs.jpa.LocalEMF.(LocalEM.scala:55)
>org.scala_libs.jpa.LocalEMF.(LocalEM.scala:52)
>com.munat.tales.model.Model$.(Model.scala:23)
>com.munat.tales.model.Model$.(Model.scala)
> etc.
>
> If I eliminate cglib-2.1_3.jar, I get this:
>
> Message: java.lang.NoSuchMethodError:
> net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V
>
> org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:126)
>
> org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
>
> org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
>
> org.hibernate.tuple.entity.AbstractEntityTuplizer.(AbstractEntityTuplizer.java:135)
>
> org.hibernate.tuple.entity.PojoEntityTuplizer.(PojoEntityTuplizer.java:55)
>
> org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.(EntityEntityModeToTuplizerMapping.java:56)
>
> org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:295)
>
> org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:434)
>
> org.hibernate.persister.entity.JoinedSubclassEntityPersister.(JoinedSubclassEntityPersister.java:91)
>
> org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58)
>
> org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:226)
>
> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
>
> org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
>
> org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
>
> org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
>org.scala_libs.jpa.LocalEMF.(LocalEM.scala:55)
>org.scala_libs.jpa.LocalEMF.(LocalEM.scala:52)
> etc.
>
> If I eliminate the cglib-full-2.0.2.jar I get this:
>
> Message: java.lang.NoClassDefFoundError: javax/transaction/SystemException
>
> org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:37)
>
> org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:32)
>org.scala_libs.jpa.LocalEMF.openEM(LocalEM.scala:62)
> net.liftweb.jpa.RequestVarEM$class.protected$openEM(RequestVarEM.scala:41)
> etc.
>
> Here is my master pom.xml: (I'm using scala 2.7.5)
>
>   
> 
>   org.scala-lang
>   scala-compiler
>   ${scala.version}
>   test
> 
>   

[Lift] Dependency hell? More JPA trouble...

2009-09-21 Thread Charles F. Munat

I am getting the following error. I've been up all night trying to track 
this down with no luck. It seems it has something to do with the GCLib 
dependency (and, in fact, when I look at the JavaDocs for GCLib, there 
is no such method).

In the target WEB-INF/lib directory, I find:

cglib-2.1_3.jar
cglib-full-2.0.2.jar

Message: java.lang.NoSuchMethodError: 
net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:126)
org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
org.hibernate.tuple.entity.AbstractEntityTuplizer.(AbstractEntityTuplizer.java:135)
org.hibernate.tuple.entity.PojoEntityTuplizer.(PojoEntityTuplizer.java:55)
org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.(EntityEntityModeToTuplizerMapping.java:56)
org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:295)
org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:434)
org.hibernate.persister.entity.JoinedSubclassEntityPersister.(JoinedSubclassEntityPersister.java:91)
org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58)
org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:226)
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
org.scala_libs.jpa.LocalEMF.(LocalEM.scala:55)
org.scala_libs.jpa.LocalEMF.(LocalEM.scala:52)
com.munat.tales.model.Model$.(Model.scala:23)
com.munat.tales.model.Model$.(Model.scala)
etc.

If I eliminate cglib-2.1_3.jar, I get this:

Message: java.lang.NoSuchMethodError: 
net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:126)
org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
org.hibernate.tuple.entity.AbstractEntityTuplizer.(AbstractEntityTuplizer.java:135)
org.hibernate.tuple.entity.PojoEntityTuplizer.(PojoEntityTuplizer.java:55)
org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.(EntityEntityModeToTuplizerMapping.java:56)
org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:295)
org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:434)
org.hibernate.persister.entity.JoinedSubclassEntityPersister.(JoinedSubclassEntityPersister.java:91)
org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58)
org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:226)
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
org.scala_libs.jpa.LocalEMF.(LocalEM.scala:55)
org.scala_libs.jpa.LocalEMF.(LocalEM.scala:52)
etc.

If I eliminate the cglib-full-2.0.2.jar I get this:

Message: java.lang.NoClassDefFoundError: javax/transaction/SystemException
org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:37)
org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:32)
org.scala_libs.jpa.LocalEMF.openEM(LocalEM.scala:62)
net.liftweb.jpa.RequestVarEM$class.protected$openEM(RequestVarEM.scala:41)
etc.

Here is my master pom.xml: (I'm using scala 2.7.5)

   
 
   org.scala-lang
   scala-compiler
   ${scala.version}
   test
 
 
   org.scala-lang
   scala-library
   ${scala.version}
 
 
   postgresql
   postgresql
   8.3-603.jdbc3
 
 
   junit
   junit
   4.4
   test
 
 
   net.liftweb
   lift-json
   1.1-SNAPSHOT
 
   

Here's the web pom.xml:

   
 
   org.mortbay.jetty
   jetty
   [6.1.6, 6.1.19)
   test
   

[Lift] Re: Turning off garbage collection

2009-09-21 Thread Viktor Klang
On Mon, Sep 21, 2009 at 10:32 AM, Stefan Langer  wrote:

> Why do you consider it nessecary to turn off garbage collecting if there is
> nothing to garabage collect? Turning of garabage collecting has to be done
> on the jvm level as far as I know. So you would have to turn it off for the
> whole servlet container.
>

Stefan, Charles is talking about Lift's client-scraping Garbage Collection,
not the JVM GC.


>
> Musk
>
> 2009/9/21 Charles F. Munat 
>
>
>> Is it possible to turn off garbage collection on an individual page if
>> there's nothing to be garbage collected on that page? If so, how does
>> one do it?
>>
>> Is it possible to turn off garbage collection completely? If so, how?
>>
>> I can't seem to find this anywhere.
>>
>> Chas.
>>
>>
>>
>
> >
>


-- 
Viktor Klang

Blog: klangism.blogspot.com
Twttr: viktorklang

Lift Committer - liftweb.com
AKKA Committer - akkasource.org
Cassidy - github.com/viktorklang/Cassidy.git
SoftPub founder: http://groups.google.com/group/softpub

--~--~-~--~~~---~--~~
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: Turning off garbage collection

2009-09-21 Thread Stefan Langer
Why do you consider it nessecary to turn off garbage collecting if there is
nothing to garabage collect? Turning of garabage collecting has to be done
on the jvm level as far as I know. So you would have to turn it off for the
whole servlet container.

Musk

2009/9/21 Charles F. Munat 

>
> Is it possible to turn off garbage collection on an individual page if
> there's nothing to be garbage collected on that page? If so, how does
> one do it?
>
> Is it possible to turn off garbage collection completely? If so, how?
>
> I can't seem to find this anywhere.
>
> Chas.
>
> >
>

--~--~-~--~~~---~--~~
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: Turning off garbage collection

2009-09-21 Thread Charles F. Munat

Yes, but somehow I didn't come up with anything. I guess I should've 
searched harder.

Chas.

Timothy Perrett wrote:
> Chas,
> 
> This has been asked a million times on list - did you not try  
> searching one of the many archives?
> 
> LiftRules.enableLiftGC = false;
> 
> Tim
> 
> 
> On 21 Sep 2009, at 08:37, Charles F. Munat wrote:
> 
>> Is it possible to turn off garbage collection on an individual page if
>> there's nothing to be garbage collected on that page? If so, how does
>> one do it?
>>
>> Is it possible to turn off garbage collection completely? If so, how?
>>
>> I can't seem to find this anywhere.
>>
>> Chas.
>>
> 
> 
> > 
> 

--~--~-~--~~~---~--~~
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: Session locking...

2009-09-21 Thread Timothy Perrett

Hey Marius,

What you detail is what I want to achieve - perhaps I didn't  
articulate myself succinctly enough in the first instance :-(

Could you perhaps detail how one could implement such a system at app  
level without using lift session?

Cheers, Tim

On 20 Sep 2009, at 16:14, marius d. wrote:

>
> What would addSetupFunction do ?
>
> I think this locking mechanism can be irrespective of LiftSession and
> built into your app. Such as you set a logical lock to a resource that
> a certain session has access to. Other sessions trying to use that
> resource would be denied access with a user friendly message in the
> browser. This is not a thread lock ... just a guard. You could use a
> lease mechanism so that a lock is released after a period of time and
> this would not necessary mean session expiration.
>
>
> If user A drops and say closes the browser the lease will expire
> anyways. Detecting close browser actions is not 100% reliable.
>
> Br's,
> Marius
>
> On Sep 20, 7:37 am, Timothy Perrett  wrote:
>> Hmm - see what you mean Derek. It seems like it would be really
>> helpful to have a addSetupFunction method on LiftSession - what are
>> your thoughts?
>>
>> Cheers, Tim
>>
>> On Sep 19, 9:17 pm, Derek Chen-Becker  wrote:
>>
>>> S.session.foreach { _.addCleanupFunction { sess => ... } }, I  
>>> think should
>>> work. I haven't looked at the session code in a while. You would  
>>> need to
>>> register that call for each user's session. Alternatively, there's
>>> LiftSession.onShutdownSession, but I think that that call comes  
>>> later in the
>>> shutdown process, and may not work correctly.
>>
>>> Derek
>>
>>> On Sat, Sep 19, 2009 at 11:10 AM, Timothy Perrett
>>> wrote:
>>
 Guys,
>>
 I have a situation where i need to sort of present some kind of
 locking to the users of this application. For instance, user A  
 opens
 thing Z (perhaps i update the database with some flag or whatever)
 then user B attempts  to open thing Z from another terminal. Its at
 that point that I want user B to be told that its locked or being
 edited by another user. So far, so good.
>>
 However, if user A dropped out without saving or whatever (thus
 unsetting the locked flag) it would be locked for all. To that  
 end, I
 was wondering if its possible to register some kind of session
 destruction callback. By that I mean lift keeps sessions open for  
 as
 long as the browser window is open, so when the session is killed  
 off
 i could just have some function execute to unlock the thing Z or
 whatever.
>>
 Is there a way to do this?
>>
 Cheers, Tim
> >
>


--~--~-~--~~~---~--~~
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: Turning off garbage collection

2009-09-21 Thread Timothy Perrett

Chas,

This has been asked a million times on list - did you not try  
searching one of the many archives?

LiftRules.enableLiftGC = false;

Tim


On 21 Sep 2009, at 08:37, Charles F. Munat wrote:

>
> Is it possible to turn off garbage collection on an individual page if
> there's nothing to be garbage collected on that page? If so, how does
> one do it?
>
> Is it possible to turn off garbage collection completely? If so, how?
>
> I can't seem to find this anywhere.
>
> Chas.
>
> >
>


--~--~-~--~~~---~--~~
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] Turning off garbage collection

2009-09-21 Thread Charles F. Munat

Is it possible to turn off garbage collection on an individual page if 
there's nothing to be garbage collected on that page? If so, how does 
one do it?

Is it possible to turn off garbage collection completely? If so, how?

I can't seem to find this anywhere.

Chas.

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