reflexive collections

2006-04-07 Thread Daniel Perry
Is it possible for an object to have a reflexive collection? ie a collection of itselfs? Eg, Class person has: /** * @ojb.collection element-class-ref=Person * indirection-table=friends * foreignkey=personId remote-foreignkey=friendId * proxy=true

RE: PB linking problem

2005-11-07 Thread Daniel Perry
List Subject: Re: PB linking problem On 11/4/05, Daniel Perry [EMAIL PROTECTED] wrote: Not sure if this is really an bug, or just a 'feature', but things dont get linked under certain curcumstances. I have two objects: activity, and attachment. An activity has a collection

RE: PB linking problem

2005-11-07 Thread Daniel Perry
Daniel Perry wrote: Not sure if this is really an bug, or just a 'feature', but things dont get linked under certain curcumstances. I have two objects: activity, and attachment. An activity has a collection of attachments. /** * @ojb.collection element-class-ref

PB linking problem

2005-11-04 Thread Daniel Perry
Not sure if this is really an bug, or just a 'feature', but things dont get linked under certain curcumstances. I have two objects: activity, and attachment. An activity has a collection of attachments. /** * @ojb.collection element-class-ref=com.netcase.pol.bo.Attachment

RE: [junk] Re: Boolean2IntFieldConversion with TINYINT

2005-09-07 Thread Daniel Perry
- From: Thomas Franke [mailto:[EMAIL PROTECTED] Sent: 06 September 2005 17:19 To: OJB Users List Subject: [junk] Re: Boolean2IntFieldConversion with TINYINT Daniel Perry wrote: Boolean2IntFieldConversion mapped as a TINYINT - it MUST be INTEGER!!! I don't know what you exactly mean but we

RE: Boolean2IntFieldConversion with TINYINT

2005-09-07 Thread Daniel Perry
. -Original Message- From: Thomas Dudziak [mailto:[EMAIL PROTECTED] Sent: 07 September 2005 09:18 To: OJB Users List Subject: Re: [junk] Re: Boolean2IntFieldConversion with TINYINT On 9/7/05, Daniel Perry [EMAIL PROTECTED] wrote: What i mean, is that you cant do: field

RE: Boolean2IntFieldConversion with TINYINT

2005-09-07 Thread Daniel Perry
Subject: Re: Boolean2IntFieldConversion with TINYINT On 9/7/05, Daniel Perry [EMAIL PROTECTED] wrote: The following works fine: /** * @ojb.field jdbc-type=INTEGER * conversion=org.apache.ojb.broker.accesslayer.conversions.Boolean2 IntFieldCo nversion */ protected boolean

RE: Boolean2IntFieldConversion with TINYINT

