Re: Pooling questions

2005-03-03 Thread Robert r. Sanders
I have had problems with pooling in the past; currently I have an OJB based app running (against a MySQL db) using the following pooling: Vincent Frison wrote: Hi all, I have sometimes troubles with pooling. One of the most frequent exception is: An action has failed: Borrow broker from pool fa

Re: Mapping question

2005-03-03 Thread Georg Müller
I now have a running version, but the way Thomas proposed would be much nicer. I have added a collection descriptor and he returns both addresses. I tried to modify my getters and setters for addresses to set homeAddress and workAddress, but I tested this and noticed that they are not invo

RE: Mapping question

2005-03-03 Thread Günther Wieser
i tried to change my code to using extends, it works perfect for me, and from an object oriented design view, this is perfect! what i did (if i apply the things i did to georgs problem): - create an abstract class Address that has all attributes in it - derive both classes HomeAddress and WorkAdd

Oracle 9i date-timestamp tip

2005-03-03 Thread Bruno CROS
Even if it has been already post, i just want to clarify the tip : - according to Oracle 9i notes http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#08_01 it's important to note that mapping date attributes such as java.sql.Time java.util.Date (with hours ...) and even jav

Re: Mapping question

2005-03-03 Thread Georg Müller
Thomas Dudziak wrote: As far as I understand he wants to use a reference that refers to a class with a compound primarykey, where one of the foreignkey values is fixed: Yes, that is what I am searching for. - To unsubscr

Re: Mapping question

2005-03-03 Thread Thomas Dudziak
As far as I understand he wants to use a reference that refers to a class with a compound primarykey, where one of the foreignkey values is fixed: That would actually be a neat feature to have IMO ?! Tom - To unsubsc

Pooling questions

2005-03-03 Thread Vincent Frison
Hi all, I have sometimes troubles with pooling. One of the most frequent exception is: An action has failed: Borrow broker from pool failed, using PBKey org.apache.ojb.broker.PBKey: jcdAlias=default, user=null, password=null It seems that I explode the broker pool capacity (altough I close broke

Re: ojb and interface driven design

2005-03-03 Thread Thomas Dudziak
Yes, you need to declare getters and setters, at least for the fields that are used for primarykeys and foreignkeys. But the benefit is that you can put whatever implementation you see fit, the do not even need to have actual java fields for the values. And the speed hit because of the reflection i

Re: Mapping question

2005-03-03 Thread Armin Waibel
Hi, not sure that I understand the problem. Each User has two Address attributes ('home' and 'work'), both are of the same type 'Address' (both 1:1 references), you don't use extension classes AddressHome and AddressWork objects. Address use a composite PK ('login' and 'type'). In this case eac

RE: Mapping question

2005-03-03 Thread Günther Wieser
hi, as far as i understand this, you try to differentiate by the value of "adress.type" whether an adress is a home wor work adress? well, i have no solution for that, but i tried it here with a similair data structur, and it didn't work either. to be honest i'm not sure if this is the intended us

Re: Mapping question

2005-03-03 Thread Georg Müller
Sorry for that second posting. I sent this before I subscribed to the list, so I thought it will not be posted (now, with a latency of nearly one day) Regards, Georg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

Re: ojb and interface driven design

2005-03-03 Thread Maksimenko Alexander
yes you are right - its solution but unfortunatelly it's not convenient to me ;( i have 71 beans now and i'm using xdoclet - so when I' ll decide replace GroupImpl to GroupAnotherImpl i'll have much work but its better then nothing - thanks ;) if I want find another solution I'll use yours about

Re: ojb and interface driven design

2005-03-03 Thread Armin Waibel
Maksimenko Alexander wrote: but... according to dtd i should write either extent or field-descripto elements - in the second part a "extent-class*" declaration is defined too. The first part mean that at least an extent-class definition is needed. Armin its dtd from 1.0.1 Armin Waibel wrote:

Re: ojb and interface driven design

2005-03-03 Thread Maksimenko Alexander
but... according to dtd i should write either extent or field-descripto elements - its dtd from 1.0.1 Armin Waibel wrote: I saw ReferenceTest test worked with OJB 1.0.1 too, with a different mapping of the interface. Did you tried to declare the reference-descriptor and fk-field in the interf

Mapping question

2005-03-03 Thread Georg Müller
Hi, I have an object "User" who has 2 addresses, home and work. User is mapped to a table user (no problem here). Both home and work address are mapped to a table address. This table has a composite primary key: login and type - login from table user as a foreign key - type is a string (or enum)

RE: ojb and interface driven design

2005-03-03 Thread Gelhar, Wallace Joseph
The proxies comment is irrelevant to the solution I noted. You need to change: To: As far as my comment regarding proxies, in general we get better performance by NOT proxying reference descriptors. We do however increase performance by proxying collection descriptors. I

Re: ojb and interface driven design

