Re: in-memory persistence

2004-10-07 Thread Armin Waibel
The Prevayler based PB-api (beta-)implementation is different in use and 
features to the "normal" RDBMS based implementation, so if your 
production application is using a RDBMS I strongly recommend to use a DB 
with in-memory/file support like HSQL or other "small" DB (Axion) for 
testing (take care of supported DB features, same as in your production 
DB?).

regards
Armin
jys wrote:
Gustavo E Faerman wrote:
Try  HSQL or although not exactly a RDBMS, surf the bleeding edge with 
OJB
Prevayler impl.

Regards,
Gustavo.
On Jue, 7 de Octubre de 2004, 4:50 pm, Ajitesh Das dijo:
 

Use a open source in-memory DB ..
which supports jdbc 1.0 api.
-Original Message-
From: jys [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 06, 2004 12:49 PM
To: OJB Users List
Subject: in-memory persistence
I would like to know if it's possible using OJB to persists data to
memory instead of DB just for testing purposes.
Thank U.
Jean-Yves
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 

I 'll try the prevlayer thank you.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: in-memory persistence

2004-10-07 Thread jys
Gustavo E Faerman wrote:
Try  HSQL or although not exactly a RDBMS, surf the bleeding edge with OJB
Prevayler impl.
Regards,
Gustavo.
On Jue, 7 de Octubre de 2004, 4:50 pm, Ajitesh Das dijo:
 

Use a open source in-memory DB ..
which supports jdbc 1.0 api.
-Original Message-
From: jys [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 06, 2004 12:49 PM
To: OJB Users List
Subject: in-memory persistence
I would like to know if it's possible using OJB to persists data to
memory instead of DB just for testing purposes.
Thank U.
Jean-Yves
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 

I 'll try the prevlayer thank you.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: in-memory persistence

2004-10-07 Thread Gustavo E Faerman
Try  HSQL or although not exactly a RDBMS, surf the bleeding edge with OJB
Prevayler impl.

Regards,

Gustavo.


On Jue, 7 de Octubre de 2004, 4:50 pm, Ajitesh Das dijo:
> Use a open source in-memory DB ..
> which supports jdbc 1.0 api.
>
>
> -Original Message-
> From: jys [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 06, 2004 12:49 PM
> To: OJB Users List
> Subject: in-memory persistence
>
> I would like to know if it's possible using OJB to persists data to
> memory instead of DB just for testing purposes.
>
> Thank U.
>
> Jean-Yves
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: in-memory persistence

2004-10-07 Thread Ajitesh Das
Use a open source in-memory DB ..
which supports jdbc 1.0 api.


-Original Message-
From: jys [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 06, 2004 12:49 PM
To: OJB Users List
Subject: in-memory persistence

I would like to know if it's possible using OJB to persists data to 
memory instead of DB just for testing purposes.

Thank U.

Jean-Yves

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



in-memory persistence

2004-10-07 Thread jys
I would like to know if it's possible using OJB to persists data to 
memory instead of DB just for testing purposes.

Thank U.
Jean-Yves
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Howto update specifc field

2004-10-07 Thread Francisco Bruno
Ok, tanks.
[],
Francisco Bruno
Analista de Sistemas
OFM Tecnologia & Informação
-
"Faça as coisas o mais simples que você puder, porém não as mais simples."
Albert Einstein
- Original Message - 
From: "Armin Waibel" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Thursday, October 07, 2004 2:04 PM
Subject: Re: Howto update specifc field


yep, Charles is right. Will be supported in OJB 1.1.
Should we backport this feature to OJB 1.0.x? But this will change the PB 
interface (new method PB#update(Object obj, String[] fields)) and some 
other internal pluggable interfaces (new methods).

regards,
Armin
Charles Anthony wrote:
Hi Francisco,
Sorry no-one replied last time. The simple answer is that this currently 
not possible in OJB.

Cheers,
Charles.

-Original Message-
From: Francisco Bruno [mailto:[EMAIL PROTECTED]
Sent: 07 October 2004 13:03
To: OJB User List
Subject: Howto update specifc field
All,
How can I do "update statement" updates changed columns only?
Ex: TABLE A (
  IDNUMBER,
  DESC VARCHAR,
  CAT   VARCHAR)
I need update only CAT field, but the code generate for p6spy is:
UPDATE A
SETDESC = '',
CAT= 'P'
WHERE ID = 1
[],
Francisco Bruno
Analista de Sistemas
OFM Tecnologia & Informação
--
---
"Faça as coisas o mais simples que você puder, porém não as mais 
simples."
Albert Einstein

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


___
HPD Software Ltd. - Helping Business Finance Business
Email terms and conditions: 
www.hpdsoftware.com/disclaimer -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: auto-xxx

2004-10-07 Thread Martin I. Levi
On Wed, 2004-10-06 at 17:30, Armin Waibel wrote:
> Hi Martin,
> 
>  > If I get an A object (always through ODMG) from the DB, change the field
>  > A.b_id to another valid B id and try to persist, this fails or
>  > worse, it does not have any effect. Am i forced to get the B object and
>  > perform an A.set(B) or is there any better way to do this knowing the
>  > id? (I am trying to avoid querying B again)
> 
> The referenced object B is dominating the FK field b_id in A. This mean 
> if A has no B reference OJB assume that the reference was deleted and 
> set b_id to null. If you lookup A and B was materialized too 
> (auto-retrieve is true in reference-descriptor in A) and then change 
> b_id, OJB get the referenced B and override the changed b_id with the 
> old value.
> So you have to load the new B object and replace the referenced object in A.
> 
> regards,
> Armin
> 

Ok... I tried to do what you said (more or less) but I still have
problems. I'm going to tell you the scenario that will help for sure. I
get the A object, change the references (not the embedded objects but
the Integer objects which map the FK), then I pass this object and the
transaction to an update method. In that method using Metadata I guess
which references this object has (*) then I read the new referenced
objects, load them in the main object and persist... nothing happens!

The interesting point is that if i clone the main object (inside the
update method), inspect clone's references using Metadata, load new
referenced objects into the clone and finally I copy clone data into the
original object: it works perfect. Now i am lost! :)

I post the code just in case.

(*) I do this because this method has to be generic in order to use it
with many objects which are subclasses of the main class
(BaseBusinessObject).


public final void updateBOtx(BaseBusinessObject bbo,TransactionExt tx)
throws ComputersServiceImplException,CloneNotSupportedException
{
/*notice that if the lines begining with // are uncommented an the 
lines ending in // are commented everything works, if the code is left
just like it is now... it has no effect.*/

Class boClass;
MetadataManager mm;
DescriptorRepository dr;
ClassDescriptor cld;
String tableName;
Vector references;
//BaseBusinessObject bboClone;

//bboClone=bbo.cloneIt();

try
{
logger.debug("Triggering object update");
if(!tx.isOpen())
{
logger.debug("Opening transaction...");
tx = (TransactionExt) odmg.newTransaction();
tx.begin();
}

//boClass=bboClone.getClass();
boClass=bbo.getClass();//
mm = MetadataManager.getInstance();
dr = mm.copyOfGlobalRepository();
cld = dr.getDescriptorFor(boClass);
//tableName = cld.getFullTableName();

references = cld.getObjectReferenceDescriptors();
for (int i = 0; i < references.size(); i++)
{
Class referencedClass;
BaseBusinessObject referencedObject;
String id;
ObjectReferenceDescriptor reference;

reference = (ObjectReferenceDescriptor)
references.get(i);
referencedClass=reference.getItemClass();
   
//id=BeanUtils.getProperty((Object)bboClone,(String)reference.getForeignKeyFields().firstElement());
   
id=BeanUtils.getProperty((Object)bbo,(String)reference.getForeignKeyFields().firstElement());//
logger.debug("Reference found! -
"+(String)reference.getForeignKeyFields().firstElement()+"="+id+"
class="+referencedClass.getName());
referencedObject=getBOtx(referencedClass,id,tx);
   
//BeanUtils.setProperty(bboClone,reference.getAttributeName(),referencedObject);
   
BeanUtils.setProperty(bbo,reference.getAttributeName(),referencedObject);
}
//bbo.copy(bboClone);

tx.lock(bbo,Transaction.WRITE);

logger.debug("Transaction checkpoint...");
tx.checkpoint();
}
catch (Exception ex)
{
tx.abort();
throw new ComputersServiceImplException("Exception thrown
while updating BO in ComputerServiceImpl.updateBO()",ex.getCause());
}
}





> 
> Martin I. Levi wrote:
> 
> > Hi Armin,
> > 
> > Well I figured out what happens. In the rc5 application (which was made
> > some time ago) the repository-settings were:
> > 
> > auto-update=false
> > auto-delete=false
> > auto-retrieve=true
> > 
> > (just like in the rc7 application) but the big difference is that in the
> > r5 application when i changed a 1:1 reference my program cared to look
> > for the new referenced object and load it "inside" the main object and
> > then call ODMG to persist the updated object. This task was not 

Re: auto-xxx

2004-10-07 Thread Martin I. Levi
About my previous auto-xxx mail:

When I say it "works perfect" I mean that changes are persisted.

On Thu, 2004-10-07 at 18:50, Martin I. Levi wrote:
> On Wed, 2004-10-06 at 17:30, Armin Waibel wrote:
> > Hi Martin,
> > 
> >  > If I get an A object (always through ODMG) from the DB, change the field
> >  > A.b_id to another valid B id and try to persist, this fails or
> >  > worse, it does not have any effect. Am i forced to get the B object and
> >  > perform an A.set(B) or is there any better way to do this knowing the
> >  > id? (I am trying to avoid querying B again)
> > 
> > The referenced object B is dominating the FK field b_id in A. This mean 
> > if A has no B reference OJB assume that the reference was deleted and 
> > set b_id to null. If you lookup A and B was materialized too 
> > (auto-retrieve is true in reference-descriptor in A) and then change 
> > b_id, OJB get the referenced B and override the changed b_id with the 
> > old value.
> > So you have to load the new B object and replace the referenced object in A.
> > 
> > regards,
> > Armin
> > 
> 
> Ok... I tried to do what you said (more or less) but I still have
> problems. I'm going to tell you the scenario that will help for sure. I
> get the A object, change the references (not the embedded objects but
> the Integer objects which map the FK), then I pass this object and the
> transaction to an update method. In that method using Metadata I guess
> which references this object has (*) then I read the new referenced
> objects, load them in the main object and persist... nothing happens!
> 
> The interesting point is that if i clone the main object (inside the
> update method), inspect clone's references using Metadata, load new
> referenced objects into the clone and finally I copy clone data into the
> original object: it works perfect. Now i am lost! :)
> 
> I post the code just in case.
> 
> (*) I do this because this method has to be generic in order to use it
> with many objects which are subclasses of the main class
> (BaseBusinessObject).
> 
> 
> public final void updateBOtx(BaseBusinessObject bbo,TransactionExt tx)
> throws ComputersServiceImplException,CloneNotSupportedException
> {
> /*notice that if the lines begining with // are uncommented an the 
> lines ending in // are commented everything works, if the code is left
> just like it is now... it has no effect.*/
> 
> Class boClass;
> MetadataManager mm;
> DescriptorRepository dr;
> ClassDescriptor cld;
> String tableName;
> Vector references;
> //BaseBusinessObject bboClone;
> 
> //bboClone=bbo.cloneIt();
> 
> try
> {
> logger.debug("Triggering object update");
> if(!tx.isOpen())
> {
> logger.debug("Opening transaction...");
> tx = (TransactionExt) odmg.newTransaction();
> tx.begin();
> }
> 
> //boClass=bboClone.getClass();
> boClass=bbo.getClass();//
> mm = MetadataManager.getInstance();
> dr = mm.copyOfGlobalRepository();
> cld = dr.getDescriptorFor(boClass);
> //tableName = cld.getFullTableName();
> 
> references = cld.getObjectReferenceDescriptors();
> for (int i = 0; i < references.size(); i++)
> {
> Class referencedClass;
> BaseBusinessObject referencedObject;
> String id;
> ObjectReferenceDescriptor reference;
> 
> reference = (ObjectReferenceDescriptor)
> references.get(i);
> referencedClass=reference.getItemClass();
>
> //id=BeanUtils.getProperty((Object)bboClone,(String)reference.getForeignKeyFields().firstElement());
>
> id=BeanUtils.getProperty((Object)bbo,(String)reference.getForeignKeyFields().firstElement());//
> logger.debug("Reference found! -
> "+(String)reference.getForeignKeyFields().firstElement()+"="+id+"
> class="+referencedClass.getName());
> referencedObject=getBOtx(referencedClass,id,tx);
>
> //BeanUtils.setProperty(bboClone,reference.getAttributeName(),referencedObject);
>
> BeanUtils.setProperty(bbo,reference.getAttributeName(),referencedObject);
> }
> //bbo.copy(bboClone);
> 
> tx.lock(bbo,Transaction.WRITE);
> 
> logger.debug("Transaction checkpoint...");
> tx.checkpoint();
> }
> catch (Exception ex)
> {
> tx.abort();
> throw new ComputersServiceImplException("Exception thrown
> while updating BO in ComputerServiceImpl.updateBO()",ex.getCause());
> }
> }
> 
> 
> 
> 
> 

-- 
Saludos,

Martin I. Levi

Centre Tecnològic de Transferenciència de Calor
Universitat Politècnica de Catalunya
www.cttc.upc.edu



Re: Howto update specifc field

2004-10-07 Thread Armin Waibel
yep, Charles is right. Will be supported in OJB 1.1.
Should we backport this feature to OJB 1.0.x? But this will change the 
PB interface (new method PB#update(Object obj, String[] fields)) and 
some other internal pluggable interfaces (new methods).

regards,
Armin
Charles Anthony wrote:
Hi Francisco,
Sorry no-one replied last time. 

The simple answer is that this currently not possible in OJB.
Cheers,
Charles.

-Original Message-
From: Francisco Bruno [mailto:[EMAIL PROTECTED]
Sent: 07 October 2004 13:03
To: OJB User List
Subject: Howto update specifc field
All,
How can I do "update statement" updates changed columns only?
Ex: TABLE A (
  IDNUMBER,
  DESC VARCHAR,
  CAT   VARCHAR)
I need update only CAT field, but the code generate for p6spy is:
UPDATE A
SETDESC = '',
CAT= 'P'
WHERE ID = 1
[],
Francisco Bruno
Analista de Sistemas
OFM Tecnologia & Informação
--
---
"Faça as coisas o mais simples que você puder, porém não as 
mais simples."
Albert Einstein

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


___
HPD Software Ltd. - Helping Business Finance Business
Email terms and conditions: www.hpdsoftware.com/disclaimer 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Only the last object semi ok when executing oql query

2004-10-07 Thread Armin Waibel
Hi,
Stijn de Witt wrote:
Thanks for your message, it clears up a lot.
I guess I'll use the PB api then. 
Do you know if/when this will be fixed 
for ODMG?
I will try to fix this, but I can't give a time frame when it will 
happen (much other stuff to do).


Thanks for your responses to all the little questions too. If have some 
new in reaction to your answers, please read below...

Armin Waibel wrote:
Hi Stijn,
at the end of writing this mail I found that you are using 
"inheritance hierarchy to multiple joined tables" for Candidate. The 
ODMG-api doesn't work properly with this feature (PB-api does, sorry 
this was only noted in 1.0.1 release-notes). Additionally you define 
in Person class-descriptor Candidate as extent class. Mixing these 
features doesn't make sense (think so). So remove the the 'super' 
reference in Candidate and only use 'extent' the feature to tell OJB 
about the hierarchy.

Can you explain the part about the extent and super a bit more?s
With extent-class attribute you can declare object hierarchies
http://db.apache.org/ojb/docu/guides/advanced-technique.html#Extents+and+Polymorphism
Declare tags for Person and Candidate independently (all fields declared 
in Person have to be declared in Candidate too). Then xdoclet automatic 
creates an extent-class entry in Person
http://db.apache.org/ojb/docu/guides/xdoclet-module.html#ojb.extent-class

Now you can query for all Person.class and OJB will return a Collection 
of all Person and Candidate objects.

If you use the "super" reference (declare all field again in both 
classes) the DB "sub"-table only contain the PK,FK column and the 
additional columns for the sub-class ('determine-extents' should be set 
false in super class).
If you query for all Person.class OJB will return a Collection of Person 
objects containing all Person objects and the Person part of all 
Candidate objects (but AFAIK no Candidate objects). If you query for 
Candidate OJB return a Collection of Candidate objects by read data from 
both tables.

regards,
Armin

I am 
using OjbDoclet. Here are the xdoclet comments for Person and Candidate:

/**
* @ojb.class table="bit_Person"
*/
public class Person
{
   /**
   * @ojb.field name="id"
   * primarykey="true"
   * jdbc-type="INTEGER"
   * length="11"
   * autoincrement="ojb"
   */
   protected int id;
/**
* @ojb.class table="bit_job_Candidate"
* include-inherited="false"
* @ojb.reference class-ref="nl.bergland.codamo.Person"
* name="super"
* foreignkey="id"
* auto-retrieve="true"
* auto-update="true"
* auto-delete="true"
*/
public class Candidate extends Person
{
   /**
* @ojb.field name="id"
* primarykey="true"
* jdbc-type="INTEGER"
* length="11"
* autoincrement="ojb"
*/
   protected int id;
I am worried about the id field too. It's duplicated in Candidate, but 
that shouldn't be necessary should it?

Greetings,
-Stijn
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Custom ClassLoader

2004-10-07 Thread Thomas Dudziak
Keith Rogers wrote:
Hi all,
I'm afraid this might be kind of off topic...
I'd like to use a custom class loader with OJB (I'm using the ODMG
implementation), so that I can use BCEL to construct simple classes -
the aim is to have a single config file so the application can
programatically set the OJB metadata and construct the classes it will
use all in one step. 

I know the basics of using OJB, and I can construct classes using BCEL
that are identical to those that I've been writing by hand - the bit I'm
stuck with is insinuating my custom ClassLoader into the application so
that OJB uses it to load classes..
Can anyone give me any help on this?
 

You can set your own class loader using this method:
http://db.apache.org/ojb/api/org/apache/ojb/broker/util/ClassHelper.html#setClassLoader(java.lang.ClassLoader)
You simply call it prior to doing any OJB stuff, e.g. prior to using the 
PersistenceBrokerFactory or similar.

Tom
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Custom ClassLoader

2004-10-07 Thread Keith Rogers
Hi all,

I'm afraid this might be kind of off topic...

I'd like to use a custom class loader with OJB (I'm using the ODMG
implementation), so that I can use BCEL to construct simple classes -
the aim is to have a single config file so the application can
programatically set the OJB metadata and construct the classes it will
use all in one step. 

I know the basics of using OJB, and I can construct classes using BCEL
that are identical to those that I've been writing by hand - the bit I'm
stuck with is insinuating my custom ClassLoader into the application so
that OJB uses it to load classes..

Can anyone give me any help on this?

Keith


The information in this e-mail is confidential and intended to be solely for the use 
of the addressee(s) and may contain copyright and/or legally privileged information.  
If you are not the addressee (or responsible for delivery of the message to the 
addressee) please e-mail us at [EMAIL PROTECTED] and delete the message from your 
computer; copying, distribution, use or disclosure of its contents is strictly 
prohibited.
As Internet communications are capable of data corruption no responsibility is 
accepted for changes made to this message after it was sent. For this reason it may be 
inappropriate to rely on advice contained in any e-mail without obtaining written 
confirmation of it.
In addition, no liability or responsibility is accepted for viruses and it is your 
responsibility to scan attachments (if any).
Please note that for business purposes, outgoing and incoming emails from and to the 
company may be monitored and recorded.

Mouchel Parkman Services Ltd, Registered in England at West Hall, Parvis Road, West 
Byfleet, Surrey UK KT14 6EZ Registered No : 1686040


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Howto update specifc field

2004-10-07 Thread Charles Anthony
Hi Francisco,

Sorry no-one replied last time. 

The simple answer is that this currently not possible in OJB.

Cheers,

Charles.

> -Original Message-
> From: Francisco Bruno [mailto:[EMAIL PROTECTED]
> Sent: 07 October 2004 13:03
> To: OJB User List
> Subject: Howto update specifc field
> 
> 
> All,
> How can I do "update statement" updates changed columns only?
> Ex: TABLE A (
>IDNUMBER,
>DESC VARCHAR,
>CAT   VARCHAR)
> 
> I need update only CAT field, but the code generate for p6spy is:
> UPDATE A
> SETDESC = '',
>  CAT= 'P'
> WHERE ID = 1
> 
> [],
> Francisco Bruno
> Analista de Sistemas
> OFM Tecnologia & Informação
> --
> ---
> "Faça as coisas o mais simples que você puder, porém não as 
> mais simples."
> Albert Einstein
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


___
HPD Software Ltd. - Helping Business Finance Business
Email terms and conditions: www.hpdsoftware.com/disclaimer 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Howto update specifc field

2004-10-07 Thread Francisco Bruno
All,
How can I do "update statement" updates changed columns only?
Ex: TABLE A (
  IDNUMBER,
  DESC VARCHAR,
  CAT   VARCHAR)
I need update only CAT field, but the code generate for p6spy is:
UPDATE A
SETDESC = '',
CAT= 'P'
WHERE ID = 1
[],
Francisco Bruno
Analista de Sistemas
OFM Tecnologia & Informação
-
"Faça as coisas o mais simples que você puder, porém não as mais simples."
Albert Einstein
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ojb 1.0.1 + FreeBSD 4.8 + Tomcat 5.0.24 + diablo jdk 1.3.1 = error

2004-10-07 Thread Armin Waibel
Hi,
maybe it's a problem with the OJB source code pre-process. Any problems 
when build the OJB jars with diablo jdk 1.3.1 on FreeBSD?
Web search returns that
http://lists.freebsd.org/pipermail/freebsd-java/2003-September/000786.html

regards,
Armin
Fokin Nikolay wrote:
Hi all!
I have a problem. There is an application that uses Tomcat 5.0.27 + jdk 1.4.2_04 + OJB 1.0.1 + interbase 6.0 
On Win 2000 it works correctly, but on my server (FreeBSD 4.8 + Tomcat 5.0.24 + diablo jdk 1.3.1 + firebird 1.0.2) the next error appeares:

java.lang.AbstractMethodError: org/apache/ojb/broker/core/PersistenceBrokerAbstractImpl.query
at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(JdbcAccessImpl.java:277)
at org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(RsQueryObject.java:74)
at org.apache.ojb.broker.accesslayer.RsIterator.(RsIterator.java:183)
at org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(RsIteratorFactoryImpl.java:58)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(PersistenceBrokerImpl.java:1808)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(PersistenceBrokerImpl.java:1333)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByQuery(PersistenceBrokerImpl.java:1445)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(DelegatingPersistenceBroker.java:307)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(DelegatingPersistenceBroker.java:307)
at org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.lookupStoreSequence(SequenceManagerHighLowImpl.java:225)
at org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.getSequence(SequenceManagerHighLowImpl.java:193)
at org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.getUniqueLong(SequenceManagerHighLowImpl.java:145)
at org.apache.ojb.broker.util.sequence.AbstractSequenceManager.getUniqueValue(AbstractSequenceManager.java:139)
at org.apache.ojb.broker.util.BrokerHelper.setAutoIncrementValue(BrokerHelper.java:317)
at org.apache.ojb.broker.util.BrokerHelper.getValuesForObject(BrokerHelper.java:364)
at org.apache.ojb.broker.util.BrokerHelper.getKeyValues(BrokerHelper.java:176)
at org.apache.ojb.broker.Identity.init(Identity.java:150)
at org.apache.ojb.broker.Identity.(Identity.java:119)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:691)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:175)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:175)
at bt.login.LoginAction.execute(LoginAction.java:62)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at bt.filters.CharsetFilter.doFilter(CharsetFilter.java:26)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(

ojb 1.0.1 + FreeBSD 4.8 + Tomcat 5.0.24 + diablo jdk 1.3.1 = error

2004-10-07 Thread Fokin Nikolay
Hi all!

I have a problem. There is an application that uses Tomcat 5.0.27 + jdk 1.4.2_04 + OJB 
1.0.1 + interbase 6.0 
On Win 2000 it works correctly, but on my server (FreeBSD 4.8 + Tomcat 5.0.24 + diablo 
jdk 1.3.1 + firebird 1.0.2) the next error appeares:

java.lang.AbstractMethodError: 
org/apache/ojb/broker/core/PersistenceBrokerAbstractImpl.query
at 
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(JdbcAccessImpl.java:277)
at org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(RsQueryObject.java:74)
at org.apache.ojb.broker.accesslayer.RsIterator.(RsIterator.java:183)
at 
org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(RsIteratorFactoryImpl.java:58)
at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(PersistenceBrokerImpl.java:1808)
at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(PersistenceBrokerImpl.java:1333)
at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByQuery(PersistenceBrokerImpl.java:1445)
at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(DelegatingPersistenceBroker.java:307)
at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(DelegatingPersistenceBroker.java:307)
at 
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.lookupStoreSequence(SequenceManagerHighLowImpl.java:225)
at 
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.getSequence(SequenceManagerHighLowImpl.java:193)
at 
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.getUniqueLong(SequenceManagerHighLowImpl.java:145)
at 
org.apache.ojb.broker.util.sequence.AbstractSequenceManager.getUniqueValue(AbstractSequenceManager.java:139)
at org.apache.ojb.broker.util.BrokerHelper.setAutoIncrementValue(BrokerHelper.java:317)
at org.apache.ojb.broker.util.BrokerHelper.getValuesForObject(BrokerHelper.java:364)
at org.apache.ojb.broker.util.BrokerHelper.getKeyValues(BrokerHelper.java:176)
at org.apache.ojb.broker.Identity.init(Identity.java:150)
at org.apache.ojb.broker.Identity.(Identity.java:119)
at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:691)
at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:175)
at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:175)
at bt.login.LoginAction.execute(LoginAction.java:62)
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at bt.filters.CharsetFilter.doFilter(CharsetFilter.java:26)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:296)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:372)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:694)
at or