AW: What about JDO project ?

2006-01-11 Thread Hiller, Frank RD-AS2
Hi Tom,

IMO this is not good news. It does not affect my work at the moment, but my 
intent was to change my PB implementation to JDO when available with OJB 2.x. 
I'd rather stay with OJB than restarting with JPOX.
Did the OJB team stop the activities concerning JDO?
Is it planned to make a decision in the next future?

Frank
 
-Ursprüngliche Nachricht-
Von: Thomas Dudziak [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 29. Dezember 2005 23:07
An: OJB Users List
Betreff: Re: What about JDO project ?

On 12/22/05, Hale India <[EMAIL PROTECTED]> wrote:

>  I use OJB in our project and we are very happy with it.
>  I just see in news that a jdo project has been created in the apache Db 
> Project.
>  I saw that it is question to implement JSR 243 and that the reference 
> implementation is jpox :
>  http://www.jpox.org
>  On Jpox project i see that they intend to implement JDO 2.0 and that JPOX 
> will be updated in future to also implement any EJB3 specification of Java 
> persistence.
>
>  All that seems good news.
>
>  What about OJB future in the middle of that ?

Nothing official, but given that Jpox is really a good JDO2 implementation with 
an Apache license, I would think that a JDO2 implementation for OJB might not 
be too useful anymore.

Tom

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



Confidentiality note:
The information in this email and any attachment may contain confidential and 
proprietary information of Heidelberger Druckmaschinen AG and/or its affiliates 
and may be privileged or otherwise protected from disclosure. If you are not 
the intended recipient, you are hereby notified that any review, reliance or 
distribution by others or forwarding without express permission is strictly 
prohibited and may cause liability. In case you have received this message due 
to an error in transmission, we kindly ask you to notify the sender immediately 
and to delete this email and any attachment from your system.

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



Re: lazy loading 1.0.4

2006-01-11 Thread Dennis Bekkering
Armin,

I looked at it a little better and it is because i have my own cache
for model and view objects because they are used so much.

I think that I also understand why the initial organisation query only
queries the organisation and country table while there are a lot more
references. When the reference id 's are null there are no queries.
And the parent organisations are in the cache already while fetching
all organisations.

thanks,
Dennis


>Indeed that's strange! Are you sure that no cache was used in your test
>
> (e.g. enable logging for class
> org.apache.ojb.broker.cache.CacheDistributor and check output)?
> If yes, it needs detailed analysis. In this case please add a bug report
> in JIRA with detailed description to reproduce the behavior.
>
> regards,
> Armin
>

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



strange ojb behavior with collection

2006-01-11 Thread matthieu . patou





Dear ojb user,
i've got a question about the behavior of OJB (1.0.3).
If i ask for a collection of vehicule OJB fetch the data from the database
to build the collection  the expect bellow show what P6SPY catch :
[11/01/06 12:13:23:808 CET] 78faf5a0 SystemOut O
1136978003808|60|7|statement|SELECT A0.VO_ID,A0.VO_NUMPOLICE,...AND
'2007-01-01' ORDER BY 30
[11/01/06 12:13:23:808 CET] 78faf5a0 SystemOut O
1136978003808|-1||resultset|SELECT A0.VO_ID,A0.VO_NUMPOLICE,..., 5 =
3215511129887689, 6 = null

After, OJB fetch the relations that i asked to be prefetched; till there
OJB works as expected. But if i iterate on the collection, it seems that
OJB is doing something with the database as resultsets (without statement
just above) appear in the log (see the log file attached to this email) and
with an external trace tool i see a DSNHTTR SENSITIVE SCROLL command issued
from the JDBC driver.

Thoses two traces looks like OJB is doing a cursor scroll to fetch the
data. But i don't understand the interest of this since it has already
fetched (or seems to)  the data when it has built the collection.

For more information, the file below is a copy of the p6spy trace.

(See attached file: tracep6spy.zip)


Regards Matthieu PATOU

DINQ/DSIN/SIDM/VNVO/VOIN
Téléphone 01 30 19 17 91  (29 17 91)<>
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Collection problem 1:n relationship

2006-01-11 Thread Renaud Lévy

 Hello,

I've got a simple problem  of collection's retrieve :
There are 2 tables :  InfoData  and ValueData with foreign key and 
datetime field

as it's describe  in my repository


   primarykey="true"/>

   
   

   




   primarykey="true"/>
   primarykey="true"/>
  



So i would like , only record in my collection for an id and a date given
I try many of solutions to have a correct results like this one

 Criteria criteres = new Criteria();   
 criteres.addEqualTo("id", new Integer(1));
 criteres.addEqualTo("listeValueData.date", valueDate); 
 QueryByCriteria q = new QueryByCriteria(InfoData.class, 
criteres); 
 collection = broker.getCollectionByQuery(q);


with subquery or with QueryCustomizer (can not change the attribute on 
the fly ?) and i have always got  all the rows of the table VALUE_DATA


is there the generated sql  :

[http-8080-Processor4] 2006/01/11 17:03:21,663 DEBUG JdbcAccessImpl  
executeQuery: QueryByCriteria from class 
ame.gcr.domaine.instrument.InfoData  where [id = 1, listeValueData.date 
= 2006-01-04 00:00:00.0]
[http-8080-Processor4] 2006/01/11 17:03:21,663 DEBUG 
SqlQueryStatement$TableAlias  TableAlias(): using hints ? false
[http-8080-Processor4] 2006/01/11 17:03:21,663 DEBUG 
SqlQueryStatement$TableAlias  TableAlias(): using hints ? false
[http-8080-Processor4] 2006/01/11 17:03:21,663 DEBUG 
SqlGeneratorDefaultImpl  Result of getTableAlias(): VALUE_DATA A1
[http-8080-Processor4] 2006/01/11 17:03:21,663 DEBUG 
SqlGeneratorDefaultImpl  SQL:SELECT A0.ID,A0.NAME FROM INFO_DATA 
A0,VALUE_DATA A1 WHERE A0.ID=A1.ID AND ((A0.ID = ?) AND A1.DATE = ?)
[http-8080-Processor4] 2006/01/11 17:03:21,679 DEBUG JdbcAccessImpl  
executeQuery: [EMAIL PROTECTED]
[http-8080-Processor4] 2006/01/11 17:03:21,679 DEBUG JdbcAccessImpl  
executeQuery: QueryByCriteria from class 
ame.gcr.domaine.instrument.ValueData  where [id = 1]
[http-8080-Processor4] 2006/01/11 17:03:21,679 DEBUG 
SqlQueryStatement$TableAlias  TableAlias(): using hints ? false
[http-8080-Processor4] 2006/01/11 17:03:21,679 DEBUG 
SqlGeneratorDefaultImpl  SQL:SELECT A0.ID,A0.DATE,A0.VALUE FROM 
VALUE_DATA A0 WHERE A0.ID = ?
[http-8080-Processor4] 2006/01/11 17:03:21,679 DEBUG JdbcAccessImpl  
executeQuery: [EMAIL PROTECTED]


Thanks for your advice

Regards

Renaud


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



Re: Collection problem 1:n relationship

2006-01-11 Thread Armin Waibel

Hi Renaud,

Renaud Lévy wrote:

 Hello,

I've got a simple problem  of collection's retrieve :
There are 2 tables :  InfoData  and ValueData with foreign key and 
datetime field

as it's describe  in my repository


   primarykey="true"/>

   
   
   





   primarykey="true"/>
   primarykey="true"/>
  





Class ValueData use a compound PK but in the collection-descriptor of 
InfoData you only define one part of the compounded PK (ref to 'id'). 
Please try to add a element-class-ref for 'data' too or if possible 
disable PK setting in ValueData.

HTH
regards,
Armin




So i would like , only record in my collection for an id and a date given
I try many of solutions to have a correct results like this one

 Criteria criteres = new Criteria();
criteres.addEqualTo("id", new Integer(1));
 criteres.addEqualTo("listeValueData.date", valueDate);  
QueryByCriteria q = new QueryByCriteria(InfoData.class, criteres); 
 collection = broker.getCollectionByQuery(q);


with subquery or with QueryCustomizer (can not change the attribute on 
the fly ?) and i have always got  all the rows of the table VALUE_DATA


is there the generated sql  :

[http-8080-Processor4] 2006/01/11 17:03:21,663 DEBUG JdbcAccessImpl  
executeQuery: QueryByCriteria from class 
ame.gcr.domaine.instrument.InfoData  where [id = 1, listeValueData.date 
= 2006-01-04 00:00:00.0]
[http-8080-Processor4] 2006/01/11 17:03:21,663 DEBUG 
SqlQueryStatement$TableAlias  TableAlias(): using hints ? false
[http-8080-Processor4] 2006/01/11 17:03:21,663 DEBUG 
SqlQueryStatement$TableAlias  TableAlias(): using hints ? false
[http-8080-Processor4] 2006/01/11 17:03:21,663 DEBUG 
SqlGeneratorDefaultImpl  Result of getTableAlias(): VALUE_DATA A1
[http-8080-Processor4] 2006/01/11 17:03:21,663 DEBUG 
SqlGeneratorDefaultImpl  SQL:SELECT A0.ID,A0.NAME FROM INFO_DATA 
A0,VALUE_DATA A1 WHERE A0.ID=A1.ID AND ((A0.ID = ?) AND A1.DATE = ?)
[http-8080-Processor4] 2006/01/11 17:03:21,679 DEBUG JdbcAccessImpl  
executeQuery: [EMAIL PROTECTED]
[http-8080-Processor4] 2006/01/11 17:03:21,679 DEBUG JdbcAccessImpl  
executeQuery: QueryByCriteria from class 
ame.gcr.domaine.instrument.ValueData  where [id = 1]
[http-8080-Processor4] 2006/01/11 17:03:21,679 DEBUG 
SqlQueryStatement$TableAlias  TableAlias(): using hints ? false
[http-8080-Processor4] 2006/01/11 17:03:21,679 DEBUG 
SqlGeneratorDefaultImpl  SQL:SELECT A0.ID,A0.DATE,A0.VALUE FROM 
VALUE_DATA A0 WHERE A0.ID = ?
[http-8080-Processor4] 2006/01/11 17:03:21,679 DEBUG JdbcAccessImpl  
executeQuery: [EMAIL PROTECTED]


Thanks for your advice

Regards

Renaud


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




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



Re: bad sql on n-m relation to subclassed object

2006-01-11 Thread Jakob Braeuchi

hi nicolas,

i'm pleased the latest version works for you.
could you please post the error, or give me a hint where you found 
discussions about the bug.


jakob

delahaye.nicolas schrieb:

Hi jakob,

Ok, it is working with 1.0.4. 
But if i want retreive the super class alone, a wrong SLQ

query is made, I have seen on the forum that is a bug. My
question is : do you know if this defect will be fixed on 1.0.5 ?

Best regards
Nicolas DELAHAYE



hi nicolas,

ojb just release 1.0.4. could you please try this as well ?

jakob




Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34 €/mn) ; tél : 08 92 68 13 50 (0,34€/mn)





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





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



