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 Jason Pyeron <ja...@pyeron.com> on 2003/08/31 22:31:59 UTC

updating using SQL ansi & udfs

To the list:

If I could do a SQL update of the like:

 UPDATE table_name SET date_col=NOW() WHERE id=###;

How should this be done under OJB?


Sincerely,

Jason Pyeron

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                   http://www.pyerotechnics.com   -
- Partner & Sr. Manager         Pyerotechnics Development, Inc. -
-                               500 West University Parkway #1S -
- +1 (410) 808-6646             Baltimore, Maryland  21210-3253 -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you 
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.




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


Re: Identity Problems.

Posted by Stefan Schlösser <ss...@intermediate.de>.
Armin Waibel wrote:

> If you have a PB-leak, make sure that after use all PB instances
> were closed (broker.close() call).

Hi,

I had the same problem/error message and sure enough there was a leak. I 
implemented a counter of instances each time I borrowed a connection and 
monitored that regularly using an extra thread ... it gave the clue ....

With each borrow I always include

finally{
             releaseBroker(broker);
         }

Which calls my own method to release it and update the counter. This 
ensures close even if an exception occurs.

Never had any problems since (we have something like 20-30 concurrent 
users).

Cheers,
  Stefan





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


Re: Identity Problems.

Posted by Armin Waibel <ar...@code-au-lait.de>.
Please, can you post the whole stack trace
to make things clearer?

Armin
----- Original Message -----
From: "Armin Waibel" <ar...@code-au-lait.de>
To: "OJB Users List" <oj...@db.apache.org>
Sent: Monday, September 01, 2003 3:14 PM
Subject: Re: Identity Problems.


> Hi Onno,
>
> seems like a PB leak or a to small PB-pool
> (OJB.properties maxActive=xxx, default was 100).
>
> If you set log-level for org...broker.PersistenceBrokerFactoryImpl
> to 'info', OJB prints a message when does create a new PB instance
> (rc4, earlier versions give it a try).
> If you have a PB-leak, make sure that after use all PB instances
> were closed (broker.close() call).
>
> > suggested a problem with the Sequence Manager.
> >
> which SequenceManager implementation do you use?
>
> regards,
> Armin
>
> ----- Original Message -----
> From: "onno" <on...@onnos.com>
> To: "OJB Users List" <oj...@db.apache.org>
> Sent: Monday, September 01, 2003 12:55 PM
> Subject: Identity Problems.
>
>
> > Hiya!
> >
> > We've been using OJB for quite some time now, and had no problems ,
> but
> > recently the amount of people using it has increased and we get this
> error:
> >
> > "Could not init Identity for given object class
> > x.form.CompanyPresentationBooking: Borrow broker from
> > pool failed"
> >
> > I should tell you that the website running Tomcat shares the (mySQL)
> > database with
> > 2 or more directly connected Java Clients.  My fellow developper has
> > suggested a problem with the Sequence Manager.
> >
> > Maybe one of youz has encountered this message and knows where the
> problem
> > is likely to be - if we restart the website (Tomcat) the problem
> dissappear
> > for a bit but then returns after...
> >
> > Onno
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> > 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
>
>
>



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


Re: Identity Problems.

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

seems like a PB leak or a to small PB-pool
(OJB.properties maxActive=xxx, default was 100).

If you set log-level for org...broker.PersistenceBrokerFactoryImpl
to 'info', OJB prints a message when does create a new PB instance
(rc4, earlier versions give it a try).
If you have a PB-leak, make sure that after use all PB instances
were closed (broker.close() call).

> suggested a problem with the Sequence Manager.
>
which SequenceManager implementation do you use?

regards,
Armin

----- Original Message -----
From: "onno" <on...@onnos.com>
To: "OJB Users List" <oj...@db.apache.org>
Sent: Monday, September 01, 2003 12:55 PM
Subject: Identity Problems.


> Hiya!
>
> We've been using OJB for quite some time now, and had no problems ,
but
> recently the amount of people using it has increased and we get this
error:
>
> "Could not init Identity for given object class
> x.form.CompanyPresentationBooking: Borrow broker from
> pool failed"
>
> I should tell you that the website running Tomcat shares the (mySQL)
> database with
> 2 or more directly connected Java Clients.  My fellow developper has
> suggested a problem with the Sequence Manager.
>
> Maybe one of youz has encountered this message and knows where the
problem
> is likely to be - if we restart the website (Tomcat) the problem
dissappear
> for a bit but then returns after...
>
> Onno
>
>
>
>
> ---------------------------------------------------------------------
> 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


Identity Problems.

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

We've been using OJB for quite some time now, and had no problems , but
recently the amount of people using it has increased and we get this error:

"Could not init Identity for given object class
x.form.CompanyPresentationBooking: Borrow broker from
pool failed"

I should tell you that the website running Tomcat shares the (mySQL)
database with
2 or more directly connected Java Clients.  My fellow developper has
suggested a problem with the Sequence Manager.

Maybe one of youz has encountered this message and knows where the problem
is likely to be - if we restart the website (Tomcat) the problem dissappear
for a bit but then returns after...

Onno




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


Re: updating using SQL ansi & udfs

Posted by Jason Pyeron <ja...@pyeron.com>.
On Mon, 1 Sep 2003, Roland Carlsson wrote:

> Why should you use sql when OJB handles the situation without any problem? 
> http://db.apache.org/ojb/tutorial1.html scroll down to "Updating Objects".
> 
> From: "Jason Pyeron" <ja...@pyeron.com>
> Sent: Sunday, August 31, 2003 10:31 PM
> 
> >  UPDATE table_name SET date_col=NOW() WHERE id=###;
> > 
> > How should this be done under OJB?


my question was how can I use UDF's and other functions which the results 
are not able to be generated by the VM or any code running on it.


IE:


 obj.setName("bob smith");
 obj.setSpecialField(new SQLInline("MyUDF()"));


does anyone even know how to do this through update-able result-sets?

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                   http://www.pyerotechnics.com   -
- Partner & Sr. Manager         Pyerotechnics Development, Inc. -
-                               500 West University Parkway #1S -
- +1 (410) 808-6646             Baltimore, Maryland  21210-3253 -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you 
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.




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


Re: updating using SQL ansi & udfs

Posted by Roland Carlsson <ma...@javalia.se>.
Why should you use sql when OJB handles the situation without any problem? 
http://db.apache.org/ojb/tutorial1.html scroll down to "Updating Objects".

Regards
Roland Carlsson

----- Original Message ----- 
From: "Jason Pyeron" <ja...@pyeron.com>
To: "OJB Users List" <oj...@db.apache.org>
Sent: Sunday, August 31, 2003 10:31 PM
Subject: updating using SQL ansi & udfs


> To the list:
> 
> If I could do a SQL update of the like:
> 
>  UPDATE table_name SET date_col=NOW() WHERE id=###;
> 
> How should this be done under OJB?
> 
> 
> Sincerely,
> 
> Jason Pyeron
> 
> -- 
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> -                                                               -
> - Jason Pyeron                   http://www.pyerotechnics.com   -
> - Partner & Sr. Manager         Pyerotechnics Development, Inc. -
> -                               500 West University Parkway #1S -
> - +1 (410) 808-6646             Baltimore, Maryland  21210-3253 -
> -                                                               -
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> 
> This message is for the designated recipient only and may contain 
> privileged, proprietary, or otherwise private information. If you 
> have received it in error, purge the message from your system and 
> notify the sender immediately.  Any other use of the email by you 
> is prohibited.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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