Re: broken pipe?

2006-01-09 Thread Thomas Dudziak
On 1/9/06, Dennis Bekkering [EMAIL PROTECTED] wrote:
 wel that didn't help now it looks like this and that still doesn't help.
 What do I have to do? My customers go crazy over this and me too!!! I really
 don't know what to do anymore. On production I didn't switch to
 1.0.4because lazy loading is different and the site gets to slow then.

Please try the custom initializationCheck attribute that I wrote about earlier:

http://db.apache.org/ojb/docu/guides/repository.html#Attributes-N10127

You could also write a minimalistic JDBC test that simply runs over
night and performs the SELECT 1 every second or so, in order to test
whether you have some MySql setup problem.

Tom

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: broken pipe?

2006-01-09 Thread Thomas Dudziak
On 1/9/06, Dennis Bekkering [EMAIL PROTECTED] wrote:

 The whole thing looks like this now, I don't use 1.0.4 though on production.
 Does the attribute do anything then. It runs on rc7.

The custom attribute is new in 1.0.4, so it won't do anyting in older versions.
I'd suggest you first update to 1.0.3 (there shouldn't have been too
many changes regarding lazy loading) and see how that works.
Btw, you should use jdbc level 3 for the mysql driver, and update to
the newest driver (3.1), there have been a lot of changes AFAIK.

Tom

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: broken pipe?

2006-01-09 Thread Dennis Bekkering
my driver was and is mysql-connector-java-3.1.5-gamma-bin.jar so I updated
to jdbc level 3. Will update to 1.0.3 tonight if lazy is still lazy.

2006/1/9, Thomas Dudziak [EMAIL PROTECTED]:

 On 1/9/06, Dennis Bekkering [EMAIL PROTECTED] wrote:

  The whole thing looks like this now, I don't use 1.0.4 though on
 production.
  Does the attribute do anything then. It runs on rc7.

 The custom attribute is new in 1.0.4, so it won't do anyting in older
 versions.
 I'd suggest you first update to 1.0.3 (there shouldn't have been too
 many changes regarding lazy loading) and see how that works.
 Btw, you should use jdbc level 3 for the mysql driver, and update to
 the newest driver (3.1), there have been a lot of changes AFAIK.

 Tom

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




--
mvg,
Dennis


Re: lazy loading 1.0.4

2006-01-09 Thread Dennis Bekkering
Armin,

It was the cache setting not the lazy loading.Fast as lightning again ;-)
Strange though that without caching the 2nd number of queries is less?

thanks,
Dennis

did you notice that the ObjectCache configuration moved from
OJB.properties to repository file between rc7 and 1.0.4?
You have to declare the cache within the jdbc-connection-descriptor
using a object-cache element.
http://db.apache.org/ojb/docu

Does that mean that there is no caching at all now? Maybe that's the reason
why there are more queries in 1.0.4.
The thing is that I get just one query ,no joins, when i select all
organisations from rc7 while there are some references that are not
interfaces so they cannot be proxies anyway?? When I select 1 organisation I
get all reference data with it when I call the getters.

Calling all orgs on 1.0.4 I gives outer joins the 2nd time. :

 SQL:SELECT A0.id,A0.lastmodified,A0.creationdate,A0.version ,A0.fax,
  A0.fieldofinterest,A0.name,A0.noofemployee,A0.phone,A0.postaladress,
  A0.postalcity,A0.postalzip,A0.url,A0.visitadress,A0.visitcity,
 A0.visitzip,
  A0.chamberofcommerceno ,A0.immediateparentid,A0.ultimateparentid,
  A0.postalcountryid,A0.organisationbrancheid,A0.visitcountryid,
  A0.organisationtypeid FROM organisation A0
  [org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl ] DEBUG:
  SQL:SELECT A0.id,A0.lastmodified,A0.creationdate,A0.version,A0.code,
 A0.name,
  A0.number FROM country A0 WHERE A0.id = ?



regards,
Dennis