Re: strange ojb behavior with collection

2006-01-11 Thread Jakob Braeuchi

hi matthieu,

ojb does nothing strange here. it's a p6spy feature that allows you to 
log access to the result set.


... 818|-1||resultset|SELECT A0.VO_ID,A0.VO_N 

this is the way to exclude resultset log entries :

#list of categories to exclude: error, info, batch, debug, statement,
#commit, rollback and result are valid values
excludecategories=info,debug,result,batch,resultset,prepared

hth
jakob

[EMAIL PROTECTED] schrieb:





Dear ojb user,
i've got a question about the behavior of OJB (1.0.3).
If i ask for a collection of vehicule OJB fetch the data from the database
to build the collection  the expect bellow show what P6SPY catch :
[11/01/06 12:13:23:808 CET] 78faf5a0 SystemOut O
1136978003808|60|7|statement|SELECT A0.VO_ID,A0.VO_NUMPOLICE,...AND
'2007-01-01' ORDER BY 30
[11/01/06 12:13:23:808 CET] 78faf5a0 SystemOut O
1136978003808|-1||resultset|SELECT A0.VO_ID,A0.VO_NUMPOLICE,..., 5 =
3215511129887689, 6 = null

After, OJB fetch the relations that i asked to be prefetched; till there
OJB works as expected. But if i iterate on the collection, it seems that
OJB is doing something with the database as resultsets (without statement
just above) appear in the log (see the log file attached to this email) and
with an external trace tool i see a DSNHTTR SENSITIVE SCROLL command issued
from the JDBC driver.

