This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes Does jboss support pool of preparedstatement? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Does jboss support pool of preparedstatement?" Watch "Does jboss support pool of preparedstatement?" New topic
Author

Does jboss support pool of preparedstatement?

avihai marchiano
Ranch Hand

Joined: Jan 10, 2007
Posts: 342
The preparestatement is cached on the connection, so another connection will not contain the preparedstatement i create moment ago.

In jdbc 3.0 added - support for preparedstatement pool, does jboss support it?
will preparestatement on another connection from jboss conection pool create new preparestatement?

Thank you
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

When you create a datasource there is a property for turning query cache on, which I believe holds the PreparedStatements that have recently run. You can set the size too.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
avihai marchiano
Ranch Hand

Joined: Jan 10, 2007
Posts: 342
i am familiar with this property , but i am not sure if this enable cache on the connection level or the cache is shared between all connections.

thank you
avihai marchiano
Ranch Hand

Joined: Jan 10, 2007
Posts: 342
As far as i see it in performance , the cache of preparestatement is not between connection.

Taking another connection from the pool and call to prepare statement on the same statement take time.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Does jboss support pool of preparedstatement?
 
Similar Threads
Are PreparedStatments scoped at the Connection level.
How to set up DataSource in plain Java application?
prepareStatement()
Application persistence across database shutdown/startup
does gc still have a chance to do its job if i kill the java process