Re: dynamci Proxy: ClassCastException with Interfaces

2003-09-12 Thread Edson Carlos Ericksson Richter
Ok, I've not asked yet: what version of OJB are you using? Edson Richter - Original Message - From: Joerg Lensing To: OJB Users List Sent: Friday, September 12, 2003 12:14 PM Subject: Re: dynamci Proxy: ClassCastException with Interfaces Hi Edson thanks for your reply. I'm still stuc

Re: dynamci Proxy: ClassCastException with Interfaces

2003-09-12 Thread Joerg Lensing
Hi Edson thanks for your reply. I'm still stuck :-( Edson Carlos Ericksson Richter wrote: I've the two situation in my project. I have a documents table table has a fixed structure to all types of documents, and I have different tables for different objects, in another (a payment structure). All t

Simple (?) Proxy-Questions

2003-09-12 Thread Joerg Lensing
Hi all, some questions about proxies: - I want to query an Object - the object (class A) is used by a dynamic proxy - the Object is a superclass of two Objects (Classes A1,A2) both mapped to the same table - the extended objects are dynamic proxies too - the criteria is a field from the superclass

RE: Xdoclet: How to use base-class properties with different column names in children?

2003-09-12 Thread Thomas Dudziak
Ahh, stupid me. Overriding base class features is already part of the xdoclet module as I just found out (and that happens to me who wrote the module; I think I get old ;-). But this is acomplished not via the ojb.field tag but with a special tag, ojb.modify-inherited, which then also allows to mod

Re: query before commit problem

2003-09-12 Thread Jair da Silva Ferreira Júnior
Hi, Thank you Thomas and Charles for your fast answers. I think I'll use transaction.checkpoint() as Charles pointed. By the way, don't you think this would be a nice feature to be added to a future OJB version? Say, when an object is persisted insinde a transaction it would be nice if any

problema with m:n association

2003-09-12 Thread Carlos Henrique Leclerc De Oliveira
Hi, I am trying to implement a m:n association, using manual decomposition into two 1:n associations, because I need get information from intermediary table. The situation I want is: One "Promotion" has a list of "Offer". I have a Offer_Promotion intermediary table. When I find one "Promotion",

RE: query before commit problem

2003-09-12 Thread Charles Anthony
Hi, As Thomas says, this is by design. However, you can force the transaction to flush all object changes to the database, without committing the underlying database connection : In RC4, you can use Transaction.checkpoint() e.g. t.checkpoint(); After RC4 (i.e. in CVS), you should be able to cast

Re: query before commit problem

2003-09-12 Thread Thomas Mahler
Hi Jair, ODMG transaction write to the db only on tx.commit. Thus q is not persistent in the database when you perform the first query! All queries (also ODMG OQL!) are executed against the database. So it's obvious that loaded != q after your query. after commiting the transaction q is stored i

RE: versioning and OJB

2003-09-12 Thread Matthew Baird
if you look in the test cases there is a contract->version->effectiveness test that shows the classic pattern of effectivity of a business object over time with versions. This is just the data model, of course, and you would need to manage creation of the versions and effectiveness objects, but

Re: Inheritance querying problem

2003-09-12 Thread LAURENT Stephane
Sorry but when I look this : I think your class is like this : class B { private int id; private String email; private A super; /* getters and setters*/ } So, it's an agregation (also extends but where is your type A attribute in B ?) and you ca

Fundamental OJB question - Please help

2003-09-12 Thread Rick Banerjee
Hi Thomas, First of all, I'm very sorry for having posted this question to you directly, instead of to the OJB user group. I will not make that mistake again! Sorry! About the solution you have provided, Thomas, I can't select from Application class because I am not sure all persons have applic

query before commit problem

2003-09-12 Thread Jair da Silva Ferreira Júnior
Hi, I am using ojb1.0_rc4, ODMG api with OJB queries and mysql4. The problem is that when I persist an object and run a identity query looking for the persisted objet the query returns null. This only happens when I persist the object and execute the query in the same transaction. Is this be

Dynamic proxies and DB index usage optimization

2003-09-12 Thread Edson Carlos Ericksson Richter
Sending again... Sorry, but it's important... - Original Message - From: Edson Carlos Ericksson Richter To: 'OJB Users List' Sent: Thursday, September 04, 2003 1:21 PM Subject: Dynamic proxies and DB index usage optimization Hi! I'm using dynamic proxy feature in a large database. I'v

ConnectionFactoryManagedImpl and rollbacks

2003-09-12 Thread kristian meier
Hello, we are using OJB on an application server, in the moment JBoss. everything works fine until there comes an exception and the PersistentBroker gets closed without a commit. in the close()-method the broker does a rollback on the underlying connection-object and with the ByPassConnection

Re: Memory and ObjectCachePerBrokerImpl

