Working with legacy databases

5 views
Skip to first unread message

Donald McLean

unread,
Nov 21, 2009, 10:16:39 PM11/21/09
to liftweb
We are considering porting an existing Java desktop app to a
Scala/lift web app. The application works with a Sybase DB. I'm still
pretty new to Scala and Lift so I'm probably overlooking something
obvious but could someone recommend a technology that is know to work
for this environment? I have used Hibernate in the past and will use
it again if necessary but I would be interested to know if there are
other options.

Thank you,

Donald

--
Family photographs are a critical legacy for
ourselves and our descendants. Protect that
legacy with a digital backup and recovery plan.

Join the photo preservation advocacy Facebook group:
http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288

Jim Barrows

unread,
Nov 23, 2009, 11:38:24 AM11/23/09
to lif...@googlegroups.com
On Sat, Nov 21, 2009 at 8:16 PM, Donald McLean <dmcl...@gmail.com> wrote:
We are considering porting an existing Java desktop app to a
Scala/lift web app. The application works with a Sybase DB. I'm still
pretty new to Scala and Lift so I'm probably overlooking something
obvious but could someone recommend a technology that is know to work
for this environment? I have used Hibernate in the past and will use
it again if necessary but I would be interested to know if there are
other options.

You have Record and Mapper, which are a part of lift.  You have Scala QL.  Since Lift is written in Scala you have a plethora of Java based ORM's and DB acccess libraries as well.

It's your choice, really.
 

Thank you,

Donald

--
Family photographs are a critical legacy for
ourselves and our descendants. Protect that
legacy with a digital backup and recovery plan.

Join the photo preservation advocacy Facebook group:
http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288

--

You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=.





--
James A Barrows

David Pollak

unread,
Nov 23, 2009, 11:41:21 AM11/23/09
to lif...@googlegroups.com
On Mon, Nov 23, 2009 at 8:38 AM, Jim Barrows <jim.b...@gmail.com> wrote:


On Sat, Nov 21, 2009 at 8:16 PM, Donald McLean <dmcl...@gmail.com> wrote:
We are considering porting an existing Java desktop app to a
Scala/lift web app. The application works with a Sybase DB. I'm still
pretty new to Scala and Lift so I'm probably overlooking something
obvious but could someone recommend a technology that is know to work
for this environment? I have used Hibernate in the past and will use
it again if necessary but I would be interested to know if there are
other options.

You have Record and Mapper, which are a part of lift.  You have Scala QL.  Since Lift is written in Scala you have a plethora of Java based ORM's and DB acccess libraries as well.

Neither Mapper or Record supports Sybase... I think a JPA solution or even using the existing Java-based model classes might be the best bet.

Thanks,

David
 

It's your choice, really.
 

Thank you,

Donald

--
Family photographs are a critical legacy for
ourselves and our descendants. Protect that
legacy with a digital backup and recovery plan.

Join the photo preservation advocacy Facebook group:
http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288

--

You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=.





--
James A Barrows


--

You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=.



--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

Jean-Luc

unread,
Nov 23, 2009, 1:55:36 PM11/23/09
to lif...@googlegroups.com
I think scalajpa is a very good option if your database is supported by the underlying jpa provider.
- according to https://www.hibernate.org/80.html, the hibernate / sybase supported version is Sybase 12.5 (JConnect 5.5)
- according to https://www.hibernate.org/120.html, there is some Batch update issue with Sybase

If you have another database version, you can customize the generated sql writing your own custom "Dialect" class.

A few issues I had :
- hibernate + cglib + scala : using a lot of permgen memory, exhausted PermGen memory can cause OutOfMemoryException (solution : add some more PermGen memory with -XX:MaxPermSize)
- hibernate + c3po + mysql : issue with connection pool, connections with timeout are reused and issue errors (solution : review code and always call cleanup when necessary)

Maybe someone else will provide some info about other JPA providers.

You can generate your first scala/jpa web application using the "lift-archetype-jpa-basic" / 1.1-SNAPSHOT archetype. Don't forget to use http://scala-tools.org/repo-snapshots repository.

If you have any problem, just ask !

Jean-Luc
jlca...@gmail.com


2009/11/23 David Pollak <feeder.of...@gmail.com>



--
Jean-Luc Canela
jlca...@gmail.com
Reply all
Reply to author
Forward
0 new messages