2005-09-07 Thread Daniel Perry
file) to people using it properly! Daniel. -Original Message- From: Thomas Dudziak [mailto:[EMAIL PROTECTED] Sent: 07 September 2005 15:36 To: OJB Users List Subject: Re: Boolean2IntFieldConversion with TINYINT On 9/7/05, Daniel Perry [EMAIL PROTECTED] wrote: Hmm... What about

Boolean2IntFieldConversion with TINYINT

2005-09-06 Thread Daniel Perry
A warning to anyone else who might try this: Just been struggling with IllegalArgumentExceptions on boolean fields. Anyway, it turns out that you cant have a boolean with Boolean2IntFieldConversion mapped as a TINYINT - it MUST be INTEGER!!! Daniel.

xdoclet module with Java 1.5

2005-09-01 Thread Daniel Perry
Hi, I'm trying to use the OJB xdoclet module (from 1.0.3 download) with java 5 generics. The following: ArrayList Integergeneric = new ArrayListInteger(); gives an error: [ojbdoclet] Error parsing File C:\java\pol\src\java\Test.java:Encountered at line 11, column 27. [ojbdoclet] Was

RE: xdoclet module with Java 1.5

2005-09-01 Thread Daniel Perry
that library to one of the snapshots that has the generics parsing support. I can email the file I am using, if you want. To answer your second question, ues you can use generics just fine in OJB (due to erasure). Using it here without issue. -Andrew -Original Message- From: Daniel

RE: No running tx found

2005-01-14 Thread Daniel Perry
OJB warns you every time you write to the database without doing so in a transaction. If you dont have any need for a transaction, then thats acceptable... but it will WARN you! It's considered best practice to perform writes in a transaction, especially when there are multiple associated

RE: addPrefetchedRelationship

2004-12-16 Thread Daniel Perry
Taken from: http://db.apache.org/ojb/docu/guides/query.html#Report+Queries Report Queries Report queries are used to retrieve row data, not 'real' business objects. A row is an array of Object. With these queries you can define what attributes of an object you want to have in the row. The

RE: switching between databases

2004-12-09 Thread Daniel Perry
No problem... Instead of doing: broker = PersistenceBrokerFactory.defaultPersistenceBroker(); Use broker = PersistenceBrokerFactory.createPersistenceBroker(new PBKey(jcdAlias)); Where jcdAlias is the alias you gave the connection in repository_database.xml. I'm pretty sure you can do it using

RE: Criteria through extent (Was: Circular criteria)

2004-12-09 Thread Daniel Perry
when resolving the path meeting.pdp.createdBy ojb looks for a collection- or reference-descriptor called 'meeting' and it uses the referenced class to reolve further path-segements 'pdp'. so if the class referenced by 'meeting' does not have a reference-descriptor named 'pdp' ojb is not

RE: p6spy

2004-12-09 Thread Daniel Perry
. -Original Message- From: Daniel Perry [mailto:[EMAIL PROTECTED] Sent: 08 December 2004 10:32 To: OJB Users List Subject: RE: p6spy Well, i added: com.mysql.jdbc.Driver a = new com.mysql.jdbc.Driver(); com.p6spy.engine.spy.P6SpyDriver b = new com.p6spy.engine.spy.P6SpyDriver(); Just

RE: p6spy

2004-12-08 Thread Daniel Perry
, and it seems to be working. In the faq i found it doesnt mention that you need to copy this file into the classpath! Daniel. -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: 07 December 2004 19:28 To: OJB Users List Subject: Re: p6spy Daniel Perry wrote

Criteria through extent (Was: Circular criteria)

2004-12-08 Thread Daniel Perry
It apprears that ojb doesnt like criteria at depths that go beyond an extent. My criteria is: crit.addEqualTo(behaviourId, new Integer(id)); crit.addLessThan(rating, new Integer(1)); crit.addEqualTo(meeting.pdp.createdBy, new Integer(mid)); And this generates the following sql (shortened!):

RE: PBKey

2004-12-08 Thread Daniel Perry
Have you got a default connection-descriptor set up in repository_database.xml properly? Are OJB.properties/repository***.xml (x4) all in classpath? Daniel. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 08 December 2004 10:50 To: [EMAIL PROTECTED]

RE: ojb

2004-12-07 Thread Daniel Perry
[java] org.xml.sax.SAXParseException: Relative URI jdo.dtd; kann nicht ohne eine Basis-URI aufgel÷st werden. My german aint great, but i think it means it cant find jdo.dtd Do you have this file locally as i think you need it! Daniel. -Original Message- From: [EMAIL PROTECTED]

Circular criteria

2004-12-07 Thread Daniel Perry
I've got a bit of an odd criteria i need to specify, but i cant seem to get it to work. A has a reference to B, B has a reference to C. C had a reference to D. D has a collection of Cs and a reference to the currentC. I need to obtain all As where their C (via B) is current. Ie. such that

RE: Circular criteria

2004-12-07 Thread Daniel Perry
extents which do. When i get back in an hour or so, i will try to get pspy6 to work, and figure this out! Daniel. -Original Message- From: Daniel Perry [mailto:[EMAIL PROTECTED] Sent: 07 December 2004 15:35 To: OJB Users List Subject: Circular criteria I've got a bit of an odd

p6spy

2004-12-07 Thread Daniel Perry
Simple question - how do i use p6spy? I've recompiiled ojb with p6spy, and set mysql as the 'real' driver. I've copied the jar file and p6spy's jar. I've changed my repository to use p6spy (see below), and added the driver: jdbc-connection-descriptor jcd-alias=default

RE: db with many tables

2004-12-06 Thread Daniel Perry
I'm dont think you can map one type to many tables. You can map extents where you have more than one subclass, each mapped to a different table, and then access the extent type - but i dont think it will like mapping multiple tables to the exact same type. I am, however, fairly sure that you can

RE: OJB can't open database

2004-12-02 Thread Daniel Perry
Do you have repoistory_internal.xml as well? Or did you just miss this out from the list below? Daniel. -Original Message- From: Phillip Blevins [mailto:[EMAIL PROTECTED] Sent: 02 December 2004 16:13 To: OJB Users List Subject: Re: OJB can't open database Tom, for my web app

Bug in StringVector2VarcharFieldConversion.java (was Bug in IntList2VarcharFieldConversion)

2004-12-02 Thread Daniel Perry
; to: return EMPTYCOLLEC; This is causing it to change an empty vector into null on reloading the class. Thanks, Daniel. -Original Message- From: Daniel Perry [mailto:[EMAIL PROTECTED] Sent: 26 October 2004 15:55 To: OJB Users List Subject: Bug in IntList2VarcharFieldConversion I've

RE: to many WARN logs

2004-12-01 Thread Daniel Perry
I too have noticed these warnings. I have a couple of apps where i have used no transactions (as they seem pretty pointless for the apps in question - all 'shared' data is read-only), and they are generating a LOT of these messages as there is a lot of data access. This adds too much noise to

RE: to many WARN logs

2004-12-01 Thread Daniel Perry
to everyone! What are other peoples thoughts? Daniel. regards, Armin Daniel Perry wrote: I too have noticed these warnings. I have a couple of apps where i have used no transactions (as they seem pretty pointless for the apps in question - all 'shared' data is read-only

RE: [QUICKSTART] - A OJB quickstart similar to hibernate

2004-11-24 Thread Daniel Perry
the quickstart application (ojb-blank, with e.g. tutorial1 within) This should be runable withount _any_ domain-knowledge (except: Operating System Basics). If a team did not achieve that, then I name it: failure. What??? OJB is most definately NOT designed for people without any domain

RE: OJB doesnt work with multiples context

2004-11-24 Thread Daniel Perry
I second this, i have OJB deployed with 6 apps running in my tomcat dev server. I never use shared libraries as it causes too much hassle - each app has it's own OJB jar - and some are different versions. If you've not got any shared jars, can you post a stack trace and a bit more info about

RE: addPrefetchedRelationship problems

2004-11-24 Thread Daniel Perry
I believe this is because you have auto-retrieve=false in the reference descriptors. If you set these to true, the objects will be loaded. Daniel. -Original Message- From: Alessandro Colantoni [mailto:[EMAIL PROTECTED] Sent: 24 November 2004 14:05 To: 'OJB Users List' Subject:

RE: addPrefetchedRelationship problems

2004-11-24 Thread Daniel Perry
complicate thinks too. So I have to thanks all are involved in this work that is great Hasta luego -Mensaje original- De: Daniel Perry [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 24 de noviembre de 2004 15:09 Para: OJB Users List Asunto: RE: addPrefetchedRelationship problems I

RE: [QUICKSTART] - A OJB quickstart similar to hibernate

2004-11-23 Thread Daniel Perry
Edson Carlos Ericksson Richter wrote: Check Java Tools documentation in Java docs (downloaded separately). [I'm not interested in the documentation, but in the design-rationales. This is more out of curisity.] I've often wondered if sun just got lazy :) I think it's just that its another

RE: [QUICKSTART] - A OJB quickstart similar to hibernate

2004-11-23 Thread Daniel Perry
A team member suggested me to wait for your results. Thus, I expected of course a notification on this forum. But the developer list contains a notification. I am a user - and as such I monitor only the user forum. Your trying to contribute to the enhancement of OJB??? that makes you a

RE: [QUICKSTART] - A OJB quickstart similar to hibernate

2004-11-23 Thread Daniel Perry
: [QUICKSTART] - A OJB quickstart similar to hibernate Daniel Perry wrote: [...] - (comments) Sorry, i cannot discuss essential project mechanics again. - [general remark] My main questions here is: Can the team provide me with the targets run and deploy in a way that i don't have

RE: Best Practise for OJB

2004-11-18 Thread Daniel Perry
Hi All I use OJB for my Webapp Application ( Webapp1 + Tomcat + OJB+ Oracle) , is very grood performance BUT I haver other Webapp 2 do not use the OJB but use same Tomcat and Oracle (Webapp2 + Tomcat + Oracle ) Thats ok, but be very careful with sequence managers - i know most of them are

RE: [SUGGESTION] - S02 - Answering behaviour on this forum

2004-11-18 Thread Daniel Perry
I think these comments would be fair for a commercial product, but you have to remember that this is the open-source world, and people arnt paid to answer questions in forums, it's entirely voulantary. When i'm not too busy i often respond to messages on various lists (when i know the answer).

RE: Best Practise for OJB

2004-11-18 Thread Daniel Perry
Thats ok, but be very careful with sequence managers - i know most of them are NOT happy with other apps doing inserts! see: http://db.apache.org/ojb/docu/guides/sequencemanager.html yes I have not Other solution I can not convert Webapp 2 to use same Ojb cache or OJB. Thats fine. So

RE: Bug identified (was RE: SQLExcpetion)

2004-11-16 Thread Daniel Perry
(con)) ) I will check in your patch ASAP. Additionally I think we should release the closed connection instance and I will do a minor refactoring of CollectionProxyDefaultImpl to handle the used PB instance more strict. regards, Armin Daniel Perry wrote: I believe that I have solved

Bug identified (was RE: SQLExcpetion)

2004-11-15 Thread Daniel Perry
(con)) ) Daniel. -Original Message- From: Daniel Perry [mailto:[EMAIL PROTECTED] Sent: 02 November 2004 11:14 To: OJB Users List Subject: RE: SQLExcpetion Once again our app has started getting these errors (see trace below). It seems to be happening after several days

RE: SQLExcpetion

2004-11-02 Thread Daniel Perry
Once again our app has started getting these errors (see trace below). It seems to be happening after several days of operation. The problem always seems to happen when iterating over a proxied collection in a jsp (using jakarta JSTL c:forEach tag). See comments below: Is the error always

SQLExcpetion

2004-10-26 Thread Daniel Perry
- From: Daniel Perry [mailto:[EMAIL PROTECTED] Sent: 11 October 2004 16:20 To: OJB Users List Subject: RE: SQLExcpetion Ah i forgot to mention - mysql and tomcat are on the same machine :) which kinda counts out network problems. I cant see any reason why i'd get these errors (at least

RE: collection-descriptor pointing to same table

2004-10-26 Thread Daniel Perry
If i'm understanding you, you want an Account to have a List/Collection of Accounts? That shouldnt be a problem. Just add a collection descriptor in the normal fashion and it will give you that collection: collection-descriptor name=children element-class-ref=Account proxy=true

Bug in IntList2VarcharFieldConversion

2004-10-26 Thread Daniel Perry
I've just come accross a bug in class: org.apache.ojb.broker.accesslayer.conversions.IntList2VarcharFieldConversion . On line 56 it currently has: return NULLVALUE; It should be: return EMPTYCOLLEC; The bug causes it to store a null value when it should store an

RE: collection-descriptor pointing to same table

2004-10-26 Thread Daniel Perry
key to point from referrer_id to referral_id let me know. Thanks again. Charlie Daniel Perry said the following on 10/26/2004 4:24 AM: If i'm understanding you, you want an Account to have a List/Collection of Accounts? That shouldnt be a problem. Just add a collection descriptor

HighLowSequenceManager chaos

2004-10-18 Thread Daniel Perry
Hi, I've been trying to debug some problems in our software, and it seems that the High Low Sequence Manager has gone a bit mad! I am seeing some wierd stuff going on - the sequence manager has NO settings, so should be acting in the default configuration. The OJB_HL_SEQ is showing grabsizes of

RE: HighLowSequenceManager chaos

2004-10-18 Thread Daniel Perry
is increased by the grab size, and the sequence manager continues to issue primary keys until it exhausts the sequence again. Pulat Daniel Perry wrote: Hi, I've been trying to debug some problems in our software, and it seems that the High Low Sequence Manager has gone a bit mad! I

RE: HighLowSequenceManager chaos

2004-10-18 Thread Daniel Perry
!). Could it be anything to do with caching of the HighLowSequence object? Daniel. -Original Message- From: Daniel Perry [mailto:[EMAIL PROTECTED] Sent: 18 October 2004 15:27 To: OJB Users List Subject: RE: HighLowSequenceManager chaos Ok, so it is working for some reason when i

RE: HighLowSequenceManager chaos

2004-10-18 Thread Daniel Perry
. -Original Message- From: Daniel Perry [mailto:[EMAIL PROTECTED] Sent: 18 October 2004 15:43 To: OJB Users List Subject: RE: HighLowSequenceManager chaos Duh, cant use native - it's not extent-aware :( So, highlow seems to be working when i start it. But it seemed ok before (until

RE: HighLowSequenceManager chaos

2004-10-18 Thread Daniel Perry
table=ExtentTwoTable field-descriptor name=id column=ID jdbc-type=INTEGER primarykey=true autoincrement=true sequence-name=base-sequence / ... /class-descriptor -Original Message- From: Daniel Perry [mailto:[EMAIL PROTECTED] Sent: Monday, October 18

RE: HighLowSequenceManager chaos

2004-10-18 Thread Daniel Perry
To: OJB Users List Subject: Re: HighLowSequenceManager chaos Hi Daniel, Daniel Perry wrote: My repository_internal.xml didnt have the ObjectCacheEmptyImpl cache set up for the hl_seq class, so it would have been using the ObjectCacheDefaultImpl. Could this have caused the problem

RE: SQLExcpetion

2004-10-11 Thread Daniel Perry
Daniel Perry escreveu: Hi all, One of our systems has been running fine (live) for the last few weeks until yesterday when for about half an hour it started randomly crashing. Since then it has been fine! The (partial) exception trace is below. From what i can figure the problem is coming

RE: [OT] MySql and JDBC under Linux

2004-06-24 Thread Daniel Perry
It have it working fine (now), but i have encountered 'issues'. The main problem i had was that although you use localhost in the jdbc connection url, mysql doesnt think it is localhost. So if you try to use a user that is restricted to localhost it doesnt work. Instead you have to use the

RE: OJB + tomcat + OJB.properties

2004-06-24 Thread Daniel Perry
I have it working in tomcat 5 and 4. Is this under linux or windows? Have you checked file permissions? (especially if XP and tomcat service ?) Have you tried running tomcat in user mode rather than service? Daniel. -Original Message- From: WHIRLYCOTT [mailto:[EMAIL PROTECTED]

RE: Handling dirty objects in a CRUD web MVC app, OJB handles object store.

2004-06-04 Thread Daniel Perry
There are endless ways of handling this web transaction problem. I dont know of any patterns that fit all problems. OJB could handle the transation for you: You start a tranaction. Load some data. (and lock it) Store transaction in session. User edit's the data and submits it. You commit

RE: Mapping question

2004-06-03 Thread Daniel Perry
this mean for the performance of OJB? will OJB now query all 110 tables to find the right object? Since I know quite easily based on the first 3 letters of the OID what type it is, can I somehow tell that OJB as a hint to search the right table? Sebastian Daniel Perry wrote: What about

RE: Mapping question

2004-06-02 Thread Daniel Perry
What about using an extent and having both types extend it. It would pick the right class based on whichever table has an item with that primary key. Daniel. -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Sebastian Sent: 02 June 2004 17:07 To: [EMAIL PROTECTED]

RE: OJB and MySQL?

2004-06-01 Thread Daniel Perry
I'm using latest stable mysql 4 with ojb and havn't had any trouble at all with mysql. No idea about your other problem! Daniel. -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Paolo Salvan Sent: 01 June 2004 12:05 To: [EMAIL PROTECTED] Subject: OJB and MySQL?

RE: Reference proxies Interfaces

2004-05-21 Thread Daniel Perry
using 'relational concepts' instead of 'OO concepts'. This is one of the problems of the 'impedance mismatch' and I think the OO way to solve it is using OO design the way I suggested. Regards, Enrique Medina. From: Daniel Perry [EMAIL PROTECTED] Reply-To: OJB Users List [EMAIL PROTECTED

RE: help with 1:n mapping

2004-05-20 Thread Daniel Perry
The collection descriptor needs to be in the 1 side, not the n side... eg. say you had project - task mapping (1 - n respectively) If in the task table you have fk_project_id, and project has id, and in your classes Project.java has id and tasks field, and Task.java has projectId, and in the

RE: Interfaces and collection-proxies

2004-05-20 Thread Daniel Perry
Users List Subject: Re: Interfaces and collection-proxies hi daniel, when you use a collection-proxy tho whole collection is proxied so there's no need to define an interface for the contained classes. hth jakob Daniel Perry wrote: I know that I need to use interfaces for classes

RE: Reference proxies Interfaces

2004-05-20 Thread Daniel Perry
I ended up spending time trying to understand proxies... confusing stuff when you start out with ojb... these days it's making a little more sense :) a. yes, it has to be of type StateProxy (the interface) as ojb will try to instanciate it with a proxy object that implements the interface. If

Interfaces and collection-proxies

2004-05-18 Thread Daniel Perry
I know that I need to use interfaces for classes if they are proxied individually, but if I am only proxying collections, do the items I am proxying need to implement any interfaces? Thinking about it with hindsight, I would assume not, and I can get rid of dozens of needless interfaces! Can

collection proxy gives sql error

2004-05-10 Thread Daniel Perry
sorry... not sure why i replied then... monday morning... Upgraded to RC6, and everything seemed to be fine. until now :) One bit of code (that grabs a list - proxied collection) causes some nasty sql errors. Upon calling the .size() method it generates some sql (I'll hazard a guess of a

RE: Setting addOrderByAscending() with foreign attribute

2004-05-10 Thread Daniel Perry
addOrderByAscending(b.name); Make sure you use capitalisation as per your repository.xml - normally why things dont work for me on first try! Daniel. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 10 May 2004 10:23 To: [EMAIL PROTECTED] Subject: Setting

RE: collection proxy gives sql error

2004-05-10 Thread Daniel Perry
It's ok... found the fix in BrokerHelper.java in cvs. Daniel. -Original Message- From: Daniel Perry [mailto:[EMAIL PROTECTED] Sent: 10 May 2004 12:35 To: OJB Users List Subject: collection proxy gives sql error sorry... not sure why i replied then... monday morning... Upgraded to RC6

random errors with CollectionProxy

2004-05-06 Thread Daniel Perry
Our large project is now reaching maturity, and is being trialed with some users finally! Despite quite large object trees, it is performing well (our strategy is proxying collections only). But we are having a few problems with collection proxies. Every now and then (it really is random!)

random errors with CollectionProxy

2004-05-06 Thread Daniel Perry
Our large project is now reaching maturity, and is being trialed with some users finally! Despite quite large object trees, it is performing well (our strategy is proxying collections only). But we are having a few problems with collection proxies. Every now and then (it really is random!)

RE: random errors with CollectionProxy

2004-05-06 Thread Daniel Perry
been put to cache, so another thread could find partial materialized objects, is fixed in rc6 and CVS head. It's only speculation (maybe it's only a simple prefetching problem). Do the same problem occur when a per broker cache was used (ObjectCachePerBrokerImpl)? regards, Armin Daniel Perry wrote

RE: 1:1 bi-directional reference

2004-05-05 Thread Daniel Perry
doesn't quite cut it for me .. I'd quite like to see an inverse-foreign-key in a relation descriptor. Any chance this is upcoming ? Cheers, Stefan Daniel Perry wrote: I cant seem to figure out bi-directional references. Am I being thick? or do they not exist? I have two objects in a database

1:1 bi-directional reference

2004-05-04 Thread Daniel Perry
I cant seem to figure out bi-directional references. Am I being thick? or do they not exist? I have two objects in a database, which need to be associated with each other (optionally). ClassB has a property ClassA me, and int meId. meId is mapped as an int, and me is mapped as a reference

RE: Creating Reports

2004-04-28 Thread Daniel Perry
I looked at jasper reports, but it seemed difficult to do what i needed (normal structured reports, and some very unstructured stuff) Firstly i went down the iText route (java pdf library). Wouldnt do the same again with hindsight - not enough control over positioning/margins especially in tables

RE: ODMG API Question

2004-04-14 Thread Daniel Perry
I take it that if you close the app, and load it again then the task appears? If so, i'd guess it's down to caching. I had this problem, although i'd assumed that this was a 'feature'. After each insert do: PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();

RE: Newbie Question : OTM or ODMG

2004-04-13 Thread Daniel Perry
From my experience of using both (i ended up doing an ODMG - OTM conversion!): Note that i dont any of the more complicated stuff - just storing object trees, collections, etc, and querying the database. Also i dont use locking atall (one thing odmg does better i believe). Go with OTM. ODMG

RE: Newbie Question : OTM or ODMG

2004-04-13 Thread Daniel Perry
queries. -Brian On Apr 13, 2004, at 6:46 AM, Daniel Perry wrote: From my experience of using both (i ended up doing an ODMG - OTM conversion!): Note that i dont any of the more complicated stuff - just storing object trees, collections, etc, and querying the database. Also i dont use locking

RE: soft-deleting objects

2004-03-23 Thread Daniel Perry
I am using this in a complex app (due to idiot admin users deleting stuff they shouldnt!). All objects have a boolean (mapped to int) deleted. For all queries i look for objects with deleted=false. For relationships, i wrote a querycustomizer which adds deleted=false to collections. (see below

RE: OQLQuery

2004-02-25 Thread Daniel Perry
OQL queries are different from sql. You need to do something more like: query.create(select ANYTHING from + YOURCLASS.class.getName() + where id=null); ANYTHING is ignored as far as I can tell so you really can put anything! YOURCLASS is the name of the class you are querying (NOT THE

RE: Installation of OJB

2004-02-03 Thread Daniel Perry
This has brought up an interesting question for me. I am NOT using any anonymous keys, but i like the principle of them. The majority of my work is web-based. Therefore, by not having PKIDs it's much harder to pass references between requests. Does anyone have any simple solutions to this

RE: Installation of OJB

2004-02-02 Thread Daniel Perry
If you want to start with the Java source (and have control over it), then the easiest way would be to use the XDoclet module, in which case it bascially amounts to adding special javadoc tags to your source code, and then invoking an ant task in your build file that creates the repository

RE: HSQLDB - MySQL 4 transition

2004-01-27 Thread Daniel Perry
to import some data from an existing MySQL database. So it's pretty much switching which database OJB uses. Thanks, Daniel. -Original Message- From: Gus Heck [mailto:[EMAIL PROTECTED] Sent: 27 January 2004 00:49 To: OJB Users List Subject: Re: HSQLDB - MySQL 4 transition Daniel Perry

Re: ConnectionFactoryPooledImpl - releaseAllResources

2004-01-09 Thread Daniel Perry
After adding some lots of System.out.printlns to ConnectionFactoryPooledImpl, it would appear that somewhere OJB is not returning a connection to the pool. When releaseAllResources() is called, it calls close() on the GenericObjectPool. When this happens, GenericObjectPool has one active

Re: ConnectionFactoryPooledImpl - releaseAllResources - STRUTS+OJB+HSQLDB embedded developers may find this useful

2004-01-09 Thread Daniel Perry
I've now bodged the ConnectionFactoryPooledImpl so that it monitors all jdbc connections created, and releaseAllResources() now kills any unclosed connections. Probably not going to affect anyone not using hsqldb embedded (or any other database that can only be opened once at a time). One side

join and retrieve single object?

2004-01-09 Thread Daniel Perry
I want to query the database and retrieve a specific manager, and only their employees whoose training (boolean) matches the requirement. Instead of getting one manager with the x (out of y) employees, i get x managers. My code is: (getObjectsByType) is just a query by criteria shortcut.

closing connections

2004-01-08 Thread Daniel Perry
I'm having a problem trying to release database connections. Here's what i understand of how it works I assume the PB opens data connections when it's first used. A connectionfactoryfactory is created, and connections are opened by the connectionfactory. Now, to shut down the database, i

j2ee.jar

2004-01-08 Thread Daniel Perry
Not sure if i'm being rather inept, but i cant find the j2ee.jar file on suns site. Do i have to download the entire J2EE SDK? or can i get this file on it's own? Thanks, Daniel.

Re: AW: j2ee.jar

2004-01-08 Thread Daniel Perry
Are you talking about j2ee 1.3 or 1.4? because I've never been able to find the 1.4 jar without the whole app server... -Clay You have to download the J2EE SDK! Cheers, André -Ursprüngliche Nachricht- Von: Daniel Perry [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 8

Re: ConnectionFactoryPooledImpl - releaseAllResources

2004-01-08 Thread Daniel Perry
if the connection pool is closed? Thanks, Daniel. - Original Message - From: Daniel Perry [EMAIL PROTECTED] To: OJB Users List [EMAIL PROTECTED] Sent: Thursday, January 08, 2004 5:20 PM Subject: ConnectionFactoryPooledImpl - releaseAllResources The releaseAllResources method

PB Tutorial (ERROR) and question

2004-01-07 Thread Daniel Perry
I was just reading the tutorial on the PB API, and came accross a slight error: In the Deleting Persistent Objects, PersistenceBrokerFactory.defaultPersistenceBroker(); Should be: broker = PersistenceBrokerFactory.defaultPersistenceBroker(); One more thing, using ODMG i have been doing

Re: PB Tutorial (ERROR) and question

2004-01-07 Thread Daniel Perry
back in. -Brian On Jan 7, 2004, at 5:49 AM, Daniel Perry wrote: I was just reading the tutorial on the PB API, and came accross a slight error: In the Deleting Persistent Objects, PersistenceBrokerFactory.defaultPersistenceBroker(); Should be: broker

classcast exception (proxy problem)

2004-01-06 Thread Daniel Perry
I've got a problem where an object has a 1:1 relationship with the supertype of another object. If i proxy the relationship, then i cannot cast the related object to it's actual type. (it throws a ClassCastException). The code below is part of Review. Review Implements the interface IReview.

Re: classcast exception (proxy problem)

2004-01-06 Thread Daniel Perry
(); query.create(queryStr); query.bind(Integer.toString(itemId)); List objects = (List) query.execute(); return objects.get(0); And enable proxying then it works fine. BUT at a SIGNIFICANT preformance loss. - Original Message - From: Daniel Perry [EMAIL PROTECTED] To: OJB Users List [EMAIL

Re: How to pass dynamic attribute values to QueryCustomizerImplementations

2003-12-19 Thread Daniel Perry
I am still confused by this too. Say i have a 1:n mapping between Manager and Employee. I want to query using ODMG to say select all Managers (and their Employees) where Manager.department=blah AND Employee.status=fulltime I did this using a query customizer for static queries (eg

Re: How to pass dynamic attribute values to QueryCustomizerImplementations

2003-12-19 Thread Daniel Perry
: How to pass dynamic attribute values to QueryCustomizerImplementations Hello, for a more detailed description pleas look at my other mail. Daniel Perry wrote: I am still confused by this too. sorry! Say i have a 1:n mapping between Manager and Employee. I want to query using ODMG

Re: How to pass dynamic attribute values to QueryCustomizer Implementations

2003-12-19 Thread Daniel Perry
I completely agree with it being bad design. However, I am using OJB in struts applications. Lets take the example i gave before. The struts action would simply load a collection of managers from OJB, and put them into the request scope. The action would forward to a JSP. The JSP would

Re: How to pass dynamic attribute values to QueryCustomizer Implementations

2003-12-19 Thread Daniel Perry
I think you are right. I think there are two ways of looking at this. 1. From an OO programing point of view, OJB could be seen solely as a persistance mechanism for objects. Queries should be used for realising a collection of objects or a single object. The single object (or each of the

Re: Simple (I Hope) Howto Question

2003-12-16 Thread Daniel Perry
How would you do this same query through the ODMG API? Thanks, Daniel. - Original Message - From: Gelhar, Wallace Joseph [EMAIL PROTECTED] To: OJB Users List [EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 4:09 PM Subject: RE: Simple (I Hope) Howto Question Hi Gary, This will

Re: tomcat

2003-12-15 Thread Daniel Perry
Most of the core configuration is in web.xml in your applications web-inf directory (servlet configuration etc). AFAIK, OJB doesnt require any configuration outside of your repository.xml file. The same applies to struts. Daniel. - Original Message - From: Damon Torgerson [EMAIL

Re: [OT] reporting tools best suited to OJB

2003-12-12 Thread Daniel Perry
I looked at using jasper reports for a current web app project, and i very nearly went down that route! However instead, i chose iText java pdf generating library (which i think jasper uses!) My reason for this was that the reports i created were not simple record based things. They were report

Re: WHY OJB SPEND MORE AND MORE TIME TO STORE OBJECTS ?

2003-12-04 Thread Daniel Perry
Can you post the related repository.xml and java code? It's impossible to say without looking at the code. Daniel. - Original Message - From: ghielard [EMAIL PROTECTED] To: OJB User [EMAIL PROTECTED] Sent: Thursday, December 04, 2003 2:23 PM Subject: WHY OJB SPEND MORE AND MORE TIME TO

Re: Antwort: WHY OJB SPEND MORE AND MORE TIME TO STORE OBJECTS ?

2003-12-04 Thread Daniel Perry
If you leave data in your database, and run the test again, does it start quickly or slowly? This should tell if the problem is to do with size of database, or to do with the code. any unproxied references in repository.xml? are you closing transactions properly? Daniel. - Original Message

  1   2   >