Re: Howto provide my own Storage Classes

2003-12-09 Thread Thomas Mahler
Hi Claus, Claus Radloff wrote: Hi, when we started, we had two distinct tables, but this solution was too slow, as we have a few hundred thousand texts. So we put our texts in one table. This improved the performance significantly. Hmm, a decent database should be able to handle a foreign key

Re: How does ODMG work?

2003-12-09 Thread Thomas Mahler
Hi diane, Jewett, Diane C wrote: I'm going through tutorial2(ODMG) and with the following: // 3. set the OQL select statement query.create(select allproducts from + Product.class.getName()); Where does allproducts get defined? allproducts is just a

RE: Persistence Broker 'NOT' Criteria

2003-12-09 Thread Charles Anthony
Hi Jakob, I think an addNot(Criteria crit) would make more sense, be more flexible, and be more in fitting with the rest of the QueryByCriteria API. e.g. Criteria main = new Criteria(); Criteria subCriteria = new Criteria(); subCriteria.addEqualTo(field1,test1);

ojb mixing up jdbc-connection-descriptors

2003-12-09 Thread Michael Mogley
OK, I've got two Tomcat webapps. Each with it's own OJB.properties and repository xml files defining two different mappings and two different connection descriptors. Ojb libraries are in common/lib to allow sharing among webapps. Everything was working file until I added the second webapp.

RE: ojb mixing up jdbc-connection-descriptors

2003-12-09 Thread Charles Anthony
I think you'll find that putting OJB in /common/lib is your problem. Try putting the the OJB jars in the each webapps WEB-INF/lib directory, and see if the problem goes away. I think it will. Cheers, Charles. -Original Message- From: Michael Mogley [mailto:[EMAIL PROTECTED] Sent: 09

Re: ojb mixing up jdbc-connection-descriptors

2003-12-09 Thread Michael Mogley
You're probably right. But is there no way then to keep Ojb as a shared library? Michael - Original Message - From: Charles Anthony [EMAIL PROTECTED] To: 'OJB Users List' [EMAIL PROTECTED] Sent: Monday, December 08, 2003 11:23 PM Subject: RE: ojb mixing up jdbc-connection-descriptors

RE: ojb mixing up jdbc-connection-descriptors

2003-12-09 Thread Charles Anthony
I'm not sure; you seemed to be getting desperate, hence the quickly fired-off answer. Actually, I'm fairly sure the answer is no - there is no way to keep OJB as a shared library between multiple webapps, but I'll defer to the developers to be categorical. To follow up to the logical next

Re: ojb mixing up jdbc-connection-descriptors

2003-12-09 Thread Michael Mogley
Maybe not desperate, but frustrated. I do appreciate the quick reply. I think it would be tragic for ojb not be sharable among webapps. There are times when multiple apps should be able to take advantage of the same mapping and associated caches. For instance, an admin app modifies some domain

Re: ojb mixing up jdbc-connection-descriptors

2003-12-09 Thread Danilo Tommasina
Hi, just a quick idea, I don't know if it can work. you could implement a little bean that just can get a PersistenceBorker instance. You can then deploy the bean as global JNDI resource (quite easy in tomcat) that way you should be able to share OJB through several web-apps. However as I

Re: ojb mixing up jdbc-connection-descriptors

2003-12-09 Thread Armin Waibel
Hi Michael, Michael Mogley wrote: You're probably right. But is there no way then to keep Ojb as a shared library? hmm, I suppose it should be possible (e.g. it's possible to deploy OJB within ejb's and share these beans across webapps). But does it make sense? If you want to change one app,

Re: ojb mixing up jdbc-connection-descriptors

2003-12-09 Thread Michael Mogley
OK, I think I see why you're right, Charles. It seems the MetadataManager, being a singleton, initializes itself once globally for the first repository.xml it finds. Apparently, webapp2 beats webapp1 to the punch, initializes the MetadataManager to IT'S repository.xml and the rest is history.

Re: ojb mixing up jdbc-connection-descriptors

2003-12-09 Thread Michael Mogley
Hi Armin, If you want to share OJB, then put all OJB jars under tomcat shared ClassLoader (I think $CATALINA_HOME/lib). Use one configuration for all webapps. For each database define a connection-descriptor and use a jcdAlias name. Lookup PB instances using the defined jcdAlias names. This

Re: ojb mixing up jdbc-connection-descriptors

2003-12-09 Thread Michael Mogley
Actually Armin, I don't think your way will work either. Because the repository.xml must import via entity references all of the mappings for all the apps. But if the domain objects are not all shared, then the first app to init Ojb will error out on the referenced domain-classest DOESN'T have

Re: ojb mixing up jdbc-connection-descriptors

2003-12-09 Thread Michael Mogley
Thanks Danilo. This would probably work. And I may eventually go this route. Just not at this hour. :) Michael - Original Message - From: Danilo Tommasina [EMAIL PROTECTED] To: OJB Users List [EMAIL PROTECTED] Sent: Tuesday, December 09, 2003 12:07 AM Subject: Re: ojb mixing up

RE: JDO Bug (status please)

