RE: WebSphere compatibility?

2004-02-11 Thread Ricardo Tercero Lozano

I`m successfully using OJB inside a WebSphere 4.0.4 (Windows 2000) using
DataSource.




-Mensaje original-
De: Yannick Goujon [mailto:[EMAIL PROTECTED]
Enviado el: miercoles, 11 de febrero de 2004 17:19
Para: [EMAIL PROTECTED]
Asunto: WebSphere compatibility?



Is Websphere 4.0.7 (solaris) compatible with OJB using datasource or do we
need to upgrade to websphere 5?

Thanks

Yannick



-
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]



How could I know how many brokers are available in brokers pool

2003-11-12 Thread Ricardo Tercero Lozano


Just for stress testing.


--
--
Ricardo Tercero Lozano
iSOCO - Intelligent Software for the Networked Economy
e-mail: [EMAIL PROTECTED]
Web: http://www.isoco.com
Francisca Delgado 11, 2nd floor
28108 Alcobendas
Madrid (Spain)
#T: +34 91 334 9750
+34 91 334 9797 (Switchboard)
#F: +34 91 334 9799


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



RE: RE : BIGINT to Long, FieldConversion ?

2003-08-09 Thread Ricardo Tercero Lozano
I use BIGINT for my primary keys and Long for class fields and
everything goes ok.


Ricardo.


-Original Message-
From: Emmanuel Dupont [mailto:[EMAIL PROTECTED] 
Sent: viernes, 08 de agosto de 2003 18:29
To: 'OJB Users List'
Subject: RE : BIGINT to Long, FieldConversion ?


More information : it faills on the FK key (not null column), null is put in
the assignReferenceFKs method from PersistenceBrokerImpl...

-Message d'origine-
De : Emmanuel Dupont [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 8 août 2003 17:35
À : OJB Users List
Objet : BIGINT to Long, FieldConversion ?

All,

 

 

I would like to have a Long type in my jdo Object. But the jdbc mapping
tells that for a BIGINT it is a long (small).

 

So Could I use the Field conversion class ?

 

I try to use it with the Int2IntegerFieldConversion sample and I created a
long2LongFieldConversion.

 

But it doesn't work !

 

Any help would be really appreciated !

 



-
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: RE : RE : BIGINT to Long, FieldConversion ?

2003-08-08 Thread Ricardo Tercero Lozano

You have to put the B instance. 

If there is a relation between the two classes in
repository.xml you must use object instances. 
Otherwise you must use the class A field id attribute.

Ricardo.



-Original Message-
From: Emmanuel Dupont [mailto:[EMAIL PROTECTED] 
Sent: viernes, 08 de agosto de 2003 18:56
To: 'OJB Users List'
Subject: RE : RE : BIGINT to Long, FieldConversion ?


Thanks Ricardo !

I would like to know wich kind of link you do :

Object A have a reference to B, called bB.

If I want to insert in db A, Have to do :

A.setbB(instanceB);

Or

A.setb_FK(id_B_PK);



Should I set the bB instance or the FK_Id ?

Because I seems that with small long I can do only setb_FK() and with bib
Long I have to set the B instance reference.



Thanks for your reply ...



-Message d'origine-
De : Ricardo Tercero Lozano [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 8 août 2003 18:34
À : 'OJB Users List'
Objet : RE: RE : BIGINT to Long, FieldConversion ?

I use BIGINT for my primary keys and Long for class fields and everything
goes ok.


Ricardo.


-Original Message-
From: Emmanuel Dupont [mailto:[EMAIL PROTECTED] 
Sent: viernes, 08 de agosto de 2003 18:29
To: 'OJB Users List'
Subject: RE : BIGINT to Long, FieldConversion ?


More information : it faills on the FK key (not null column), null is put in
the assignReferenceFKs method from PersistenceBrokerImpl...

-Message d'origine-
De : Emmanuel Dupont [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 8 août 2003 17:35
À : OJB Users List
Objet : BIGINT to Long, FieldConversion ?

All,

 

 

I would like to have a Long type in my jdo Object. But the jdbc mapping
tells that for a BIGINT it is a long (small).

 

So Could I use the Field conversion class ?

 

I try to use it with the Int2IntegerFieldConversion sample and I created a
long2LongFieldConversion.

 

But it doesn't work !

 

Any help would be really appreciated !

 



-
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]


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



Cannot compile ojb-1.0-rc4 on jdk1.3

2003-07-28 Thread Ricardo Tercero Lozano

Class java.util.IdentityHashMap is not available on jvm 1.3



main:
[javac] Compiling 549 source files to
C:\java\db-ojb-1.0.rc4-src\target\classes
[javac]
C:\java\db-ojb-1.0.rc4-src\target\src\org\apache\ojb\otm\copy\ReflectiveObje
ct
CopyStrategy.java:68: cannot resolve symbol
[javac] symbol  : class IdentityHashMap
[javac] location: package util
[javac] import java.util.IdentityHashMap;
[javac]  ^
[javac]
C:\java\db-ojb-1.0.rc4-src\target\src\org\apache\ojb\otm\copy\MetadataObject
Co
pyStrategy.java:69: cannot resolve symbol
[javac] symbol  : class IdentityHashMap
[javac] location: package util
[javac] import java.util.IdentityHashMap;
[javac]  ^
[javac]
C:\java\db-ojb-1.0.rc4-src\target\src\org\apache\ojb\otm\copy\ReflectiveObje
ct
CopyStrategy.java:108: cannot resolve symbol
[javac] symbol  : class IdentityHashMap
[javac] location: class
org.apache.ojb.otm.copy.ReflectiveObjectCopyStrategy
[javac] return clone(toCopy, new IdentityHashMap(), new
HashMap());
[javac]  ^
[javac]
C:\java\db-ojb-1.0.rc4-src\target\src\org\apache\ojb\otm\copy\MetadataObject
Co
pyStrategy.java:100: cannot resolve symbol
[javac] symbol  : class IdentityHashMap
[javac] location: class
org.apache.ojb.otm.copy.MetadataObjectCopyStrategy
[javac] return clone(obj, new IdentityHashMap(), broker);
[javac]   ^
[javac] 4 errors

BUILD FAILED
file:C:/java/db-ojb-1.0.rc4-src/build.xml:218: Compile failed; see the
compiler error outp
ut for details.



--
--
Ricardo Tercero Lozano
iSOCO - Intelligent Software for the Networked Economy
e-mail: [EMAIL PROTECTED]
Web: http://www.isoco.com
Francisca Delgado 11, 2nd floor
28108 Alcobendas
Madrid (Spain)
#T: +34 91 334 9750
+34 91 334 9797 (Switchboard)
#F: +34 91 334 9799


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



broker.getCount() and count(*)

2003-06-10 Thread Ricardo Tercero Lozano

Hello to all,

I know this question has been answered, but I could
not find it.

I want to execute a broker.getIteratorByQuery() and
to know the amount of elements returned by the query.
This is simple using broker.getCount().

But, how can I do it just to not to execute two queries,
one for the query itself and one for the count(*)?

thanks in advance,

--
--
Ricardo Tercero Lozano
iSOCO - Intelligent Software for the Networked Economy
e-mail: [EMAIL PROTECTED]
Web: http://www.isoco.com
Francisca Delgado 11, 2nd floor
28108 Alcobendas
Madrid (Spain)
#T: +34 91 334 9750
+34 91 334 9797 (Switchboard)
#F: +34 91 334 9799


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



Join Creation Exception

2003-03-24 Thread Ricardo Tercero Lozano
)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
at java.lang.Thread.run(Thread.java:479)

--

-

Both, variable name and column name of the Bean/Table are named name.

Same code without upper() works (but doesn't produce any result, as
upper() is necessary):

  ...
  if(collegiateName != null  collegiateName.trim().length()  0){
  crit.addLike(colegiate.name, % +
collegiateName.toUpperCase() + %);
  }



If I rename the Bean var name to accountName:

  ...
  if(collegiateName != null  collegiateName.trim().length()  0){
  crit.addLike(upper(colegiate.accountName), % +
collegiateName.toUpperCase() + %);
  }
  ...

the code works fine.


Could it be a OBJ bug?



--
--
Ricardo Tercero Lozano
iSOCO - Intelligent Software for the Networked Economy
e-mail: [EMAIL PROTECTED]
Web: http://www.isoco.com
Francisca Delgado 11, 2nd floor
28108 Alcobendas
Madrid (Spain)
#T: +34 91 334 9750
+34 91 334 9797 (Switchboard)
#F: +34 91 334 9799


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



repository_user.xml, reverse-db and field indexes

2003-03-03 Thread Ricardo Tercero Lozano

I found than if list of field descriptors inside a class descriptor in
repository_user.xml
don't work properly if field indexes begin with 0 (as generated by
reverse-db) and
reference descriptors are defined for some fields. Key values were loaded
right, but
some associated beans are loaded and some not.

This behavior was found for a table with 4 references to another table (4
types of users of
class UserBean). I use OJB 0.9.9.

Ricardo.


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



RE: repository_user.xml, reverse-db and field indexes

2003-03-03 Thread Ricardo Tercero Lozano
New information:


Field descriptor indexes can begin with 0 (there's no complaints)
but if I put a reference-descriptor with a foreign-key id = 6,
OJB gets the bean for the previous field-id (as it starts counting with
1).


Ricardo.




-Mensaje original-
De: Ricardo Tercero Lozano [mailto:[EMAIL PROTECTED]
Enviado el: lunes, 03 de marzo de 2003 18:24
Para: [EMAIL PROTECTED]
Asunto: repository_user.xml, reverse-db and field indexes



I found than if list of field descriptors inside a class descriptor in
repository_user.xml
don't work properly if field indexes begin with 0 (as generated by
reverse-db) and
reference descriptors are defined for some fields. Key values were loaded
right, but
some associated beans are loaded and some not.

This behavior was found for a table with 4 references to another table (4
types of users of
class UserBean). I use OJB 0.9.9.

Ricardo.


-
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: Prefetch dynamic change

2003-02-21 Thread Ricardo Tercero Lozano

see 'auto-update, auto-delete set dynamically?' thread.



-Mensaje original-
De: Jean-Baptiste BRIAUD [mailto:[EMAIL PROTECTED]]
Enviado el: viernes, 21 de febrero de 2003 10:50
Para: 'OJB Users List'
Asunto: Prefetch dynamic change


Hello,

Is it possible to dynamicly change value of auto-XXX 
(auto-delete, auto-retrieve, ...) specified in the repository-user.xml ?

By dynamicly I mean in Java code. Say in the xml file there is the
default version, but in Java code I'd like to change value for one shot.
Note that I don't want to modify the xml file.

is org.apache.ojb.broker.metadata a way to a solution ?

I was able by this way to obtain value store in the repository xml file,
but is it possible to change values (any values ?) without writing to
the file ?

   Thanks !

__
Jean-Baptiste BRIAUDSysdeo
Software engineer   www.sysdeo.com
 www.eclipsetotale.com


-
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-update, auto-delete set dynamically?

2003-02-20 Thread Ricardo Tercero Lozano

Or you can map multiple beans to same table with different behavior.



-Mensaje original-
De: Mahler Thomas [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 20 de febrero de 2003 17:23
Para: 'OJB Users List'
Asunto: RE: auto-update, auto-delete set dynamically?


Sure, we have a MOP inside (http://db.apache.org/ojb/links.html#design)!

use
http://db.apache.org/ojb/api/org/apache/ojb/broker/PersistenceBroker.html#ge
tClassDescriptor(java.lang.Class) to obtain a classes descriptor.

use
http://db.apache.org/ojb/api/org/apache/ojb/broker/metadata/ClassDescriptor.
html#getObjectReferenceDescriptorByName(java.lang.String) or similar to
navigate to the reference or collection descriptor in question.

use
http://db.apache.org/ojb/api/org/apache/ojb/broker/metadata/ObjectReferenceD
escriptor.html#setCascadeStore(boolean) to define update behaviour and
http://db.apache.org/ojb/api/org/apache/ojb/broker/metadata/ObjectReferenceD
escriptor.html#setCascadeDelete(boolean) do define delete behaviour.

cheers,
Thomas

 -Original Message-
 From: Robert S. Sfeir [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 20, 2003 5:15 PM
 To: oJB List
 Subject: auto-update, auto-delete set dynamically?


 I was wondering if there was a method by which I could set
 auto-update,
 retrieve and delete from within my java code.  I don't want to put it
 in the xml because sometimes when I select say a Home, I only want to
 have the home info, but I don't want to cascade my search.  Sometimes
 when I delete an object there are instances where it's OK to cascade
 delete, others when it's not.  Same goes with update.

 Thanks

 R

 --
 Robert S. Sfeir
 Senior Java Engineer
 National Institutes of Health
 Center for Information Technology
 Department of Enterprise Custom Applications
 [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]


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




RE: OJB Setup

2003-02-18 Thread Ricardo Tercero Lozano

You could use

broker = PersistenceBrokerFactory.defaultPersistenceBroker();


 if you only want to connect from the default connection (and if you
only has one connection configured).


Ricardo.


-Mensaje original-
De: Lennart Benoot [mailto:[EMAIL PROTECTED]]
Enviado el: martes, 18 de febrero de 2003 16:18
Para: [EMAIL PROTECTED]
Asunto: OJB Setup


Hi All,

While trying to setup ObJectRelationalBridge, I created a test project and 
copied all necesary files from the example in test1. Everything was very 
clear. Then I copied code from tutorial 1:


 try
 {
 broker = PersistenceBrokerFactory.
 createPersistenceBroker(new PBKey(repository.xml));
 }


This failed over and over again. After half a day I started reading the 
code. In PBKey.java it came to my attention that the filename 
repository.xml is not the parameter expected. Instead it seems that it 
should be the name of the jdbc connection (jcd-alias). Am i right here?

regards,
Lennart 


-
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]