You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Thomas Mahler <th...@web.de> on 2004/02/13 08:10:03 UTC

[Fwd: persistence broker]


-------- Original Message --------
Subject: persistence broker
Date: Thu, 12 Feb 2004 15:33:15 -0600
From: MORRIS, JAMES (CONTRACTOR) <JA...@DFAS.MIL>
To: <th...@apache.org>

Thomas,
   Is there any way to release a single instance of a persistence broker 
that has been closed?  I see the releaseAllInstances() method but I am 
looking for a way to evict only a single broker from the pool.  Any 
input you could provide would be appreciated.

James Morris
Associate Software Engineer
Anteon Corporation
850-473-6416




---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


mysql insert problem

Posted by Guido Beutler <gu...@hrs.de>.
Hello,

I'm using ojb rc5 with mysql 4.0.18 under linux.
OJB runs inside of a jboss-3.2.3.
I have a sample table :

create table a (
id int not null,
ref char(3) not null references b,
primary key (id,ref)
)

create table b (
ref char(3) not null,
primary key (ref)
);

at the corresponding class I have

class a (
int id;
String ref;
b b
);

At the repository I have a reference desriptor from a to b.

   <reference-descriptor name="b" class-ref="b" proxy="false" 
refresh="false" auto-retrieve="false" auto-update="false" 
auto-delete="false">
      <foreignkey field-id-ref="2"/>
   </reference-descriptor-->

Now my problem. As shown at the reference descriptor I do not 
automatically load b.
At a insert on a the reference on b must be set, otherwise mysql reports 
a arror that ref can not be null.
If I comment out the reference descriptor at the repository everything 
works fine.

If ref is not a String (char) I do not have to set the reference to b. 
Where is the difference?
Why ojb uses the reference field to b in case of ref is a String and and 
uses the attribuite ref
in case ref is of type int ? Is it because of Sting is a object ant int not?
I would like to run mass inserts and would like to avoid resolving the 
references.

best regards,

Guido


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: [Fwd: persistence broker]

Posted by Armin Waibel <ar...@apache.org>.
> -------- Original Message --------
> Subject: persistence broker
> Date: Thu, 12 Feb 2004 15:33:15 -0600
> From: MORRIS, JAMES (CONTRACTOR) <JA...@DFAS.MIL>
> To: <th...@apache.org>
> 
> Thomas,
>   Is there any way to release a single instance of a persistence broker 
> that has been closed?  I see the releaseAllInstances() method but I am 
> looking for a way to evict only a single broker from the pool.  Any 
> input you could provide would be appreciated.
> 

Currently it's not possible to do this. Only way is to implement your 
own PBF. You can put a feature request for 1.1 version on
http://nagoya.apache.org/wiki/apachewiki.cgi?OJBProjectPages/OJBOnePointOne

regards,
Armin

> James Morris
> Associate Software Engineer
> Anteon Corporation
> 850-473-6416
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org