2003-12-09 Thread Mahler Thomas
Hi Gus, I think all works as designed here. you have some persistent object data that was persisted at some time before calling the prepareTX method. being a PersistenceCapable Object data still has its old PersistenceManager. If you use a new PM to open a transaction, data is still connected to

Connection.close() failed, message was Exception d'E/S: Socket closed

2003-12-09 Thread Emmanuel Dupont
All, I'm using OJBRC4 with Oracle. Often I have this error message : 0WARN [Finalizer] accesslayer.ConnectionFactoryNotPooledImpl - Connection.close() failed, message was Exception d'E/S: Socket closed I don't understand why. I do not use a connection

Re: Vector not found in OJB Repository

2003-12-09 Thread Thomas Cornet
If I remember well, Vectors are not supported. Replace them with java.util.List in your java classes and then it should work. Thomas At 09:43 09/12/2003, you wrote: Hello OJB Group, I wrote a test case to check if my OJB configuration works properly but everytime I run it I get the following

Re: Howto provide my own Storage Classes

2003-12-09 Thread Claus Radloff
Hi, thank you for all your feedback. The approach with a custom persistance broker sounds good to me. I will try this. My database (Oracle 9i) does handle the foreign key relations well, but it needs significantly more time. The lookup of a single text is not the problem. But when we select

Re: ojb mixing up jdbc-connection-descriptors

2003-12-09 Thread Martin Kalén
Michael Mogley wrote: OK, I've got two Tomcat webapps. Each with it's own OJB.properties and repository xml files defining two different mappings and two different connection descriptors. Ojb libraries are in common/lib to allow sharing among webapps. What you can do is use different OJB

Re: Connection.close() failed, message was Exception d'E/S: Socket closed

2003-12-09 Thread Martin Kalén
Emmanuel Dupont wrote: I'm using OJBRC4 with Oracle. Often I have this error message : 0WARN [Finalizer] accesslayer.ConnectionFactoryNotPooledImpl - Connection.close() failed, message was Exception d'E/S: Socket closed I've seen Oracle servers with a very short

Re: Howto provide my own Storage Classes

2003-12-09 Thread Antonio Gallardo
Claus Radloff dijo: Hi, thank you for all your feedback. The approach with a custom persistance broker sounds good to me. I will try this. My database (Oracle 9i) does handle the foreign key relations well, but it needs significantly more time. The lookup of a single text is not the

UNIQUE FIELDS

2003-12-09 Thread Tiago Henrique Costa Rodrigues Alves
Hi, I have a UNIQUE FIELD in one of my tables... Do I have to map a specific attribute at the repository_user.xml or should I catch a SQLException inside my code ? Att. Tiago Henrique C. R. Alves Analista de Sistemas Politec - CSS Tel: 3038-6952

Re: how to reload cached object?

2003-12-09 Thread Martin Kalén
Hi, Jair da Silva Ferreira Júnior wrote: This code better captures my intention: transaction.begin(); Customer c=new Customer(); c.setName(customer); Order o=new Order(); o.setCustomer(c); transaction.lock(c,transaction.WRITE); //persist the new

Re: BATCH-MODE parameter

2003-12-09 Thread Oleg Nitz
Hi Eric, Please send the full stack trace of the exception. Oleg -Original Message- From: eric barbe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Tue, 9 Dec 2003 10:24:31 +0100 Subject: BATCH-MODE parameter Hi all, In order to ameliorate performance, I've tried to set batch-mode

Using QueryBySQL to retrieve sequence value

2003-12-09 Thread Antonio Gallardo
Hi: I need to take a value from a sequence in PostgreSQL. The first idea is to run something like: QueryBySQL q = new QueryBySQL(Integer.class, SELECT nextval('mySequence');); Integer seq = (Integer)broker.getObjectByQuery(q); Is this correct? Exists another approach to do this? Best Regards,

ERR : Borrow broker from pool failed