2005-03-03 Thread Maksimenko Alexander
but in this case i need create setters in interface, isn't it ? Thomas Dudziak wrote: I was wondering why you map the Impl classes at all ? You can declare the fields for the interface, you only need to change the PersistentFieldClass in OJB.properties to PersistentFieldIntrospectorImpl or Persiste

Re: ojb and interface driven design

2005-03-03 Thread Maksimenko Alexander
thanks for idea but its unfortunately doesn't fit to me :( because i'm need using proxies for perfomance reasons of cause user a 1-m to group - but i created this example to simplify understanding by problem - in real project my classes are big enough and ojb descriptor is huge ;) Gelhar, Wallac

Re: ojb and interface driven design

2005-03-03 Thread Armin Waibel
I saw ReferenceTest test worked with OJB 1.0.1 too, with a different mapping of the interface. Did you tried to declare the reference-descriptor and fk-field in the interface class mapping too? e.g. Class RefObject is an interface

Re: ojb and interface driven design

2005-03-03 Thread Maksimenko Alexander
Armin Waibel wrote: Maksimenko Alexander wrote: I'm using 1.0.1 version ojb doesnt produce exception but it generates SELECT A0.GROUP_ID,A0.ID FROM USER A0 WHERE A0.GROUP_ID = ? instead of: SELECT A0.GROUP_ID,A0.ID FROM USER A0, group1 a1 WHERE A0.GROUP_ID = a1.id and a1.manager_id=? AFAIK Jakob

Re: ojb and interface driven design

2005-03-03 Thread Thomas Dudziak
I was wondering why you map the Impl classes at all ? You can declare the fields for the interface, you only need to change the PersistentFieldClass in OJB.properties to PersistentFieldIntrospectorImpl or PersistentFieldAutoProxyImpl. I use it this way all the time (with factory-class/factory-metho

RE: ojb and interface driven design

2005-03-03 Thread Gelhar, Wallace Joseph
I've ran into this before. I think the solution I found was to map the reference / collection descriptor classes to the implementing descriptor as follows: Also just note that it usually doesn't pay

Re: ojb and interface driven design

2005-03-03 Thread Armin Waibel
Maksimenko Alexander wrote: I'm using 1.0.1 version ojb doesnt produce exception but it generates SELECT A0.GROUP_ID,A0.ID FROM USER A0 WHERE A0.GROUP_ID = ? instead of: SELECT A0.GROUP_ID,A0.ID FROM USER A0, group1 a1 WHERE A0.GROUP_ID = a1.id and a1.manager_id=? AFAIK Jakob fixed some bugs in c

Re: ojb and interface driven design

2005-03-03 Thread Maksimenko Alexander
I'm using 1.0.1 version ojb doesnt produce exception but it generates SELECT A0.GROUP_ID,A0.ID FROM USER A0 WHERE A0.GROUP_ID = ? instead of: SELECT A0.GROUP_ID,A0.ID FROM USER A0, group1 a1 WHERE A0.GROUP_ID = a1.id and a1.manager_id=? Armin Waibel wrote: Hi, your mapping and query seems ok. Cou

Re: ojb and interface driven design

2005-03-03 Thread Armin Waibel
Hi, your mapping and query seems ok. Could you post the stack trace? Did you try latest from CVS OJB 1.0.x branch (branch OJB_1_0_RELEASE)? In OJB test-suite we have a similar test ReferenceTest#testDeepPathQuery(), this test pass. regards, Armin Maksimenko Alexander wrote: hi! it's wondering bu

Re: ojb and interface driven design

2005-03-03 Thread Maksimenko Alexander
Thanks for answer but it doesnt solve the problem: ojb generates SELECT A0.GROUP_ID,A0.ID FROM USER A0 WHERE A0.GROUP_ID = ? instead of: SELECT A0.GROUP_ID,A0.ID FROM USER A0, group1 a1 WHERE A0.GROUP_ID = a1.id and a1.manager_id=? [EMAIL PROTECTED] wrote: You should map your DB and make the quer

RE: ojb and interface driven design

2005-03-03 Thread David . WIESZTAL
You should map your DB and make the queries with the xxxImpl classes. In your case : QueryByCriteria query = QueryFactory.newQuery(UserImpl.class,new Criteria()); and is useless. David WIESZTAL. -Original Message- From: Maksimenko Alexander [mailto:[EMAIL PROTECTED] Se

ojb and interface driven design

2005-03-03 Thread Maksimenko Alexander
hi! it's wondering but I found out that its difficult to use interface driven design with ojb ;( lets consider a simple 2-table example: interface User{Integer getId(),Group getGroup()}, class UserImpl implements User{private Integer id; private Group group; access methods} interface Group{Int

DBCP, Oracle9i Blob/Clob broken

2005-03-03 Thread Danilo Tommasina
Hi, I just saw another post about Oracle 9i and Blobs, so if somebody is going to get a look into it, here is some more: When using the Oracle9i platform storing Blobs/Clobs does not work when using the DBCP connection factory (org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl) This is