[Lift] Re: HSQL support

2009-09-21 Thread David Pollak
On Sun, Sep 20, 2009 at 5:18 PM, sergey srassok...@gmail.com 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] 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
-~--~~~~--~~--~--~---



[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] 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 timo...@getintheloop.eu 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 dchenbec...@gmail.com 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
 timo...@getintheloop.euwrote:

 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] 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.lt;initgt;(AbstractEntityTuplizer.java:135)
org.hibernate.tuple.entity.PojoEntityTuplizer.lt;initgt;(PojoEntityTuplizer.java:55)
org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.lt;initgt;(EntityEntityModeToTuplizerMapping.java:56)
org.hibernate.tuple.entity.EntityMetamodel.lt;initgt;(EntityMetamodel.java:295)
org.hibernate.persister.entity.AbstractEntityPersister.lt;initgt;(AbstractEntityPersister.java:434)
org.hibernate.persister.entity.JoinedSubclassEntityPersister.lt;initgt;(JoinedSubclassEntityPersister.java:91)
org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58)
org.hibernate.impl.SessionFactoryImpl.lt;initgt;(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.lt;initgt;(LocalEM.scala:55)
org.scala_libs.jpa.LocalEMF.lt;initgt;(LocalEM.scala:52)
com.munat.tales.model.Model$.lt;initgt;(Model.scala:23)
com.munat.tales.model.Model$.lt;clinitgt;(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.lt;initgt;(AbstractEntityTuplizer.java:135)
org.hibernate.tuple.entity.PojoEntityTuplizer.lt;initgt;(PojoEntityTuplizer.java:55)
org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.lt;initgt;(EntityEntityModeToTuplizerMapping.java:56)
org.hibernate.tuple.entity.EntityMetamodel.lt;initgt;(EntityMetamodel.java:295)
org.hibernate.persister.entity.AbstractEntityPersister.lt;initgt;(AbstractEntityPersister.java:434)
org.hibernate.persister.entity.JoinedSubclassEntityPersister.lt;initgt;(JoinedSubclassEntityPersister.java:91)
org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58)
org.hibernate.impl.SessionFactoryImpl.lt;initgt;(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.lt;initgt;(LocalEM.scala:55)
org.scala_libs.jpa.LocalEMF.lt;initgt;(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)

   dependencies
 dependency
   groupIdorg.scala-lang/groupId
   artifactIdscala-compiler/artifactId
   version${scala.version}/version
   scopetest/scope
 /dependency
 dependency
   groupIdorg.scala-lang/groupId
   artifactIdscala-library/artifactId
   version${scala.version}/version
 /dependency
 dependency
   groupIdpostgresql/groupId
   

[Lift] Re: Turning off garbage collection

2009-09-21 Thread David Pollak
On Mon, Sep 21, 2009 at 6:34 AM, Xavi Ramirez xavi@gmail.com 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
 timo...@getintheloop.eu 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
 indraj...@gmail.com 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:
   version${releaseVersion}/version
  
   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 http://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 Pollakfeeder.of.the.be...@gmail.com
 mailto:feeder.of.the.be...@gmail.com
   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
 http://liftweb.net
   Beginning Scalahttp://www.apress.com/book/view/1430219890
 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
feeder.of.the.be...@gmail.com wrote:


 On Mon, Sep 21, 2009 at 6:34 AM, Xavi Ramirez xavi@gmail.com 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
 timo...@getintheloop.eu 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 David Pollak
On Mon, Sep 21, 2009 at 7:11 AM, Xavi Ramirez xavi@gmail.com 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
 feeder.of.the.be...@gmail.com wrote:
 
 
  On Mon, Sep 21, 2009 at 6:34 AM, Xavi Ramirez xavi@gmail.com
 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
  timo...@getintheloop.eu 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 David Pollak
On Mon, Sep 21, 2009 at 1:41 AM, Timothy Perrett timo...@getintheloop.euwrote:


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

parent
version${releaseVersion}/version
...
/parent
...
version${releaseVersion}/version
...

 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
  indraj...@gmail.com 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:
version${releaseVersion}/version
   
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 http://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 Pollakfeeder.of.the.be...@gmail.com
  mailto:feeder.of.the.be...@gmail.com
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 

[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: 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 tnell...@gmail.com 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] 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 tnell...@gmail.com 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: 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 donahu...@gmail.com 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:

 parent
 version${releaseVersion}/version
 ...
 /parent
 ...
 version${releaseVersion}/version
 ...

  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
  indraj...@gmail.com 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:
version${releaseVersion}/version
   
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 

[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: 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
 timo...@getintheloop.eu 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: 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 xavi@gmail.com 
 mailto:xavi@gmail.com 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
 timo...@getintheloop.eu 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

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 
 timo...@getintheloop.eu 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: 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 je...@ingolfs.dkwrote:


 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: 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 gl...@exmbly.com 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: 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 james.thorn...@gmail.com 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: 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 espeed

On Sep 21, 2:33 pm, David Pollak feeder.of.the.be...@gmail.com
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: 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 feeder.of.the.be...@gmail.com
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 gl...@exmbly.com 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: 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 srassok...@gmail.com 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: 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 quasike...@gmail.com 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(brhello/br, 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 jonhoff...@gmail.com 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=KEYauth_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 quasike...@gmail.com 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 quasike...@gmail.com 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 tyler.w...@gmail.com 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 quasike...@gmail.com 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] 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: 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 gl...@exmbly.com 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 feeder.of.the.be...@gmail.com
 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 gl...@exmbly.com 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 David Pollak
On Mon, Sep 21, 2009 at 1:19 PM, espeed james.thorn...@gmail.com wrote:


 On Sep 21, 2:33 pm, David Pollak feeder.of.the.be...@gmail.com
 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: 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. marius.dan...@gmail.com 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 liep...@xs4all.nl 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: Code Plugability in Lift

2009-09-21 Thread David Pollak
On Mon, Sep 21, 2009 at 2:03 PM, glenn gl...@exmbly.com 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 feeder.of.the.be...@gmail.com
 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 gl...@exmbly.com 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: Session locking...

2009-09-21 Thread David Pollak
On Sun, Sep 20, 2009 at 5:37 AM, Timothy Perrett timo...@getintheloop.euwrote:


 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 dchenbec...@gmail.com 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
  timo...@getintheloop.euwrote:
 
 
 
 
 
   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: 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: Pain Building Lift

2009-09-21 Thread runt

excellent, thanaks a lot.

Case closed.

On Sep 21, 1:27 am, Tim Nelson tnell...@gmail.com 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 run...@gmail.com 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 mondraym...@gmail.com 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 feeder.of.the.be...@gmail.com
   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 new_branch_name
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 Demo Master
[INFO]   JPADemo-spa
[INFO]   JPADemo-web
[INFO]   HTTP Authentication example
[INFO]   lift-archetype-blank
[INFO]   lift-archetype-basic
WAGON_VERSION: 1.0-beta-2
[INFO]

  
[INFO] Building Lift

[Lift] Re: Concurrent Web Service Requests?

2009-09-21 Thread espeed

On Sep 21, 4:29 pm, David Pollak feeder.of.the.be...@gmail.com
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: 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: 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 feeder.of.the.be...@gmail.com
wrote:
 On Mon, Sep 21, 2009 at 2:03 PM, glenn gl...@exmbly.com 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 feeder.of.the.be...@gmail.com
  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 gl...@exmbly.com 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: Concurrent Web Service Requests?

2009-09-21 Thread David Pollak
On Mon, Sep 21, 2009 at 3:19 PM, espeed james.thorn...@gmail.com wrote:


 On Sep 21, 4:29 pm, David Pollak feeder.of.the.be...@gmail.com
 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: 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 feeder.of.the.be...@gmail.com
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
-~--~~~~--~~--~--~---