2003-09-12 Thread Armin Waibel
Hi, > since I changed the class cache implementation from > ObjectCacheEmptyImpl to ObjectCachePerBrokerImpl, > my application don´t stop to consume more memory, > and never free any memory. made some tests, seems all works fine. If you call PB.abortTransaction() or PB.close() the ObjectCache #cl

Re: dynamci Proxy: ClassCastException with Interfaces

2003-09-12 Thread Edson Carlos Ericksson Richter
I've the two situation in my project. I have a documents table table has a fixed structure to all types of documents, and I have different tables for different objects, in another (a payment structure). All that works. I think you must specify that your interfaces extends others. The java.io.Seria

Re: versioning and OJB

2003-09-12 Thread Robert r. Sanders
Depends on what type you mean. I have thought some on the subject of versioning objects and any subobjects; to provide a tag/milestone based versioning. First, it seems to me that this would be a fairly significant project; best built as a module running on top of the OJB core. Second, it th

Memory and ObjectCachePerBrokerImpl

2003-09-12 Thread Leandro Augusto de Almeida
Hi, I'm having some problems with ObjectCachePerBrokerImpl, since I changed the class cache implementation from ObjectCacheEmptyImpl to ObjectCachePerBrokerImpl, my application don´t stop to consume more memory, and never free any memory. I'm working with one PersistenceBroker per Thread, but

RE: Xdoclet: How to use base-class properties with different colu mn names in children?

2003-09-12 Thread Clute, Andrew
Ok, great. That is exactly how I have it. As we discussed before that is not working, so I will patiently wait for your fix for this. I really do appreciate your work and effort in this! Thanks again! -Andrew -Original Message- From: Thomas Dudziak [mailto:[EMAIL PROTECTED] Sent: Friday

RE: Xdoclet: How to use base-class properties with different colu mn names in children?

2003-09-12 Thread Andy Czerwonka
Outstanding On Fri, 2003-09-12 at 05:58, Thomas Dudziak wrote: > Yes, both the repository descriptor (aka repository_user.xml) and the > table schema (for Torque which then generates the tables in your > database) are generated by the xdoclet ojb module. > If you want to try it out, grab OJB f

RE: Xdoclet: How to use base-class properties with different colu mn names in children?

2003-09-12 Thread Thomas Dudziak
Yes, both the repository descriptor (aka repository_user.xml) and the table schema (for Torque which then generates the tables in your database) are generated by the xdoclet ojb module. If you want to try it out, grab OJB from CVS and look into the contrib folder. There you'll find the module along

RE: Xdoclet: How to use base-class properties with different colu mn names in children?

2003-09-12 Thread Andy Czerwonka
I'd love to learn how your using XDoclet with OJB. Are you generating both the DDL and the repository? On Fri, 2003-09-12 at 03:13, Thomas Dudziak wrote: > A field declared in the class javadoc comment is only then not anonymous > if there is a tagged field with that name in a base class of that

Inheritance querying problem

2003-09-12 Thread shibin ck
Hi, i have 2 classes A and B. B inherits from A. i map classes A and B on multiple joined tables. my classes are class A { private int id; private String name; /* getters and setters*/ } class B extends A { private int id; private String email; /* getters and setters*/ } my de

RE: versioning and OJB

2003-09-12 Thread Mahler Thomas
1. In your table you need a dedicated column of type INTEGER or TIMESTAMP . Say the column is typed as INTEGER and named VERSION_MAINTAINED_BY_OJB . 2. You then need a (possibly private) attribute in your java class corresponding to the column. Say the attribute is defined as:

RE: Xdoclet: How to use base-class properties with different colu mn names in children?

2003-09-12 Thread Thomas Dudziak
A field declared in the class javadoc comment is only then not anonymous if there is a tagged field with that name in a base class of that class. So, you simply tag the field with @ojb.field in your base class (BusinessObject if I remember correctly) - this does not require that you also tag the cl

versioning and OJB

2003-09-12 Thread Anton Komratov
Are there any thoughts how to implement versioning using OJB? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Really difficult OJB question - Help!

2003-09-12 Thread Mahler Thomas
Hi Rick, please post further requests to the ojb user list, not to developers directly. To answer you question. If you select a person object, OJB will load all Application objects that belong to that person. You have to selct from the Application class and must use criteria that specify the

Re: dynamci Proxy: ClassCastException with Interfaces

2003-09-12 Thread Joerg Lensing
hi carlos, did I say, that PersonPO and OrganisationPO are mapped to the same table? The do! joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: dynamci Proxy: ClassCastException with Interfaces

2003-09-12 Thread Joerg Lensing
Hi Carlos, as you can see below, I nearly did the same you wrote, except that all my classes/interfaces extend java.io.Serializable. joerg Edson Carlos Ericksson Richter wrote: Hi! I'm using dynamic proxy and seen no problems at all (at least for rc3/rc4). Let me show how I'm using. I'll u