Thoses two traces looks like OJB is doing a cursor scroll to fetch the
data. But i don't understand the interest of this since it has already
fetched (or seems to)  the data when it has built the collection.

For more information, the file below is a copy of the p6spy trace.

(See attached file: tracep6spy.zip)


Regards Matthieu PATOU

DINQ/DSIN/SIDM/VNVO/VOIN
Téléphone 01 30 19 17 91  (29 17 91)




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




No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.17/227 - Release Date: 11.01.2006



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



RE: OJB 1.0.4 and ODMG Database.makePersistent

2006-01-11 Thread Kessler, Dirk
Armin, thanks for your reply.

We have transactions that span multiple web requests (pages) and we use
the PK values to identify objects that have been persisted on the
various pages (in order to re-display the contents of the objects if the
user goes back to one of those pages). 

There are definitely many other ways we could have solved this problem
but re-using the IDs created by the makePersist method seemed the most
straightforward (since OJB makes sure that all of the IDs are unique).

Thanks for your suggestion of using the SequenceManager.

-Dirk


-Original Message-
From: Armin Waibel [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 10, 2006 7:02 AM
To: OJB Users List
Subject: Re: OJB 1.0.4 and ODMG Database.makePersistent

Hi Dirk,

Kessler, Dirk wrote:
> There appears to be a change in behavior in the
Database.makePersistent
> method. In OJB 1.0RC7 the Database.makePersistent class would update
the
> primary key field of the object being persisted (autoincrement) even
> before the transaction was committed (I.E. right after the
> makePersistent call). It appears that in OJB 1.0.4 the primary key
value
> does not get updated until the transaction is committed.
> 

yep, this change was needed to harmonize OJB behavior with 
SequenceManager based on database identity columns. In this case it's 
not possible to set the PK values when the object is stored 
(#makePersistent call), only after the object is written to DB.
Only this way OJB will show the same behavior for all DB/PK-generation.

>  
> 
> Is there any way to have makePersistent set the primary key value (it
> can't be a transient value, it has to be the balue eventually stored
in
> the database)?
> 

It would be easy to implement a method which lookup the SequenceManager 
obtain the next PK value and set this value in your object - but this 
will cause some overhead.
Why do you need the "PK assign before store" functionality?

regards,
Armin

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


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



Re: uses OUTER JOIN by default... --> BUG or FUNCTIONALITY ?

2006-01-11 Thread Jakob Braeuchi

hi sergey,

ojb just tries to be clever ;) outer joins are created when there are 
extents etc.


could you please post the relevant parts of your mapping file and the 
generated sql.


jakob

Manukyan, Sergey schrieb:

After some tests found out that OJB generates LEFT OUTER JOIN instead of
INNER JOIN in a 1:N relationship if both ends are same class.

Is that a planned functionality or a bug? 


In my case I need 1:N relationship to be made from MyClass to Collection
of MyClasses... How can I force then OJB to generate INNER JOIN in that
case?

-Sergey




-Original Message-
From: Manukyan, Sergey [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 10, 2006 9:00 AM

To: OJB Users List
Subject: uses OUTER JOIN by default...


Hi,

I just moved to OJB 1.0.4. One thing I noticed is that it started
generating OUTER JOIN although I didn't specify it to do so. In my case
with ReportQuery with following columns:

String[] queryColumns = new String[] {
"allChildren.addressLine1",
"allChildren.addressLine2",
"allChildren.addressLine4",
"allChildren.addressLine5",
"allChildren.allRequisitionTypesOfSupplier.reqType"
};

It generates OUTER JOIN for "allChildren" and INNER JOIN for
"allRequisitionTypesOfSupplier" when I need only INNER JOINS.

Please advice, is it a bug or should I somehow specifically tell OJB to
use INNER JOIN?

Thank you,

Sergey



**
** LEGAL DISCLAIMER **
**

This E-mail message and any attachments may contain

legally privileged, confidential or proprietary

information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of

this message to the intended recipient(s), you are

hereby notified that any dissemination, distribution

or copying of this E-mail message is strictly

prohibited. If you have received this message in

error, please immediately notify the sender and

delete this E-mail message from your computer.

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


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





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



Re: OJB 1.0.4 and ODMG Database.makePersistent

2006-01-11 Thread Armin Waibel

Hi Dirk,

Kessler, Dirk wrote:

Armin, thanks for your reply.

We have transactions that span multiple web requests (pages) and we use
the PK values to identify objects that have been persisted on the
various pages (in order to re-display the contents of the objects if the
user goes back to one of those pages). 


There are definitely many other ways we could have solved this problem
but re-using the IDs created by the makePersist method seemed the most
straightforward (since OJB makes sure that all of the IDs are unique).



I would suggest to use one of the OJB listener interface to get notified 
about the new inserted objects:

http://db.apache.org/ojb/docu/guides/pb-guide.html#Hook+into+OJB+-+PB-Listener+and+Instance+Callbacks
http://db.apache.org/ojb/docu/guides/odmg-guide.html#Access+the+PB-api+within+ODMG

e.g. your class can implement PBLifeCycleListener and add itself (if 
objects will be inserted) after the odmg-tx started as temporary 
listener, then on t.commit you can read all PK's via 
PBLifeCycleListener#afterInsert


Instead of the PK values you can use the OJB Identity object of each 
persistent object, then you can re-display the objects via 
PersistenceBroker#getObjectByIdeneity which is much faster than using an 
OQL-query.


regards,
Armin


Thanks for your suggestion of using the SequenceManager.

-Dirk


-Original Message-
From: Armin Waibel [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 10, 2006 7:02 AM

To: OJB Users List
Subject: Re: OJB 1.0.4 and ODMG Database.makePersistent

Hi Dirk,

Kessler, Dirk wrote:


There appears to be a change in behavior in the


Database.makePersistent


method. In OJB 1.0RC7 the Database.makePersistent class would update


the


primary key field of the object being persisted (autoincrement) even
before the transaction was committed (I.E. right after the
makePersistent call). It appears that in OJB 1.0.4 the primary key


value


does not get updated until the transaction is committed.




yep, this change was needed to harmonize OJB behavior with 
SequenceManager based on database identity columns. In this case it's 
not possible to set the PK values when the object is stored 
(#makePersistent call), only after the object is written to DB.

Only this way OJB will show the same behavior for all DB/PK-generation.





Is there any way to have makePersistent set the primary key value (it
can't be a transient value, it has to be the balue eventually stored


in


the database)?




It would be easy to implement a method which lookup the SequenceManager 
obtain the next PK value and set this value in your object - but this 
will cause some overhead.

Why do you need the "PK assign before store" functionality?

regards,
Armin

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


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




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



RE: uses OUTER JOIN by default... --> BUG or FUNCTIONALITY ?

2006-01-11 Thread Manukyan, Sergey
Hi Jacob,

Well, see yourself if it is a clever behavior:

Here is a simplified repository data:













...


And using a ReportQuery with fields:
{"pkField","allChildren.allTypes.typeDescription"}

It generates SQL:

SELECT ... FROM SUPPLIER A0 LEFT OUTER JOIN (SUPPLIER A1 INNER JOIN
TYPES A2 ON ...) ON ...

Again I am not specifying it to do LEFT OUTER JOIN for "allChildren"
relationship or any other relationship.

It does that way when:
- there are present two relations together. In case I am retrieving just
{"pkField","allChildren.pkField"} it workes correctly.
- and both sides of relationship represent same class. When children are
located in other class it also workes correctly.

To me it is an unexpected cleverness without "legal" way to disable or
control it which is kind of frustrating...

-Sergey










-Original Message-
From: Jakob Braeuchi [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 11, 2006 1:06 PM
To: OJB Users List
Subject: Re: uses OUTER JOIN by default... --> BUG or FUNCTIONALITY ?

hi sergey,

ojb just tries to be clever ;) outer joins are created when there are 
extents etc.

could you please post the relevant parts of your mapping file and the 
generated sql.

jakob

Manukyan, Sergey schrieb:
> After some tests found out that OJB generates LEFT OUTER JOIN instead
of
> INNER JOIN in a 1:N relationship if both ends are same class.
> 
> Is that a planned functionality or a bug? 
> 
> In my case I need 1:N relationship to be made from MyClass to
Collection
> of MyClasses... How can I force then OJB to generate INNER JOIN in
that
> case?
> 
> -Sergey
> 
> 
> 
> 
> -Original Message-
> From: Manukyan, Sergey [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, January 10, 2006 9:00 AM
> To: OJB Users List
> Subject: uses OUTER JOIN by default...
> 
> 
> Hi,
> 
> I just moved to OJB 1.0.4. One thing I noticed is that it started
> generating OUTER JOIN although I didn't specify it to do so. In my
case
> with ReportQuery with following columns:
> 
> String[] queryColumns = new String[] {
>   "allChildren.addressLine1",
>   "allChildren.addressLine2",
>   "allChildren.addressLine4",
>   "allChildren.addressLine5",
>   "allChildren.allRequisitionTypesOfSupplier.reqType"
>   };
> 
> It generates OUTER JOIN for "allChildren" and INNER JOIN for
> "allRequisitionTypesOfSupplier" when I need only INNER JOINS.
> 
> Please advice, is it a bug or should I somehow specifically tell OJB
to
> use INNER JOIN?
> 
> Thank you,
> 
> Sergey
> 
> 
> 
> **
> ** LEGAL DISCLAIMER **
> **
> 
> This E-mail message and any attachments may contain
> 
> legally privileged, confidential or proprietary
> 
> information. If you are not the intended recipient(s),
> or the employee or agent responsible for delivery of
> 
> this message to the intended recipient(s), you are
> 
> hereby notified that any dissemination, distribution
> 
> or copying of this E-mail message is strictly
> 
> prohibited. If you have received this message in
> 
> error, please immediately notify the sender and
> 
> delete this E-mail message from your computer.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

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


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



Configurable interface for LockManagers

2006-01-11 Thread DiCorpo, Phillip
I've created my own LockManager implementation for OJB 1.0.4 that
implements the Configurable interface and I've added some of the
properties this implementation needs to the OJB.properties file.  By
doing so I was hoping that my LockManager would be configured at some
point, like in the LockManagerFactory, but it doesn't seem to be
happening and I can't find any evidence of it happening in the source.
Am I missing something?  In the meantime I'm explicitly getting the
OjbConfigurator and configuring the LockManager in it's default
constructor.  How is this working for LockManagerRemoteImpl?   Thanks in
advance,
 
--Phil
 


Re: uses OUTER JOIN by default... --> BUG or FUNCTIONALITY ?

2006-01-11 Thread Jakob Braeuchi

hi sergey,

what do the criteria look like ? do you use or-criteria ?

ojb provides a method to force an outer join, but currently there's no 
way to prevent the usage of the outer join.


please post your classes, the report-query and if possible the 
ddl-statements so i can try to reproduce this behaviour.


in case you want to help us to fix this bug the constructor of 
SqlQueryStatement#Join is the right place to set a conditional 
breakpoint (isOuter == true).


thanks
jakob

Manukyan, Sergey schrieb:

Hi Jacob,

Well, see yourself if it is a clever behavior:

Here is a simplified repository data:













...


And using a ReportQuery with fields:
{"pkField","allChildren.allTypes.typeDescription"}

It generates SQL:

SELECT ... FROM SUPPLIER A0 LEFT OUTER JOIN (SUPPLIER A1 INNER JOIN
TYPES A2 ON ...) ON ...

Again I am not specifying it to do LEFT OUTER JOIN for "allChildren"
relationship or any other relationship.

It does that way when:
- there are present two relations together. In case I am retrieving just
{"pkField","allChildren.pkField"} it workes correctly.
- and both sides of relationship represent same class. When children are
located in other class it also workes correctly.

To me it is an unexpected cleverness without "legal" way to disable or
control it which is kind of frustrating...

-Sergey










-Original Message-
From: Jakob Braeuchi [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 11, 2006 1:06 PM

To: OJB Users List
Subject: Re: uses OUTER JOIN by default... --> BUG or FUNCTIONALITY ?

hi sergey,

ojb just tries to be clever ;) outer joins are created when there are 
extents etc.


could you please post the relevant parts of your mapping file and the 
generated sql.


jakob

Manukyan, Sergey schrieb:


After some tests found out that OJB generates LEFT OUTER JOIN instead


of


INNER JOIN in a 1:N relationship if both ends are same class.

Is that a planned functionality or a bug? 


In my case I need 1:N relationship to be made from MyClass to


Collection


of MyClasses... How can I force then OJB to generate INNER JOIN in


that


case?

-Sergey




-Original Message-
From: Manukyan, Sergey [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 10, 2006 9:00 AM

To: OJB Users List
Subject: uses OUTER JOIN by default...


Hi,

I just moved to OJB 1.0.4. One thing I noticed is that it started
generating OUTER JOIN although I didn't specify it to do so. In my


case


with ReportQuery with following columns:

String[] queryColumns = new String[] {
"allChildren.addressLine1",
"allChildren.addressLine2",
"allChildren.addressLine4",
"allChildren.addressLine5",
"allChildren.allRequisitionTypesOfSupplier.reqType"
};

It generates OUTER JOIN for "allChildren" and INNER JOIN for
"allRequisitionTypesOfSupplier" when I need only INNER JOINS.

Please advice, is it a bug or should I somehow specifically tell OJB


to


use INNER JOIN?

Thank you,

Sergey



**
** LEGAL DISCLAIMER **
**

This E-mail message and any attachments may contain

legally privileged, confidential or proprietary

information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of

this message to the intended recipient(s), you are

hereby notified that any dissemination, distribution

or copying of this E-mail message is strictly

prohibited. If you have received this message in

error, please immediately notify the sender and

delete this E-mail message from your computer.

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


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






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


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





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



Re: Configurable interface for LockManagers

2006-01-11 Thread Armin Waibel

Hi Phil,

DiCorpo, Phillip wrote:

I've created my own LockManager implementation for OJB 1.0.4 that
implements the Configurable interface and I've added some of the
properties this implementation needs to the OJB.properties file.  By
doing so I was hoping that my LockManager would be configured at some
point, like in the LockManagerFactory, but it doesn't seem to be
happening and I can't find any evidence of it happening in the source.
Am I missing something?


This is a bug, the LockManagerFactory doesn't configure the LockManager 
instance - will fix this ASAP.



 In the meantime I'm explicitly getting the
OjbConfigurator and configuring the LockManager in it's default
constructor.  How is this working for LockManagerRemoteImpl?   Thanks in
advance,


A workaround will be to configure once LockManagerRemoteImpl by hand 
before the first use of odmg-api:


LockManager lm = LockManagerFactory.getLockManager();
if(lm instanceof Configurable)
{
Configurator configurator = OjbConfigurator.getInstance();
configurator.configure((LockManager)lm);
}

HTH
regards,
Armin


 
--Phil
 



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



Re: Configurable interface for LockManagers

2006-01-11 Thread Armin Waibel

Armin Waibel wrote:
A workaround will be to configure once LockManagerRemoteImpl by hand 
before the first use of odmg-api:


LockManager lm = LockManagerFactory.getLockManager();
if(lm instanceof Configurable)
{
Configurator configurator = OjbConfigurator.getInstance();
configurator.configure((LockManager)lm);
}



Sorry this doesn't work, because the LockManagerFactory always wraps 
LockManager instances with LockManagerOdmgImpl.


I try to fix the LockManagerFactory bug till tomorrow - stay tuned.

regards,
Armin




HTH
regards,
Armin


 
--Phil
 



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




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