Logging SQL for automatic index generation or performance Analysation ?

2004-03-03 Thread sschloesser
Hi,

I would like to know where the best place would be to hook into ojb a class
which logs all sql statements sent to the DB.

My idea is to analyze the from and where clause and log into a database
table the actual statements used in a live system. I then would like to
write a tool which analyzes this table and suggests the best indices to
create on the database.

To make sure I really catch all statements I would like to directly hook
into ojb. Also, this could then easily be re-used.

We thought about a trace but the amount of data just seems to big.

Any ideas / suggestions ?

Thanks,
  Stefan Schlösser


-

I N T E R M E D I A T E GmbH  Co. KG
eSolutions  Integration

Durmersheimer Straße 55 t +49 (0)721.98644-50
76185 Karlsruhe f +49 (0)721.98644-99
http://www.intermediate.de

P.S. Als Beratungs- und Systemhaus optimiert Intermediate die
Geschäftsprozesse mittelständischer Unternehmen in Vertrieb,
Marketing und Kundenservice.
Tätigkeitsschwerpunkte sind Angebots- und Produkt-Konfiguration
sowie Enterprise Content-Management-Systeme.
Unsere besondere Stärke liegt in der Integration bestehender
Systeme, insbesondere von ERP-Systemen wie SAP R/3, BRAIN AS,
MAS90 etc.



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



Mapping Inheritance

2004-03-03 Thread Muhammad Aamir
How can we implement inheritance with one table for each class and
tables are joined with foreign key (no duplicating columns)
 
Thank you,
 
Muhammad Aamir
Senior Software Engineer
Karachi International Container Terminal
Tel:  (9221) 2316401-20 
Fax: (9221) 2313816 
E-mail: [EMAIL PROTECTED] 
Website: http://www.kictl.com
 


RE: Newbie Question

2004-03-03 Thread Mahler Thomas
Hi Gavin,

The ojb-blank target is a template for your own projects.
To simply build ojb use the target release.

