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 Joerg Lensing <in...@softcon-lensing.de> on 2003/09/08 10:49:23 UTC

mapping small query objects

hi ojb-users,
parallel to the "normal" persistent objects (mapping as ususal)  I want 
to use small "query" objects to speed up performance. I'm expirienced some
problems now. It seems to me, that OJB doesn't support this (commented 
source code says: "... may be null if extend isn't used.." or so)

what is the best way? using proxies? other solutions?

tx joerg



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


Finding How Many PB's are left free in the Pool

Posted by onno <on...@onnos.com>.
Hiya

a week ago i posted a mail regarding Identity Problems. All feedback was
down to Connections running out. Since then my PC crashed and spent some
time copying everything back. I'd just like to thank those who replied.

Having said that - we did find a few unclosed brokers but we are still
having the same issue. I remember one post saying he checked to see how many
PB were free in the pool, i've been looking at the docs but can't find any
hint on how to retrive the Free PB's still left available. This way we can
write a quick servlet which can tell us if we are running out - the person
in question used a thread but the main problem is finding where in the
PB-API i can find the info...

Also does OJB clean up 'after' itself. In the client side we used 1 static
PB , but we never close(d) it - presuming at exit the GC would also close
everything up (but i'm not sure). We do now close that one at exit but
problem remains.

Greetz

Onno.


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


Re: OJB getting wrong transactin context or RequiresNew attribute (JBoss) seems not to start new transaction

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi Guido,

> Hello,
>
> I'm running OJB RC4 inside of  JBoss 3.2.2RC3.
> I always use ODMG interface.
>
> I've got a scenario where I insert data with and select them within
the
> same transaction context again.
> OJB does not find the inserted data, because the inserts are done when
> the complete transaction is
> committed. I thought to solve the problem by putting all OJB stuff
into
> a new stateless session bean
> and set the transaction context to requires new. I created one call
for
> inserting and another for selecting
> the data and set the the trans-attribute at the assembly -descriptor
to
> requires new for each call.
> So a new transaction should be created and my inserts should be
> performed after leaving (and so committing)
> the insert method of the OJB EJB.
> This didn't work. The insert statements are still done after the
commit
> of the first initial transaction context commit
> and not at the second internal transaction of the OJB EJB.
> Is it a JBoss problem or does OJB get the wrong transaction at the
> getCurrentTransaction call?
>

hmm, if second bean run within the same thread then
'getCurrentTransaction'
is the problem. If you set logging level to 'debug' for OJBJ2EE_2.java
you
should get a message like "obtain new intern odmg-transaction" when your
second bean was called.

regards,
Armin

> best regards,
>
> Guido
>
>
>
> ---------------------------------------------------------------------
> 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


OJB getting wrong transactin context or RequiresNew attribute (JBoss) seems not to start new transaction

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

I'm running OJB RC4 inside of  JBoss 3.2.2RC3.
I always use ODMG interface.

I've got a scenario where I insert data with and select them within the 
same transaction context again.
OJB does not find the inserted data, because the inserts are done when 
the complete transaction is
committed. I thought to solve the problem by putting all OJB stuff into 
a new stateless session bean
and set the transaction context to requires new. I created one call for 
inserting and another for selecting
the data and set the the trans-attribute at the assembly -descriptor to 
requires new for each call.
So a new transaction should be created and my inserts should be 
performed after leaving (and so committing)
the insert method of the OJB EJB.
This didn't work. The insert statements are still done after the commit 
of the first initial transaction context commit
and not at the second internal transaction of the OJB EJB.
Is it a JBoss problem or does OJB get the wrong transaction at the 
getCurrentTransaction call?

best regards,

Guido



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


mapping small query objects (reposted)

Posted by Joerg Lensing <in...@softcon-lensing.de>.
> hi ojb-users,
> parallel to the "normal" persistent objects (mapping as ususal)  I 
> want to use small "query" objects to speed up performance. I'm 
> expirienced some
> problems now. It seems to me, that OJB doesn't support this (commented 
> source code says: "... may be null if extend isn't used.." or so)
>
> what is the best way? using proxies? other solutions?
>
> tx joerg
>
>
(didn't receive my own messags, so reposted)


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