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
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
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);
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.
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
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
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
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
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
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,
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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?
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
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
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,
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
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
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
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
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:
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
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
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
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
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
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
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
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
44 matches
Mail list logo