eclipse-ee4j / glassfish

Eclipse GlassFish
https://eclipse-ee4j.github.io/glassfish/
384 stars 143 forks source link

Inconsistent pool attributes on GUI and command line #14131

Closed glassfishrobot closed 14 years ago

glassfishrobot commented 14 years ago

Sorry for the cryptic summary; couldn't think of a good one.

I have created a JDBC connection pool and associated resource like this:

I created a connection pool and associated JDBC resource like this:

asadmin create-jdbc-connection-pool --datasourceclassname=com.mysql.jdbc.jdbc2.optional.MysqlDataSource --restype=javax.sql.DataSource --description "Test connection pool" --property User=scott:Password=tiger:DatabaseName=DB:Port=3306:ServerName=localhost "TestConnectionPool"

asadmin create-jdbc-resource --connectionpoolid "TestConnectionPool" --description "Test JDBC resource" jdbc/DB

Then I navigate to the GUI panel showing the connection pool attributes.

At the bottom, I see that the Isolation Level is set to Guaranteed (the check box is selected). There is a bit of documentation there that says, "All connections use same isolation level; requires Transaction Isolation".

However, the transaction isolation drop down is empty, as I never specified it on the command line and do indeed wish to leave it up to the JDBC driver.

Additionally, you'll note in the command line that I never said anything about guarantees of isolation.

I'm not sure what of all this is intended behavior and what is a bug, but thought I'd raise it up.

Environment

Operating System: All Platform: All

Affected Versions

[3.1]

glassfishrobot commented 6 years ago
glassfishrobot commented 14 years ago

@glassfishrobot Commented anilam said: I would like the resource team to take a look at the UI to see if what we provided is correct. Maybe the inline help need change ? Or maybe UI need change ? Maybe the online help should provide more info to ease the confusion ? Please add the comment, and we can fix it accordingly.

glassfishrobot commented 14 years ago

@glassfishrobot Commented @sumauppa said: ->MS7

glassfishrobot commented 14 years ago

@glassfishrobot Commented @sumauppa said: ->MS7

glassfishrobot commented 14 years ago

@glassfishrobot Commented jthoennes said: Hi sumasri,

I guess you meant _ms07 instead of _b07.

Cheers, Jörg

glassfishrobot commented 14 years ago

@glassfishrobot Commented @sumauppa said: Yes, I meant MS7. By mistake, I have chosen that.

glassfishrobot commented 14 years ago

@glassfishrobot Commented @h2002044 said: yes, your assumption is correct. If no isolation level is specified, it's left to the jdbc driver.

The default value of "is-isolation-level-guaranteed" is true ie., container will book-keep the default isolation level and make sure that the isolation-level is indeed the same during connection reuse. [Consider the case where an application changes the isolation level and returns the connection back to pool. This flag is responsible to give the default isolation level during connection creation time.]

Please refer the docs for more details and their defaults : http://docs.sun.com/app/docs/doc/820-7701/create-jdbc-connection-pool-1?l=en&a=view

"--isolationlevel

The transaction-isolation-level on the pooled database connections. This option does not have a default value. If not specified, the pool operates with the default isolation level that the JDBC driver provides. You can set a desired isolation level using one of the standard transaction isolation levels: read-uncommitted, read-committed, repeatable-read, serializable. Applications that change the isolation level on a pooled connection programmatically risk polluting the pool. This could lead to program errors.

--isisolationguaranteed

This is applicable only when a particular isolation level is specified for transaction-isolation-level. The default value is true.

This option assures that every time a connection is obtained from the pool, isolation level is set to the desired value. This could have some performance impact on some JDBC drivers. Administrators can set this to false when the application does not change --isolationlevel before returning the connection. "

Closing the issue as there is no real defect here.

glassfishrobot commented 14 years ago

@glassfishrobot Commented @ljnelson said: Hi, yes I understand about the --isolationlevel and --isolationguaranteed options. You'll note that I specified neither of them, so --isolationguaranteed has a value of true by default. That's fine.

What threw me was the documentation on the screen. Isolation level shows up as being selected, and the documentation under it says this is only valid if an isolation level has been selected, which, of course, it hasn't.

So the documentation makes it look like I've done something wrong, when of course I haven't. It looks like there is an inconsistent state on the screen, viz. that isolation guaranteed is on, but isolation level hasn't been selected. This is in fact a VALID state of affairs, but the doco implies that it is not. That's all.

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-14131

glassfishrobot commented 14 years ago

@glassfishrobot Commented Reported by @ljnelson

glassfishrobot commented 14 years ago

@glassfishrobot Commented Marked as incomplete on Thursday, October 21st 2010, 10:59:10 pm