class Boot {
def boot {
if (!DB.jndiJdbcConnAvailable_?) {
val vendor =
new StandardDBVendor(Props.get("db.driver") openOr "org.h2.Driver",
Props.get("db.url") openOr "jdbc:h2:lift_proto.db;AUTO_SERVER=TRUE",
Props.get("db.user"), Props.get("db.password"))
LiftRules.unloadHooks.append(vendor.closeAllConnections_! _)
DB.defineConnectionManager(DefaultConnectionIdentifier, vendor)
}
Schemifier.schemify(true, Schemifier.infoF _, Votable, User, Query,
Vote, Comment, Room, Certificate, Emotion, Tick,
InviteCode)
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks in advance,
Jonathan
I think the tcp prefix isn't doing what you expect, just to throw another way of connecting to your db, see this post I wrote a while agoyou would then access the h2 UI through the web server that is also hosting your lift app and if memory serves well, you just need to use the right db name, see screenshot on the postHope it helps.Diego
On Wed, Oct 12, 2016 at 10:50 AM, Jonathan <jcse...@gmail.com> wrote:
I tried the following JDBC URLs:
jdbc:h2:tcp://localhost/~/windowsHome/workingDir/Elice/lift_proto.db.h2.db;AUTO_SERVER=TRUE
and
jdbc:h2:tcp://localhost/~/windowsHome/workingDir/Elice/lift_proto.db;AUTO_SERVER=TRUE
which result in no difference. In either case the h2 console application seems to connect to a (new) empty database.
On Wednesday, 12 October 2016 16:22:17 UTC+2, Tobias Hammerschmidt wrote:Make sure to only use the base name of the database when connecting - h2 will automatically append h2.db so if you use parts of this suffix during connection you'll end up using another db.
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.