I have added the demo code on the Github now.
( Mabye it's a bug with DB.runQuery and DB.use in the two db
vender )
Here is the address:
http://github.com/anim510/two_db_demo
Thanks very much!
Cheers,
Neil
On Jan 21, 11:26 am, Neil.Lv anim...@gmail.com wrote:
My email is :
What is wrong with:
DB.use(FirstDB) {
firstConnection =
DB.use(SecondDB) {
secondConnection =
// do transactional query between two DBs here
}
}
Note that DB.use nests such that the transaction will only be committed when
the last DB.use block for a given ConnectionIdentifier is exited.
The users table in the OneDB, and the hots table in the TwoDB, they
are separated!
I have changed the method that like this:
###
# I specify the TwoDB for hots table.
override def dbDefaultConnectionIdentifier = bootstrap.liftweb.TwoDB
def getHots3(id : Long) = {
It doesn't work is not sufficient to diagnose. What behavior did you get, and
what were you expecting? Were there any errors, log messages, exceptions, etc?
If so, please copy them. Finally, if you have a reproducible test case please
post it to github. I note earlier in the thread that you
On Thu, Jan 21, 2010 at 9:29 AM, Neil.Lv anim...@gmail.com wrote:
The users table in the OneDB, and the hots table in the TwoDB, they
are separated!
I have changed the method that like this:
###
# I specify the TwoDB for hots table.
override def dbDefaultConnectionIdentifier =
Thanks guys very very much!
I'm using the Windows XP, I reset the height buffer for the CMD
now, and can see the full error message now.
The code can work fine now ( it's so strange that I run this code on
the another computer , and it's all OK... )
Maybe I need to delete all the
'mvn clean' deletes them for you.
-
Neil.Lvanim...@gmail.com wrote:
Thanks guys very very much!
I'm using the Windows XP, I reset the height buffer for the CMD
now, and can see the full error message now.
The code can work fine now ( it's so strange
On Jan 22, 10:06 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
'mvn clean' deletes them for you.
-
Got it, Thank you very much!
Cheers,
Neil
--
You received this message because you are subscribed to the Google Groups
Lift group.
To post to this
Thank you very much,
But it doesn't work yet, maybe because of using two db connections.
I'll test it later again.
On Jan 21, 12:44 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote:
Neil.Lv anim...@gmail.com writes:
Hi all,
I use two db connections in my app, and I want to use
Mabye it's a bug with DB.runQuery and DB.use in the two db vender
Two question: (problem)
1: I don't know why the HelloWorld snippet code will be execute 2
times in this code. (See the HelloWorld.scala file.)
2: The dbDefaultConnectionIdentifier method in the Model that it works
fine when
My email is : anim...@gmail.com
On Jan 21, 11:17 am, Neil.Lv anim...@gmail.com wrote:
Mabye it's a bug with DB.runQuery and DB.use in the two db vender
Two question: (problem)
1: I don't know why the HelloWorld snippet code will be execute 2
times in this code. (See the
11 matches
Mail list logo