2006/1/9, Armin Waibel [EMAIL PROTECTED]:

 Hi Dennis,

 if I summarize your posted sql-queries we will get

 1.0.4:
 FROM organisation A0
 FROM country A0 WHERE A0.id = ?
 FROM tablemodel A0 WHERE A0.name = ?
 FROM field A0 WHERE A0.id = ?
 FROM fieldtype A0 WHERE A0.id = ?
 FROM reference A0 WHERE A0.parenttablemodelid = ?
 FROM rendertype A0 WHERE A0.id = ?
 FROM tablemodel A0 WHERE A0.id IN (?,?,?,?)
 FROM field A0 WHERE A0.id IN (?,?)
 FROM fieldtype A0 WHERE A0.id = ?
 FROM field A0 WHERE A0.parenttablemodelid = ?
 FROM fieldtype A0 WHERE A0.id IN (?,?,?)
 FROM tablemodel A0 WHERE A0.id = ?

 rc7:
 FROM organisation A0
 FROM country A0 WHERE A0.id = ?
 FROM tablemodel A0 WHERE A0.name = ?
 FROM field A0 WHERE A0.parenttablemodelid = ?
 FROM fieldtype A0 WHERE A0.id IN (?,?)
 FROM reference A0 WHERE A0.parenttablemodelid = ?

 Seems that lazy loading works, because there is no query for the m:n and
 1:n references. Think the other queries are the result of the 1:1
 references and additional queries if the referenced object has
 references too or some prefetching stuff.
 If this is the case you could try to enable lazy loading for some 1:1
 references too and check the generated queries again.

 you post
  ProxyFactoryClass=org.apache.ojb.broker.core.proxy.ProxyFactoryCGLIBImpl
  ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl

 did you notice that the ObjectCache configuration moved from
 OJB.properties to repository file between rc7 and 1.0.4?
 You have to declare the cache within the jdbc-connection-descriptor
 using a object-cache element.
 http://db.apache.org/ojb/docu/guides/objectcache.html

 regards,
 Armin


 Dennis Bekkering wrote:
  Hello,
 
  I recently switched from rc7 to 1.0.4 and lazy loading seem to happen
 any
  more. Can someone please check my config out.
 
  1.0.4 fires twice as much queries?
 
  thanks.
 
 
  sql output get all organisations 1.0.4
 
   just after clear cache
  [org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl] DEBUG:
  SQL:SELECT A0.id,A0.lastmodified,A0.creationdate,A0.version,A0.fax,
  A0.fieldofinterest, A0.name,A0.noofemployee,A0.phone,A0.postaladress,
  A0.postalcity,A0.postalzip,A0.url,A0.visitadress,A0.visitcity,
 A0.visitzip,
  A0.chamberofcommerceno,A0.immediateparentid,A0.ultimateparentid,
  A0.postalcountryid ,A0.organisationbrancheid,A0.visitcountryid,
  A0.organisationtypeid FROM organisation A0
  [org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl] DEBUG:
  SQL:SELECT A0.id ,A0.lastmodified,A0.creationdate,A0.version,A0.code,
 A0.name,
  A0.number FROM country A0 WHERE A0.id = ?
  [org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl ] DEBUG:
  SQL:SELECT A0.id,A0.lastmodified,A0.creationdate,A0.version,
 A0.defaultvalue,
  A0.fixheader,A0.groupby,A0.indescriptor,A0.name,A0.subtablesheight ,
  A0.descriptorfieldid,A0.defaultqueryid,A0.quicksearchqueryid FROM
 tablemodel
  A0 WHERE A0.name = ?
  [org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl] DEBUG:
  SQL:SELECT A0.id,A0.lastmodified,A0.creationdate,A0.version,
 A0.defaultvalue,
  A0.indescriptor,A0.name,A0.ordr,A0.showintable,A0.sortdown,
 A0.fieldtypeid ,
  A0.fieldcollectionid,A0.parenttablemodelid,A0.calculatedfieldid FROM
 field
  A0 WHERE A0.id = ?
  [org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl] DEBUG:
  SQL:SELECT A0.id,A0.lastmodified,A0.creationdate,A0.version,A0.name,
 A0.typeFROM
  fieldtype A0 WHERE
  A0.id = ?
  [ 

Re: Strange Exception

2006-01-09 Thread Thomas Dudziak
On 1/9/06, Zhong Li [EMAIL PROTECTED] wrote:

 Our application runs for a few weeks, today I got exceptions, The strange
 thing is, the application can query, delete and save, but not insert (
 create new Object). We use OJB 1.0.3. From exception, it seems run out of
 connections. But question is why still can query, delete and save(exist
 Object)?

This might be a timeout issue, e.g. all connections in the pool timed
out. You might want to define a connection validation query in your
connection pool definition, and add autoReconnect=true to your jdbc
connection url (i.e. add it to the dbalias in the JCD).

Tom

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: broken pipe?

2006-01-09 Thread Dennis Bekkering
everything is on 1.0.4 now. I also updated all my other libraries with the
latest. The jdbc level is 3, lets wait and see. If it still fails I will
have to modify the pool class(es) I guess.

2006/1/9, Dennis Bekkering [EMAIL PROTECTED]:

 my driver was and is mysql-connector-java-3.1.5-gamma-bin.jar so I updated
 to jdbc level 3. Will update to 1.0.3 tonight if lazy is still lazy.

 2006/1/9, Thomas Dudziak [EMAIL PROTECTED]:
 
  On 1/9/06, Dennis Bekkering [EMAIL PROTECTED] wrote:
 
   The whole thing looks like this now, I don't use 1.0.4 though on
  production.
   Does the attribute do anything then. It runs on rc7.
 
  The custom attribute is new in 1.0.4, so it won't do anyting in older
  versions.
  I'd suggest you first update to 1.0.3 (there shouldn't have been too
  many changes regarding lazy loading) and see how that works.
  Btw, you should use jdbc level 3 for the mysql driver, and update to
  the newest driver (3.1), there have been a lot of changes AFAIK.
 
  Tom
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 mvg,
 Dennis




--
mvg,
Dennis