2003-12-09 Thread Hennebelle
Hello, I have got a big problem with OJB (I think it is OJB), I have an error : org.apache.ojb.broker.PBFactoryException: Borrow broker from pool failed This error comes after 1 or 2 days after the launch of the instance and comes just after an update (after this error, we can do as select as we

Re: ERR : Borrow broker from pool failed

2003-12-09 Thread Armin Waibel
Hi, When I look in mail-archive, you purpose to close all the connections, this is done with commitTransaction (for PB) or commit() (for ODMG) Must I put PB.close() after all connections ? We have to pools, one for connections (if enabled) and one for PB instances. Connections are closed on

JDK 1.4 dependency in SqlTypeHelper.java

2003-12-09 Thread Gerhard Grosse
Hi all, I just checked out CVS Head and I'm getting compile errors in org.apache.ojb.broker.util.SqlTypeHelper.java: The methods CallableStatement.getType(int) are present only since JDK 1.4. I hope this does not mean that OJB is dropping JDK 1.3 support? Are there plans/ideas to fix this?

RE: JDK 1.4 dependency in SqlTypeHelper.java

2003-12-09 Thread Mahler Thomas
Hi Gerhard, we will continue to provide JDK1.2 and JDK1.3 support. All compilation dependencies will be fixed by next weekend. cu, thomas -Original Message- From: Gerhard Grosse [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 09, 2003 3:58 PM To: [EMAIL PROTECTED] Subject: JDK

no subject

2003-12-09 Thread Kim Wegerle
Hello, I've got a really hard problem. I'm using a Struts/OJB environment for my project. Now I've got a use case where a user could add or edit one of my business objects and relations to other business objects. This should happen in a kind of transaction, this means the user can edit an

Re: no subject

2003-12-09 Thread Brian McCallister
Which API are you using? If ODMG (or OTM) than maintaining a single transaction through multiple requests should work fine -- it is an object transaction, not a database transaction, so the database resource isn't being tied up the whole time. Doing a lot of this can get memory intensive,

Re: no subject

2003-12-09 Thread Kim Wegerle
Which API are you using? If ODMG (or OTM) than maintaining a single transaction through multiple requests should work fine -- it is an object transaction, not a database transaction, so the database resource isn't being tied up the whole time. Until now I'm using the PB API. But it's no

Re: no subject

2003-12-09 Thread Kim Wegerle
Which API are you using? If ODMG (or OTM) than maintaining a single transaction through multiple requests should work fine -- it is an object transaction, not a database transaction, so the database resource isn't being tied up the whole time. Until now I'm using the PB API. But it's no

Re: no subject

2003-12-09 Thread Kim Wegerle
Which API are you using? If ODMG (or OTM) than maintaining a single transaction through multiple requests should work fine -- it is an object transaction, not a database transaction, so the database resource isn't being tied up the whole time. Until now I'm using the PB API. But it's no

Re: no subject

2003-12-09 Thread Kim Wegerle
Which API are you using? If ODMG (or OTM) than maintaining a single transaction through multiple requests should work fine -- it is an object transaction, not a database transaction, so the database resource isn't being tied up the whole time. Until now I'm using the PB API. But it's no

RES: no subject

2003-12-09 Thread Tiago Henrique Costa Rodrigues Alves
The PB is a little tricky... I suggest the ODMG... Transaction is not that hard to implement... Read the tutorial 2 at the ojb web site... Tiago Henrique C. R. Alves -Mensagem original- De: Kim Wegerle [mailto:[EMAIL PROTECTED] Enviada em: terça-feira, 9 de dezembro de 2003 14:00 Para:

Re: ojb mixing up jdbc-connection-descriptors

2003-12-09 Thread Michael Mogley
Thanks Martin for the long and detailed reply! This seems to be exactly what I need. I was actually thinking of something similar last night as I lay in the sack. I'll try it and let you know. Michael - Original Message - From: Martin Kalén [EMAIL PROTECTED] To: OJB Users List [EMAIL

Bidirectional 1:1 Mapping

2003-12-09 Thread Gary
I am struggling with the following, and have not found any solutions on this forum (a few others with the issue, though). Any new ideas? I have a Person object; it contains child Address objects. The Address table entries have a foreign key back to the Person. I'd like the Person to have a

RE: How does ODMG work?

2003-12-09 Thread Jewett, Diane C
So does it mean that it is no different then: select * from Product -Original Message- From: Thomas Mahler [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 09, 2003 2:13 AM To: OJB Users List Subject: Re: How does ODMG work? Hi diane, Jewett, Diane C wrote: I'm going through

JDO Usage patterns? [was Re: JDO Bug (status please)]

2003-12-09 Thread Gus Heck
Well I have discovered that my feeling that casting to PersistenceCapable was wrong is correct. From page 60 of the jdo spec, regarding PersistenceCapable NOTE: This interface is not intended to be used by application programmers. It is for use only by implementations. Applications should use

Re: JDK 1.4 dependency in SqlTypeHelper.java

2003-12-09 Thread Armin Waibel
Hi Gerhard, Gerhard Grosse wrote: Hi all, I just checked out CVS Head and I'm getting compile errors in org.apache.ojb.broker.util.SqlTypeHelper.java: The methods CallableStatement.getType(int) are present only since JDK 1.4. I hope this does not mean that OJB is dropping JDK 1.3 support? Are

Re: JDO Usage patterns? [was Re: JDO Bug (status please)]

2003-12-09 Thread Brian McCallister
On Dec 9, 2003, at 2:04 PM, Gus Heck wrote: Well I have discovered that my feeling that casting to PersistenceCapable was wrong is correct. I prefer the term evil for this part of the spec ;-) (sorry Matt) -Brian - To

Re: JDO Usage patterns? [was Re: JDO Bug (status please)]

2003-12-09 Thread Brian McCallister
I call the requirement that any persistent class implement PersistenceCapable an evil part of the spec for the SPI as it is completely unnecessary. If a vendor chooses to use bytecode enhancement/generation/etc they are welcome to, but to require it as part of the spec is just annoying and

[OT] JDO spec evil?

2003-12-09 Thread Gus Heck
Ah, I see your point now... playing devils advocate and straying off topic for a moment... devils-advocate They do need to specify something in the way of behavior. An iterface is the natural way, to do that in Java. Byte code enhancement or source generation is not required. As I understand