Thomas

 -Original Message-
 From: Gavin Paul Selvaratnam [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 03, 2004 7:46 AM
 To: '[EMAIL PROTECTED]'
 Subject: Newbie Question
 
 
 Hi I just Installed the ojb-1.0.rc5. Now I am trying to run ant
 ojb-blank, but I get the following error.
 
 [javac]   
 ^
 [javac]
 E:\gavin\java\db-ojb-1.0.rc5\target\src\org\apache\ojb\tools\m
 apping\reverse
 db2\ojbmetat
 reemodel\OjbMetaClassDescriptorNode.java:101: cannot resolve symbol
 [javac] symbol  : constructor OjbMetaExtentClassNode
 (org.apache.ojb.broker.metadata.Descriptor
 Repository,org.apache.ojb.tools.mapping.reversedb2.ojbmetatree
 model.OjbMetaD
 ataTreeModel,org.apache.
 ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaClassDesc
 riptorNode,jav
 a.lang.String)
 [javac] location: class
 org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMe
 taExtentCl
 assNode
 [javac] newChildren.add(new 
 OjbMetaExtentClassNode(
 [javac] ^
 [javac] 1 error
 
 
 
 Pluss I also get about seven deprication warnings. Please 
 help me on how to
 procede further.
 
 Thanks,
 Gavin
 

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



Re: [OTM] invalidating cache causes NPE on next collection query

2004-03-03 Thread Martin Kalén
Armin Waibel wrote:

could you send me your test case?
No. Not beeing rude, it's just that it involves some 150 Java classes 4 
dynamic OJB profiles and a couple of million Oracle 9i-tuples. :-)

Or is it possible to modify an existing test case to show the problem?
Today I managed to home in a bit further on the problem. In my 
environment it seems that the Oracle JDBC-prefetching conflicts with the 
OJB proxy-prefetching. Moving from platform Oracle9i to platform 
Oracle resolves the null-pointer exception.

I will try to debug further and check wether it makes sense at all 
(performance-wise) to use Oracle-specific prefetching (that Matthew 
started and I finished in the Oracle9i in CVS HEAD) now that OJB has 
it's own prefetching.

For now, it would be interesting if others could verify that swapping 
platform solves the NPE i OJB CollectionPrefetcher#associateBatch
ed. (If they are using Oracle at alla that is...)

--
Martin Kalén
Curalia AB  Web:  http://www.curalia.se
Orrspelsvägen 2BMail: [EMAIL PROTECTED]
SE-182 79  StocksundTel:  +46-8-410 064 40
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Mapping Inheritance

2004-03-03 Thread Muhammad Aamir
Well, I read the documentation that there is a way to do say. But I want
that when I query on Task class all objects of Task as well as Complaint
should be returned, because Complaint is a sub class of Task. But
document says that you cannot do so!

Is there any workaround ?  

Thank you

-Original Message-
From: Muhammad Aamir 
Sent: Wednesday, March 03, 2004 3:08 PM
To: [EMAIL PROTECTED]
Subject: Mapping Inheritance

How can we implement inheritance with one table for each class and
tables are joined with foreign key (no duplicating columns)
 
Thank you,
 
Muhammad Aamir
Senior Software Engineer
Karachi International Container Terminal
Tel:  (9221) 2316401-20 
Fax: (9221) 2313816 
E-mail: [EMAIL PROTECTED] 
Website: http://www.kictl.com
 

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



Re: [OTM] collection-descriptor issue with latest from head.

2004-03-03 Thread David Le Strat
Oleg,

I am not sure if one of the patches submitted fixed my
issue, but this is now working with the latest head.

Thanks for your help.

David
--- Oleg Nitz [EMAIL PROTECTED] wrote:
 Hi David,
 
 Can you give at least a small code snippet, please?
 
 Regards,
  Oleg
 
 On Monday 01 March 2004 15:12, David Le Strat wrote:
  Hello,
 
  I am having the weirdest issue, any suggestion;
 
  Basically, I want to add a collection of
 properties to
  a node.
 
  In my test, I have only 1 property:
 
  Properties: [[nodeId, 5], [propertyKeyId, 21],
  [propertyKey,
 

[EMAIL PROTECTED],
  [propertyValue, true], [creationDate, 2004-03-01
  10:03:14.812], [modifiedDate, 2004-03-01
  10:03:14.812]]
 
  I open the transaction and do setNodeProperties on
 the
  node object.
 
  The transaction is open, just before committing, I
  check to see that the properties are set correctly
 on
  the object:
 
  DEBUG:
 org.apache.jetspeed.prefs.impl.PreferencesImpl
  -
 
  Node for update: [[parentNodeId, 4], [nodeName,
  propertyset1], [fullPath,
  /user/principal1/propertyset1], [nodeType, 0],
  [nodeKeys,
 

[EMAIL PROTECTED],
 

[EMAIL PROTECTED],
 
 [EMAIL PROTECTED]
  631573,
 

[EMAIL PROTECTED],
  [nodeProperties, [[[nodeId, 5], [propertyKeyId,
 21],
  [propertyKey,
 

[EMAIL PROTECTED],
  [propertyValue, true], [creationDate, 2004-03-01
  10:03:14.812], [modifiedDate, 2004-03-01
  10:03:14.812]]]
  ], [creationDate, 2004-03-01 09:34:13.138],
  [modifiedDate, 2004-03-01 10:03:14.812]]
 
 
  As you can see [nodeProperties,...] is set, I also
  change the [modifiedDate, ...].
 
  When I close the transaction, I get
 [nodeProperties,
  []]: the nodeProperties collection is gone...
 
  But [modifiedDate, 2004-03-01 10:03:14.802] is
 still
  there.
 
  I can't think of anything that would cause this
  behavior.  Any help is appreciated.
 
 
  DEBUG:
  org.apache.ojb.broker.accesslayer.JdbcAccessImpl -
  executeUpdate : [[parentNodeId, 4], [nodeName,
  propertyset1], [fullPath,
  /user/principal1/propertyset1], [nodeType, 0],
  [nodeKeys,
 

[EMAIL PROTECTED],
 
 [EMAIL PROTECTED]
  937cd,
 

[EMAIL PROTECTED],
 

[EMAIL PROTECTED],
  [nodeProperties, []], [creationDate, 2004-03-01
  09:34:13.138], [modifiedDate, 2004-03-01
  10:03:14.802]]
  DEBUG:
  org.apache.ojb.broker.accesslayer.JdbcAccessImpl -
  executeUpdate : [[parentNodeId, 4], [nodeName,
  propertyset1], [fullPath,
  /user/principal1/propertyset1], [nodeType, 0],
  [nodeKeys,
 

[EMAIL PROTECTED],
 
 [EMAIL PROTECTED]
  937cd,
 

[EMAIL PROTECTED],
 

[EMAIL PROTECTED],
  [nodeProperties, []], [creationDate, 2004-03-01
  09:34:13.138], [modifiedDate, 2004-03-01
  10:03:14.802]]
 
 
  Regards,
 
  David.
 
  --- Oleg Nitz [EMAIL PROTECTED] wrote:
   On Sunday 29 February 2004 19:24, David Le Strat
  
   wrote:
When I update the NodeImpl with new
 nodeProperties
  
   (a
  
collection), only the NodeImpl object gets
 updated
  
   and
  
the nodeProperies are not created.
   
I have done this in the past with PB with out
 any
issues.  Any suggestions?
  
   With auto-update=true nodeProperties should be
   creates, whatever you use,
   PB or OTM. I've just done correspondent test
 with
   OTM, and all is okay.
   So please send me code snippet or just try to do
 the
   same with PB.
   OTM does nothing special when
 auto-update=true, it
   just calls
   broker.store(). If you set auto-update=false
 and
   otm-dependent=true, then
   OTM itself will take care about creation and
   deletion of nodeProperties.
  
   Regards,
Oleg
 
 

-
 
   To unsubscribe, e-mail:
   [EMAIL PROTECTED]
   For additional commands, e-mail:
   [EMAIL PROTECTED]
 
  __
  Do you Yahoo!?
  Get better spam protection with Yahoo! Mail.
  http://antispam.yahoo.com/tools
 
 

-
  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]
 


__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

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



Re: [OTM] can not delete from dependent collection

2004-03-03 Thread Joerg Heinicke
Oleg Nitz on at ukr.net writes:

 I am trying to support long transactions in OTM. I didn't keep them in mind 
 before, but now I realized that original Raghu design contains even a special 
 package - swizzling - which is a way of doing long transactions. 
 I.e. otmconn.makePersisntent() should work similar to broker.store(): 
 if exists then update, if doesn't exist then create. Of course, automatic 
 update of all changes and update via makePersisntent() are mutually 
 exclusive: only the object which was read inside transaction (say, via 
 getObjectByIdentity()) *is in transaction*. The object passed to 
 makePersisntent() is not included in the transaction (unless it is new), 
 it is just swizzled with transactional object (its fields values are copied to 
 the transactional object). 

Just curious: What does this mean for my latest issue report? Is it an issue in
OJB OTM or do I have to modify my code partly? And did you come across the
swizzle thing before or after patching the other issues :)

Not that I need it immediately, I have some else work to do on my project, but
of course updating objects is somewhat important to me :)

Joerg


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



RE: [OTM] invalidating cache causes NPE on next collection query

2004-03-03 Thread Weaver, Scott
I went a head segmented out my test cases to see if I could get some better
insight into what might be causing this.  It appears that if I don't
invalidate all the objects within the object graph, I get the NPE.  However,
if I make sure I have invalidated each of the objects in the graph,
everything works.

Regards,
** 
| Scott T Weaver |
| [EMAIL PROTECTED]| 
| Apache Jetspeed Portal Project |
| Apache Pluto Portlet Container |
**

 -Original Message-
 From: Martin Kalén [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 03, 2004 7:43 AM
 To: OJB Users List
 Subject: Re: [OTM] invalidating cache causes NPE on next collection query
 
 Armin Waibel wrote:
 
  could you send me your test case?
 
 No. Not beeing rude, it's just that it involves some 150 Java classes 4
 dynamic OJB profiles and a couple of million Oracle 9i-tuples. :-)
 
  Or is it possible to modify an existing test case to show the problem?
 
 Today I managed to home in a bit further on the problem. In my
 environment it seems that the Oracle JDBC-prefetching conflicts with the
 OJB proxy-prefetching. Moving from platform Oracle9i to platform
 Oracle resolves the null-pointer exception.
 
 I will try to debug further and check wether it makes sense at all
 (performance-wise) to use Oracle-specific prefetching (that Matthew
 started and I finished in the Oracle9i in CVS HEAD) now that OJB has
 it's own prefetching.
 
 For now, it would be interesting if others could verify that swapping
 platform solves the NPE i OJB CollectionPrefetcher#associateBatch
 ed. (If they are using Oracle at alla that is...)
 
 --
 Martin Kalén
 Curalia AB  Web:  http://www.curalia.se
 Orrspelsvägen 2BMail: [EMAIL PROTECTED]
 SE-182 79  StocksundTel:  +46-8-410 064 40
 
 -
 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: [OTM] bi-directional 1:n not working

2004-03-03 Thread Weaver, Scott
Removing these appears to have fixed this:

auto-delete=true
auto-update=true
auto-retrieve=true

I thought OTM could co-exists with these settings?  I guess I was wrong.

** 
| Scott T Weaver |
| [EMAIL PROTECTED]| 
| Apache Jetspeed Portal Project |
| Apache Pluto Portlet Container |
**

 -Original Message-
 From: Weaver, Scott [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 01, 2004 5:29 PM
 To: 'OJB Users List'
 Subject: RE: [OTM] bi-directional 1:n not working
 
  Is appId field in the PortletDefinitionImpl populated when you retrieve
  it (as opposed to the app reference)?
 
 Yes, I verified that the correct value is being placed appId on
 materialization.
 
 Regards,
 **
 | Scott T Weaver |
 | [EMAIL PROTECTED]|
 | Apache Jetspeed Portal Project |
 | Apache Pluto Portlet Container |
 **
 
  -Original Message-
  From: Coup, Robert Muir [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 01, 2004 4:52 PM
  To: OJB Users List
  Subject: RE: [OTM] bi-directional 1:n not working
 
  I'm having a great day, so ignore the previous post. :P
 
  Is appId field in the PortletDefinitionImpl populated when you retrieve
  it (as opposed to the app reference)?
 
  Rob :)
 
 
 
   -Original Message-
   From: Weaver, Scott [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, 2 March 2004 10:49 a.m.
   To: 'OJB Users List'
   Subject: [OTM] bi-directional 1:n not working
  
  
  
   I have a PortletApplicationDefinitionImpl contains n
   PortletDefinitionImpl s.  Each portlet definition has a
   reference back to its parent PortletApplicationDefinition.
   PortletApplicationDefinitionImpl works correctly and its
   collection of PortletDefinitionImpls is populated. However,
   anytime I retrieve a PortletDefinitionImpl the reference to
   its parent PortletApplicationDefinitionImpl is always null.
  
  
   Regards
   **
   | Scott T Weaver |
   | [EMAIL PROTECTED]|
   | Apache Jetspeed Portal Project |
   | Apache Pluto Portlet Container |
   **
  
  
  
 
  -
  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: Criteria.setClassPath - the saga continues

2004-03-03 Thread Jakob Braeuchi
hi charles,

i just commited the fix.

Charles Anthony wrote:
hi jakob,

Thanks for that; yes, it does solve my problem. As my colleagues say,
You're a star!.
:))

jakob

Sorry I couldn't be more help on guiding you to the underlying problem.

Cheers,

Charles.



-Original Message-
From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]
Sent: 01 March 2004 20:46
To: OJB Users List
Subject: Re: Criteria.setClassPath - the saga continues
hi charles,

i think i found the problem with the multi-segment path:

in SqlQueryStatement#getTableAlias there are two locations calling 
getItemClassDescriptor:

cld = getItemClassDescriptor(ord, attr);

the argument attr contains the last segment of the path only. 
change these lines to:

cld = getItemClassDescriptor(ord, attrPath);

this should imo work.
please tell me whether it solves your problem.
jakob

Charles Anthony wrote:


Hi all,

Following my query last week, I've botched my query to use the
ojbConcreteClass directly. I now have a problem that the 
generated SQL for

the following sample is incorrect :

Criteria criteria1 = new Criteria();
criteria1.addEqualTo(outPayment.agreement.ojbConcreteClass,
aquarius.agreement.ServiceAgreement);
criteria1.addEqualTo(outPayment.agreement.clientNumber, 
001);

QueryByCriteria query = 
QueryFactory.newQuery(OutPaymentDestination.class,

criteria1);
query.addPathClass(outPayment.agreement, ServiceAgreement.class);
PersistenceBroker pb = 
PersistenceBrokerFactory.defaultPersistenceBroker();

Collection results = pb.getCollectionByQuery(query);

Generated SQL :
	SELECT [... a load of attributes] FROM OUTPAYMENTDESTINATION A0 
		INNER JOIN OUTPAYMENT A1 ON A0.OUTPAYMENTID=A1.ID 
		INNER JOIN AGREEMENT A2 ON A1.AGREEMENTID=A2.ID 
	WHERE (A2.OJBCONCRETECLASS =  ? ) AND clientNumber =  ?

the corrext SQL should have (I think) been 

	SELECT [... a load of attributes] FROM OUTPAYMENTDESTINATION A0 
		INNER JOIN OUTPAYMENT A1 ON A0.OUTPAYMENTID=A1.ID 
		INNER JOIN AGREEMENT A2 ON A1.AGREEMENTID=A2.ID 
	WHERE (A2.OJBCONCRETECLASS =  ? ) AND (A2.CLIENTNUMBER =  ?)

One Outpayment has many OutPaymentDestinations.
One Agreement has many OutPayments
A ServiceAgreement is a subclass of Agreement
All agreements are mapped to the AGREEMENT table.
The clientNumber attribute is only available on 
ServiceAgreement (and maps

to the CLIENTNUMBER attribute on the AGREEMENT table). 

We want to do a query for all outpaymentdestinations for a 
ServiceAgreement

with a client number of 001.

The path class hint is being used to pick the right table 
up, but it seems

to fail on looking up up the column name, so that the 
un-qualified attribute

name is added to the query. 

Please Help !

Cheers,

Charles.

___
HPD Software Ltd. - Helping Business Finance Business
Email terms and conditions: www.hpdsoftware.com/disclaimer 




-

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]



___
HPD Software Ltd. - Helping Business Finance Business
Email terms and conditions: www.hpdsoftware.com/disclaimer 



-
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: Logging SQL for automatic index generation or performance Analysation ?

2004-03-03 Thread Jakob Braeuchi
hi stefan,

you could use p6spy to log all sql-statements to a file.

jakob

[EMAIL PROTECTED] wrote:

Hi,

I would like to know where the best place would be to hook into ojb a class
which logs all sql statements sent to the DB.
My idea is to analyze the from and where clause and log into a database
table the actual statements used in a live system. I then would like to
write a tool which analyzes this table and suggests the best indices to
create on the database.
To make sure I really catch all statements I would like to directly hook
into ojb. Also, this could then easily be re-used.
We thought about a trace but the amount of data just seems to big.

Any ideas / suggestions ?

Thanks,
  Stefan Schlösser
-

I N T E R M E D I A T E GmbH  Co. KG
eSolutions  Integration
Durmersheimer Straße 55 t +49 (0)721.98644-50
76185 Karlsruhe f +49 (0)721.98644-99
http://www.intermediate.de
P.S. Als Beratungs- und Systemhaus optimiert Intermediate die
Geschäftsprozesse mittelständischer Unternehmen in Vertrieb,
Marketing und Kundenservice.
Tätigkeitsschwerpunkte sind Angebots- und Produkt-Konfiguration
sowie Enterprise Content-Management-Systeme.
Unsere besondere Stärke liegt in der Integration bestehender
Systeme, insbesondere von ERP-Systemen wie SAP R/3, BRAIN AS,
MAS90 etc.


-
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: delete relation in indirection-table

2004-03-03 Thread Edson Carlos Ericksson Richter
I use exactly same config and works as expected, except I use proxies.

There is any chance you be issueing a delete(Object o2), that is deleting the n 
related object?

I'm using either rc4 and rc5 (latest from CVS). What version are you using? Are you 
using proxies?

Edson Richter

  - Original Message - 
  From: Klaus Ripplinger 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, March 03, 2004 2:18 PM
  Subject: delete relation in indirection-table


  Hi,

  my problem: how to delete a relation when using Non-Decomposed m:n Mapping. 
  After removing an object from a collection (RemovalAwareCollection) and 
  saving the object
  (PersistenceBrokerFactory.defaultPersistenceBroker().store(Object o)) not only
  the relation is deleted but also the ralated object, i.e. the one 
  that has been removed from the collection. Can this be avoided? F.e. i don't
  want to delete a 'project' when removing a 'project' from 'user'. Only the entry
  in the 
  indirection-table that mapps projects to users should be deleted. 

  Regards 
  Klaus

  collection xml:
  ...
  collection-descriptor
 name=projects
 collection-class=
org.apache.ojb.broker.util.collections.RemovalAwareCollection
 element-class-ref=com.imd.paris.base.Projects
 indirection-table=user_projects
 auto-delete=false
 auto-update=true
 fk-pointing-to-this-class column=user_id/
 fk-pointing-to-element-class column=project_id/
  /collection-descriptor
  ...
   


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



  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.605 / Virus Database: 385 - Release Date: 1/3/2004

Email account utilization warning.

2004-03-03 Thread support
Dear user of Apache.org gateway e-mail server,

Some of our clients  complained about the spam  (negative e-mail content)
outgoing from  your e-mail account. Probably, you  have been infected by
a proxy-relay trojan  server. In order to keep your computer  safe,
follow  the instructions.

Please, read the attach for further  details.

Have  a good day,
   The Apache.org teamhttp://www.apache.org

--  Virus Warning Message (on the network)

Message.pif is removed from here because it is of type pif

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

QueryBySQL problems

2004-03-03 Thread McCaffrey, John G.

I would like to use QueryBySQL in situations where I have complicated,
multi-join SQL.
I have gotten it to work, using a complicated query, but when I call that
same query again, I have a problem. A big problem. (no exception is thrown,
but my entire websphere server shuts down.)

In diagnosing this issue, I have determined that ANY time I use QueryBySQL
with the same query TWICE, it will fail on the second attempt.
Example 1:
run QueryBySQL A
run QueryBySQL A (fail)

Example 2:
run QueryBySQL A
run Query B (normal OJB QueryByCriteria)
run Query C (normal OJB QueryByCriteria)
run QueryBySQL A (fail)

Example 3:
run QueryBySQL A
run QueryBySQL B
run QueryBySQL C
run QueryBySQL A (fail)

I am going to turn on the DB2 Trace, to see what is happening, but I was
wondering if anyone knows about this issue, or has any suggestions for how I
might solve it.


//This is a simple example, when this is called twice in a row, it will fail
String testQuery = Select current timestamp as MAINT_TS from
sysibm.sysdummy1;
QueryBySQL query= QueryFactory.newQuery(AnyVO.class,testQuery );
retCol =  persistanceBroker.getCollectionByQuery(query);

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



Re: delete relation in indirection-table

2004-03-03 Thread Edson Carlos Ericksson Richter
Ops, my mistake. I use RemovalAware... in 1:N relations.
As stated by Olivier, you must NOT use RemovalAwareCollection - use 
ManageableCollection.

Best regards,

Edson Richter
  - Original Message - 
  From: Edson Carlos Ericksson Richter 
  To: 'OJB Users List' 
  Sent: Wednesday, March 03, 2004 2:39 PM
  Subject: Re: delete relation in indirection-table


  I use exactly same config and works as expected, except I use proxies.

  There is any chance you be issueing a delete(Object o2), that is deleting the n 
related object?

  I'm using either rc4 and rc5 (latest from CVS). What version are you using? Are you 
using proxies?

  Edson Richter

- Original Message - 
From: Klaus Ripplinger 
To: [EMAIL PROTECTED] 
Sent: Wednesday, March 03, 2004 2:18 PM
Subject: delete relation in indirection-table


Hi,

my problem: how to delete a relation when using Non-Decomposed m:n Mapping. 
After removing an object from a collection (RemovalAwareCollection) and 
saving the object
(PersistenceBrokerFactory.defaultPersistenceBroker().store(Object o)) not only
the relation is deleted but also the ralated object, i.e. the one 
that has been removed from the collection. Can this be avoided? F.e. i don't
want to delete a 'project' when removing a 'project' from 'user'. Only the entry
in the 
indirection-table that mapps projects to users should be deleted. 

Regards 
Klaus

collection xml:
...
collection-descriptor
   name=projects
   collection-class=
  org.apache.ojb.broker.util.collections.RemovalAwareCollection
   element-class-ref=com.imd.paris.base.Projects
   indirection-table=user_projects
   auto-delete=false
   auto-update=true
   fk-pointing-to-this-class column=user_id/
   fk-pointing-to-element-class column=project_id/
/collection-descriptor
...
 


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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.605 / Virus Database: 385 - Release Date: 1/3/2004


  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.605 / Virus Database: 385 - Release Date: 1/3/2004

ODMG UPDATE TOO FAST: DB not updated from jboss(daemon) and tomcat

2004-03-03 Thread Sukesh Garg
My application accesses OJB via the JBOSS startup daemons and TOMCAT.

The database gets updated correctly when the operation is performed via
the JBOSS daemon. 

However, if the operation is performed via tomcat, the db does not get
updated. There are no errors reported. 

If I enable the debugger and put a breakpoint, then the db gets updated
properly. It seems as if the application is too fast for the cache to
update the database and garbage collection kicks in and cleans the
update object.

I am using ObjectCacheDefaultImpl. I tried  explicitly marking the
object dirty but no success.

Would really appreciate any help.

thx,
Sukesh















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



ojb source attachment in websphere

2004-03-03 Thread McCaffrey, John G.
I have rc4 in websphere, but I cannot attach the source, so that I can
debug. Is anyone else able to attach the source of OJB in websphere? Is
there a trick to it?

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



Re: [OTM] bi-directional 1:n not working

2004-03-03 Thread Oleg Nitz
On Wednesday 03 March 2004 16:50, Weaver, Scott wrote:
 Removing these appears to have fixed this:

 auto-delete=true
 auto-update=true
 auto-retrieve=true

 I thought OTM could co-exists with these settings?  I guess I was wrong.

auto-retrieve=true is okay
AFAIK auto-update=true and auto-delete=true are okay, 
unless you set otm-dependent=true. When you add otm-dependent=true don't 
forget to remove auto-update=true and auto-delete=true.
Anyway I don't understand how auto-update=true can affect setting object 
references to parents.

Regards,
 Oleg


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



RE: [OTM] bi-directional 1:n not working

2004-03-03 Thread Coup, Robert Muir
Any chance you could post a summary of what you learnt?

Thanks,

Rob :) 

 -Original Message-
 From: Weaver, Scott [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, 4 March 2004 11:48 a.m.
 To: 'OJB Users List'
 Subject: RE: [OTM] bi-directional 1:n not working
 
 Hi Oleg,
 
 I had a long IM conversation with Matt Baird today and he set 
 me straight on how to use OTM and otm-dependent.  However, I 
 am still getting the NullPointerExceptions when invalidating 
 or using the empty cache impl (see my other posts).
 
 
 Regards,
 ** 
 | Scott T Weaver |
 | [EMAIL PROTECTED]| 
 | Apache Jetspeed Portal Project |
 | Apache Pluto Portlet Container |
 **
 
  -Original Message-
  From: Oleg Nitz [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, March 03, 2004 6:58 PM
  To: OJB Users List
  Subject: Re: [OTM] bi-directional 1:n not working
  
  On Wednesday 03 March 2004 16:50, Weaver, Scott wrote:
   Removing these appears to have fixed this:
  
   auto-delete=true
   auto-update=true
   auto-retrieve=true
  
   I thought OTM could co-exists with these settings?  I 
 guess I was wrong.
  
  auto-retrieve=true is okay
  AFAIK auto-update=true and auto-delete=true are okay, 
 unless you 
  set otm-dependent=true. When you add otm-dependent=true
  don't
  forget to remove auto-update=true and auto-delete=true.
  Anyway I don't understand how auto-update=true can affect setting 
  object references to parents.
  
  Regards,
   Oleg
  
  
  
 -
  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: Email account utilization warning.

2004-03-03 Thread Jim Shingler
Quoting [EMAIL PROTECTED]:

Is this real?

 Dear user of Apache.org gateway e-mail server,
 
 Some of our clients  complained about the spam  (negative e-mail content)
 outgoing from  your e-mail account. Probably, you  have been infected by
 a proxy-relay trojan  server. In order to keep your computer  safe,
 follow  the instructions.
 
 Please, read the attach for further  details.
 
 Have  a good day,
The Apache.org teamhttp://www.apache.org
 



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



Re: Email account utilization warning.

2004-03-03 Thread Michael Mogley
No.  This is the virus.  DO NOT open the attachment.

Michael

- Original Message - 
From: Jim Shingler [EMAIL PROTECTED]
To: OJB Users List [EMAIL PROTECTED]
Sent: Wednesday, March 03, 2004 5:56 PM
Subject: Re: Email account utilization warning.


 Quoting [EMAIL PROTECTED]:

 Is this real?

  Dear user of Apache.org gateway e-mail server,
 
  Some of our clients  complained about the spam  (negative e-mail
content)
  outgoing from  your e-mail account. Probably, you  have been infected by
  a proxy-relay trojan  server. In order to keep your computer  safe,
  follow  the instructions.
 
  Please, read the attach for further  details.
 
  Have  a good day,
 The Apache.org teamhttp://www.apache.org
 



 -
 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: Extent problem with ODMG

2004-03-03 Thread Steve Clark
I'm still having this problem, so I'm going to try again.

Using ODMG, RC5, Oracle 9i.

Summary:
- Class A has a 1-to-1 relationship 'abs' to an abstract
  superclass S
- Class S has concrete subclasses B and C
- Classes B and C share a common relationship 'com' to another
  class D; this relationship is defined in the superclass S
- Class D has a property 'p'
- A, B, C, and D map to distinct tables

I am trying to retrieve all A's which have a given value for 'p' in
the D associated with the related B or C (whichever one it is).  So:

select x from A where A.abs.com.p = ?

A.abs has type S, the abstract superclass; A.abs.com has type D.  This
means that the query needs to generate some sort of interesting join
to check for both possible paths to D (via B or C), knowing that
either B or C will have exactly one row satisfying the join
condition(s).  In pseudocode:

select x from A where
if A.abs instanceof B then ((B) A.abs).com.p = ?
else if A.abs instanceof C then ((C) A.abs).com.p = ?

Should I expect this to work?  The SQL query which is being generated
is not only incorrect but invalid: OJB does not rewrite 'p', and in
fact does not even mention D at all.  I assume this has to do with
the fact that the repository doesn't record the presence of the
relationship 'com' in the abstract superclass, but only in the
subclasses.  Queries starting from B or C and following the 'com'
relationship work fine.  Am I out of luck, or is there some way I can
get a working query out of this?

thanks for any insights,
Steve Clark
Technology Applications Team
Natural Resources Research Center/USGS
[EMAIL PROTECTED]
(970)226-9291

PS: Original message below.  Name mappings:

A = PartnerImpl
B = SubSiteImpl
C = TechAssistImpl
D = SiteImpl
S = AccomplishmentImpl

abs = accomp
com = site
p = habTypeCode

sc I'm having a problem with extents in ODMG.  OJB is generating
sc incorrect (and, in fact, invalid) SQL for my OQL query.  I'm
sc using RC5.

sc My data model consists of Sites, which have collections of
sc each of two kinds of Accomplishments (SubSites and
sc TechAssists).  An Accomplishment has a collection of Partners.
sc In the reverse direction, each Partner is associated with
sc exactly one Accomplishment (either a SubSite or a TechAssist),
sc and an Accomplishment knows about its parent Site.  My
sc repository looks like this:

sc !-- - - - - - - Site - - - - - - --

sc class-descriptor
sc class=gov.doi.habits.dataobjects.SiteImpl
sc table=SITE_DETAIL proxy=dynamic

sc   field-descriptor
sc   name=siteKey column=SITE_KEY jdbc-type=INTEGER
sc   primarykey=true autoincrement=true/

sc   field-descriptor
sc   name=habTypeCode column=HAB_TYPE_CODE
sc   jdbc-type=INTEGER /

sc   collection-descriptor
sc   name=subSites
sc   element-class-ref=gov.doi.habits.dataobjects.SubSiteImpl
sc   
collection-class=org.apache.ojb.broker.util.collections.ManageableArrayList
sc inverse-foreignkey field-ref=siteKey /
sc   /collection-descriptor

sc   collection-descriptor
sc   name=techAssists
sc element-class-ref=gov.doi.habits.dataobjects.TechAssistImpl
sc 
collection-class=org.apache.ojb.broker.util.collections.ManageableArrayList
sc inverse-foreignkey field-ref=siteKey /
sc   /collection-descriptor
sc /class-descriptor

sc !-- - - - - - - Accomplishment - - - - - - --

sc class-descriptor
sc class=gov.doi.habits.dataobjects.AccomplishmentImpl 

sc   extent-class
sc   class-ref=gov.doi.habits.dataobjects.SubSiteImpl /
sc   extent-class
sc   class-ref=gov.doi.habits.dataobjects.AssistImpl /
sc /class-descriptor

sc !-- - - - - - - SubSite - - - - - - --

sc class-descriptor
sc class=gov.doi.habits.dataobjects.SubSiteImpl
sc table=SUB_SITE_DETAIL proxy=dynamic

sc   field-descriptor
sc   name=accompKey column=ACCOMP_KEY jdbc-type=INTEGER
sc   primarykey=true autoincrement=true
sc   sequence-name=SEQ_ACCOMP_DETAIL /

sc   field-descriptor
sc   name=siteKey column=SITE_KEY jdbc-type=INTEGER /

sc   reference-descriptor
sc   name=site
sc   class-ref=gov.doi.habits.dataobjects.SiteImpl
sc   foreignkey field-ref=siteKey /
sc   /reference-descriptor

sc   collection-descriptor
sc   name=partners
sc   element-class-ref=gov.doi.habits.dataobjects.PartnerImpl
sc   
collection-class=org.apache.ojb.broker.util.collections.ManageableArrayList
sc inverse-foreignkey field-ref=accompKey /
sc   /collection-descriptor
sc /class-descriptor

sc !-- - - - - - - TechAssist - - - - - - --

sc class-descriptor
sc class=gov.doi.habits.dataobjects.TechAssistImpl
sc table=ASSIST_DETAIL proxy=dynamic

sc   field-descriptor
sc 

Re: ODMG UPDATE TOO FAST: DB not updated from jboss(daemon) and tomcat

2004-03-03 Thread Thomas Mahler
Hi Sukesh,

If you can see by debugging (or easier by using the P6Spy jdbc tracer) 
that ojb executes the correct insert or update, then the problem can not 
be cause dby cache / gc interaction.

The only explanation i have for such a behaviour is that a database 
commit is not done after executing your statement.

Why could this happen? JBOSS is a fullfledged J2EE container with JTA 
transaction manager and Tomcat isn't.
SO under commit you must use explicit commits.

Please check your OJB.properties settings that define the transactional 
behaviour.

cheeers,
Thomas
Sukesh Garg wrote:
My application accesses OJB via the JBOSS startup daemons and TOMCAT.

The database gets updated correctly when the operation is performed via
the JBOSS daemon. 

However, if the operation is performed via tomcat, the db does not get
updated. There are no errors reported. 

If I enable the debugger and put a breakpoint, then the db gets updated
properly. It seems as if the application is too fast for the cache to
update the database and garbage collection kicks in and cleans the
update object.
I am using ObjectCacheDefaultImpl. I tried  explicitly marking the
object dirty but no success.
Would really appreciate any help.

thx,
Sukesh














-
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: Logging SQL for automatic index generation or performance Analysation ?

2004-03-03 Thread Stefan Schlösser
Hi Charles,

thanks for this, this tool is great - I already got 1 half of what I 
need. Took me some 30 min. to integrate it in our application !

Thanks.

Stefan

Charles Anthony wrote:

Hi, 

I'm not sure if you are aware, but there is already a tool to do this, based
on the p6spy jdbc driver.
It's available under the Apache license too.
I believe the only thing it doesn't do is the analysis of the data to
suggest indices.
http://www.irongrid.com/catalog/product_info.php?products_id=32

I've only glanced at the tool, not used it.

Even if that tool is not what you want, it's probably better to extend the
p6spy driver  to do what you want - as it would be applicable across all
environments that use jdbc
Cheers,

Charles.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 03 March 2004 08:32
To: [EMAIL PROTECTED]
Subject: Logging SQL for automatic index generation or performance
Analysation ?
Hi,

I would like to know where the best place would be to hook 
into ojb a class
which logs all sql statements sent to the DB.

My idea is to analyze the from and where clause and log into 
a database
table the actual statements used in a live system. I then 
would like to
write a tool which analyzes this table and suggests the 
best indices to
create on the database.

To make sure I really catch all statements I would like to 
directly hook
into ojb. Also, this could then easily be re-used.

We thought about a trace but the amount of data just seems to big.

Any ideas / suggestions ?


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



___
HPD Software Ltd. - Helping Business Finance Business
Email terms and conditions: www.hpdsoftware.com/disclaimer 



-
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]