Redian新闻
>
jdbc + oracle connection pooling问题
avatar
jdbc + oracle connection pooling问题# Java - 爪哇娇娃
s*n
1
刚从国内带回金正DVD,国内用是好的,但来美后开机就跳动不停。请问什么问题?
avatar
c*m
2
We went to San Francesco again last weekend. I met several of my old friends
there and we went to a late night Karaoke shop and every body went crazy
eventually~
Jon is such a nice boy, we stayed in the corner and played his game console
while enjoyed other people's singing. Jon loves to stay with me, I could
tell. When we went to the museum together, he was scolded by his mum and he
hid underneath my arms and wept. This is the first time a boy wept under my
arms and I was like a guardian angel to him. The feeling of being needed
made me feel so moved. He is so light and I just asked him to hold my arms
tight so that we could fly. We did that and his mum complained again. So,
smart Jon asked me to bend down and he told me, "See, you made me make
mistakes. We will not do that flying again although I like it and thank you
for that." As a man growing up from that age and still remember what that
means, I know he is serious and he always wants to make his mum happy. He
really reminds me of my childhood, afraid of making mistakes, afraid of my
parents getting divorced, etc.
Children are amazing. They have the power to remind you of taking another
look at your own life.
avatar
B*g
3
不同的java threads能同时共享一个session吗?
谢谢
avatar
e*t
4
session? or you really mean connection?
The connection object can be accessed from different threads for sure. But
when you are talking about transaction, you have to check what transaction
management you are using.

【在 B*****g 的大作中提到】
: 不同的java threads能同时共享一个session吗?
: 谢谢

avatar
B*g
5
你说我才意识到connection和session是不同的,我问的是session(是不是就是
transaction?),不过最好都分析一下,我是想知道数据库里的global variable会不
会被不同的java threads影响,谢谢
***
A connection is a "physical circuit", a pathway to a database. You can be
connected to a database yet have 0 or 1 or MORE sessions going on that
connection.
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTIO
***

【在 e*****t 的大作中提到】
: session? or you really mean connection?
: The connection object can be accessed from different threads for sure. But
: when you are talking about transaction, you have to check what transaction
: management you are using.

avatar
r*s
6
好像要么是HTTP Session,
要么是Hibernate里的Session, bounded by a tx.
JDBC好像没有这个概念?

【在 e*****t 的大作中提到】
: session? or you really mean connection?
: The connection object can be accessed from different threads for sure. But
: when you are talking about transaction, you have to check what transaction
: management you are using.

avatar
B*g
7
俺说的是oracle里的session,jdbc怎么连的?

But
transaction

【在 r*****s 的大作中提到】
: 好像要么是HTTP Session,
: 要么是Hibernate里的Session, bounded by a tx.
: JDBC好像没有这个概念?

avatar
r*s
8
这个好像depends on the jdbc driver
对于java code来说就是个parameter吧?

【在 B*****g 的大作中提到】
: 俺说的是oracle里的session,jdbc怎么连的?
:
: But
: transaction

avatar
s*d
9
it's probably not the best practice, but yes you can.

【在 B*****g 的大作中提到】
: 不同的java threads能同时共享一个session吗?
: 谢谢

avatar
e*t
10
jdbc没有session概念的,只有connection,然后对于connection,有transaction的问题。
所以,如果你是different threads,dealing with the same connection. 你需要考虑
的是transaction的问题。

【在 r*****s 的大作中提到】
: 这个好像depends on the jdbc driver
: 对于java code来说就是个parameter吧?

avatar
y*d
11
transaction 应该是爱怎么用怎么用吧,只要释放回 pool 之前结束了不就成了

题。

【在 e*****t 的大作中提到】
: jdbc没有session概念的,只有connection,然后对于connection,有transaction的问题。
: 所以,如果你是different threads,dealing with the same connection. 你需要考虑
: 的是transaction的问题。

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。