473,385 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

fullymaterializeLobData property for db2 jdbc driver

Hi Folks

we have a java application using hibernate ORM mapper on top of db2
UDB v9. we are using type 4 jdbc drivers for connections.

Now the issue is we have a table with BLOB column and when you issue
a query against this table, all the blob data are fetched into JVM
memory. Needless to say this does not look like a scalable design. You
can set some properties on db2 jdbc driver
(fullymaterializelobData=false) to stream the lobs instead of fetching
them in memory.

I looked up the hibernate docs and it looks like i can pass customized
properties using hibernate.connection.<propertyNameto turn off this
behavior. (http://www.hibernate.org/hib_docs/re.../html/session-
configuration.html)

Question is how do I verify that JDBC driver is honoring this property
(what I set from hibernate config) ? where are the driver logs kept
that tell me the values of all properties being used? Or do I have to
turn the JDBC trace for my session?

tia and regards

- rajeev.

Jun 13 '07 #1
1 7921
On Jun 12, 11:16 pm, rjha94 <jha.raj...@gmail.comwrote:
Hi Folks

we have a java application using hibernate ORM mapper on top of db2
UDB v9. we are using type 4 jdbc drivers for connections.

Now the issue is we have a table with BLOB column and when you issue
a query against this table, all the blob data are fetched into JVM
memory. Needless to say this does not look like a scalable design. You
can set some properties on db2 jdbc driver
(fullymaterializelobData=false) to stream the lobs instead of fetching
them in memory.

I looked up the hibernate docs and it looks like i can pass customized
properties using hibernate.connection.<propertyNameto turn off this
behavior. (http://www.hibernate.org/hib_docs/re.../html/session-
configuration.html)

Question is how do I verify that JDBC driver is honoring this property
(what I set from hibernate config) ? where are the driver logs kept
that tell me the values of all properties being used? Or do I have to
turn the JDBC trace for my session?

tia and regards

- rajeev.
Allright. Here is how to do it with hibernate . write the following
driver-specific properties in your hibernate config file.
I think this is equivalent of providing the properties on JDBC
connection URL. You can check the driver trace file where it says
about the value of fullyMaterializeLobData property.

<!-- pass the JDBC property custom_property to
DriverManager.getConnection -->
<property name="hibernate.connection.fullyMaterializeLobData ">false</
property>
<!-- set trace -->
<property name="hibernate.connection.traceDirectory">c:\\nuk e</
property>
<property name="hibernate.connection.traceFile">trace</property>
<property name="hibernate.connection.traceLevel">-1</property>

Jun 13 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Axel Dachtler | last post by:
Hello, my Java-program can't load the JDBC driver. I always get a java.lang.NoClassDefFoundError when I run it. The JDBC Driver is in the directory: C:\programs\ora92\jdbc\lib I think I...
0
by: Nils Valentin | last post by:
Hi MySQL Fans ;-), Is it possible that the 3.08 series allows to connect to 4.0.14 versions but not to the 4.1 alpha-versions ? I get belows error when tryig to connect from DbVisualizer which...
3
by: Steverino | last post by:
Hi, I'm currently trying to learn DB2. I have the following version below installed on my server machine on my little LAN. However when I try to connect to it from my client machine, I receive...
4
by: Dani | last post by:
Hi everyone Description of the problem: Using a PreparedStatement to write down an integer (int) plus a timestamp for testing purposes. When read out again the integer looks very different. We...
0
by: Bing | last post by:
Hi, I am configuring the same DB2 v8.1 JDBC universal driver (db2jcc.jar and db2jcc_license_cisuz.jar) from DB2 SP5 fix pack under WSAD 5.1.x environment and WebSphere application Server 5.0.2...
2
by: Raquel | last post by:
Read this about the Universal JDBC Driver.... "In a Type 2 mode, the Universal JDBC driver provides local application performance gains (because it avoids using TCP/IP protocol to communicate to...
3
by: Anoop | last post by:
Is it true that there are no type 4 jdbc drivers to connect to a DB2 server v7.1? The DB2 server is hosted on ACF2 (OS/390). We would be connecting from windows and solaris boxes. If it is true,...
0
by: Lars Hylleberg | last post by:
In my company we are runing java Webshere applications on Windows platform and connecting to DB2 V8 on z/OS mainframe. Until now we have used the type 2 JDBC driver, which are using the DB2 Connect...
2
by: David | last post by:
Hello all, I have been trying to use the OCI driver to connect to Oracle 9i, but have been getting the following error: java.sql.SQLException: Closed Connection at...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.