Hi,
I would like to generate to generate SQL select statements for DB2 in a managed
environment (JBoss). All Select Statements should be extended by for read
only. I found that it is possible to hardcode this at
org.apache.ojb.broker.accesslayer.sql.SqlSelectStatement
at
buildStatement()
Hi,
I would like to generate to generate SQL select statements for DB2 in a
managed environment (JBoss). All Select Statements should be extended by
for read only. I found that it is possible to hardcode this at
org.apache.ojb.broker.accesslayer.sql.SqlSelectStatement
at
should
resolve 'key' to 'A0.key' amd 'otherfield' to 'A1.otherfield'.
what version of ojb are you using ? inverse-foreignkeyfield-id-ref looks
rather old to me ?
jakob
Guido Beutler schrieb:
Hi Jakob,
here is a sample, I can not post the original code, sorry.
what I am doing I now
Hi Jakob,
here is a sample, I can not post the original code, sorry.
what I am doing I now:
crit.addEqualTo(key,new Integer(5));
crit.addEqualTo(table_b.otherfield,new Integer(10));
The problem now is, that key is a column in both table but the query,which is
build by OJB, adds select ...
Hi,
I have a problem building query about more than one table when the field in a
where clause with OJB 1.0.4
occur in more than one table with the same name.
In SQL the following would work:
select * from table_a A0, table_b A1 where A0.key=A1.key and A0.key=5 ;
OJB builds a query where A0
Hi,
I am using OJB 1.0.4 inside of jboss 3.2.5.
I updated from OJB 1.0.0 to 0.4 .
Now I am running is a strange problem which did not occur in 1.0.0.
When I update a object the primary key field is null after the store although
the update is executed and succeed.
The update sql statement is
Hello,
I would like to copy complex objects from schema A to schema B.
This would run in a managed environment (JBoss EJB Server)
The schema is configured at the XML Mapping, can I change this during runtime
like
1) read data from schema A
2) change schema
3) store the same objects to schema B
Hi,
please forget all I wrote :)
I had a error at the definition of the pk of A. A second row was defined
as primary key too.
I think that I ran in this problem during my tests. This maybe why the
autoload was working
when I started. With the invalid pk definition the test case wouldn't
Hi,
I've got a strange problem when using sequences wir OJB 1.0.0.
In some cases different applications get the same PK value but both are
using the
same sequence. Does OJB increment the sequence value before use?
I configured the sequence at ojb as followed :
sequence-manager
Hi,
I use OJB 1.0.0 inside of JBoss 3.2.3.
how to handle the following condition:
First I try to insert a row. This fails because of one required field
wasn't filled and the transaction is rolled back.
After that I try to insert the same row again, this time with correct
data. OJB then generates
Hi,
I had the same problem with jboss 3.2.2 and different OJB versions.
The problem was solved at jboss 3.2.3. Armin may remember or long mail
threads. :-)
I haven't updated to 3.2.5 yet but for me it sounds as if the same problem
occurs there again. Could you make a quick check with 3.2.3 ?
best
TxConnectionManager...bla, bla
Reached the line count for a do my best answer ;-)
regards,
Armin
Guido Beutler wrote:
Hello,
I've got a strange problem with RC6 at JBoss 3.2.3.
I've got a statefull and a stateless session bean. The stateless
session bean contains all OJB stuff.
The statefull facade
changes or do you want to start this
refactoring by your own?
Of course I'm willing to test a fix.
I'm currently a litte bit bussy too so impementing a fix on our own
maybe difficult but I'll check it.
thanks for the help and best regards,
Guido
regards,
Armin
Guido Beutler wrote:
Hi Armin
Hello,
I've got a strange problem with RC6 at JBoss 3.2.3.
I've got a statefull and a stateless session bean. The stateless session
bean contains all OJB stuff.
The statefull facade accesses some tables via JDBC directly.
That stateless session OJB bean has transaction attribute RequiresNew.
Hi Armin,
Armin Waibel wrote:
Hi,
Guido Beutler wrote:
NextValImpl is ok for me. There is a database sequence at the pk
column which caused my problem.
After setting the readonly attribute for the primary key column at
the repository everything worked fine.
hmm, this shouldn't work. If you
Hi Tom,
Thomas Dudziak wrote:
On Tue, 6 Apr 2004, Guido Beutler wrote:
Hi Armin,
Armin Waibel wrote:
Hi,
Guido Beutler wrote:
NextValImpl is ok for me. There is a database sequence at the pk
column which caused my problem.
After setting the readonly attribute for the primary
Hi,
I use OJB RC6 and DB2. I want to insert a abject into a table with a
sequence.
I took the settings from documentation and added to database.xml :
sequence-manager
className=org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl
attribute attribute-name=autoNaming
Hi Tom,
Thomas Dudziak wrote:
On Mon, 5 Apr 2004, Guido Beutler wrote:
Hi,
I use OJB RC6 and DB2. I want to insert a abject into a table with a
sequence.
I took the settings from documentation and added to database.xml :
sequence-manager
className
Hello,
i've got a small howto question.
I use PB API of OJB RC6 inside of JBoss 3.2.3 with DB2.
There are applications which directly access the same data without usng
OJB or ejb.
My problem now is that I would like to lock some (not all) objects
imediately.
Normaly I use read uncommited but at
Hello,
i've got a small howto question.
I use PB API of OJB RC6 inside of JBoss 3.2.3 with DB2.
There are applications which directly access the same data without usng
OJB or ejb.
My problem now is that I would like to lock some (not all) objects
imediately.
Normaly I use read uncommited but at
Sorry wrong header
Guido Beutler wrote:
Hello,
i've got a small howto question.
I use PB API of OJB RC6 inside of JBoss 3.2.3 with DB2.
There are applications which directly access the same data without
usng OJB or ejb.
My problem now is that I would like to lock some (not all) objects
Hi Armin,
works great. Thanks very much :-)
As you could see from my mail I started moving from primitives to objects.
Your performance argument for 1:n is a very strong one.
The null value problem was a side effect of my work.
best regards,
Guido
Armin Waibel wrote:
Hi Guido,
Guido Beutler
Hi Armin,
Armin Waibel wrote:
Hi again,
all ejb-example tests pass (odmg- and PB-Tests) on JBoss 3.2.2 and
MaxDB. Maybe I forget to write a test for object update ;-).
Do you remember our DataSource problem with 3.2.2.RC3 with missing results?
Maybe that the behavior is different to JBoss
Hi again,
Guido Beutler wrote:
Hi Armin,
Armin Waibel wrote:
Hi again,
all ejb-example tests pass (odmg- and PB-Tests) on JBoss 3.2.2 and
MaxDB. Maybe I forget to write a test for object update ;-).
Do you remember our DataSource problem with 3.2.2.RC3 with missing
results?
Maybe
Armin Waibel wrote:
do you use anonymous keys? If so where?
Do you remember our DataSource problem with 3.2.2.RC3 with missing
results?
No, can you describe this problem again? Should I update to JBoss
3.2.3 and run the tests again?
we had the problem, that not all objects were returned by
Guido Beutler wrote:
Armin Waibel wrote:
do you use anonymous keys? If so where?
Do you remember our DataSource problem with 3.2.2.RC3 with missing
results?
No, can you describe this problem again? Should I update to JBoss
3.2.3 and run the tests again?
we had the problem, that not all
some small tests and can not be sure that this don't produce
some side effects.
If my fix is correct, updates never worked for objects with 0 values at
primary key fields.
best regards,
Guido
Guido Beutler wrote:
Guido Beutler wrote:
Armin Waibel wrote:
do you use anonymous keys? If so
be a update if
already exists. This change, as far as I can see, will not change the
current behaviour of OJB, right?
Would work, but I still don't understand why not using conversion.
best regards,
Guido
Just my 2 cents,
Edson Richter
Armin Waibel wrote:
Guido Beutler wrote:
Hi,
changing
Armin Waibel wrote:
Guido Beutler wrote:
Hi,
changing
public boolean representsNull(FieldDescriptor fld, Object aValue)
{
.
if(((aValue instanceof Number) (((Number)
aValue).longValue() == 0)))
{
result =
fld.getPersistentField().getType().isPrimitive
Hello,
I updated from RC5 to RC6. I am using OJB inside of JBoss 3.2.3 with DB2 V8.
Since update to RC6 OJB generates a insert for every stored object when
using PB API.
OJB seems not to check if the object exists at database. If the object
already exist,
a SQL Exception is thrown. (-803 which
Armin Waibel wrote:
Hi Guido,
Guido Beutler wrote:
Hello,
I updated from RC5 to RC6. I am using OJB inside of JBoss 3.2.3 with
DB2 V8.
Since update to RC6 OJB generates a insert for every stored object
when using PB API.
OJB seems not to check if the object exists at database
Hi,
I've got a small problem.
I have a table with many columns. I would like to select only the
primary key field with a complex select first.
It's like a candidate list. From that I can find the correct value
(independen from the database).
For the correct value I would like to receive all
wrote:
hi guido,
use a report-query to retrieve the pks only.
hth
jakob
Guido Beutler wrote:
Hi,
I've got a small problem.
I have a table with many columns. I would like to select only the
primary key field with a complex select first.
It's like a candidate list. From that I can find the correct
, QueryByCriteria aQuery)
{
aQuery.getCriteria().addEqualTo(field,value);
return aQuery;
}
The value should change dynamically. Could somebody give me a
aditional hint?
best regards,
Guido
Jakob Braeuchi wrote:
hi guido,
please have a look at the query customizer.
jakob
Guido Beutler
Hello,
This is a repost with a better subject, hoping to get a hint.
I build a custom QueryCustomizer implementation to restrict the
retrieved values of a collection to a known primary key.
I saw that I could add attributes at the deployment descriptor but the
value of the
primary key changes
detailed.
best regards,
Guido
-Brian
On Fri, 2003-12-19 at 10:09, Guido Beutler wrote:
Hello,
This is a repost with a better subject, hoping to get a hint.
I build a custom QueryCustomizer implementation to restrict the
retrieved values of a collection to a known primary key.
I saw that I
thinking about this one.
Any chance you can post specifics?
Does value need to change while running, or is it just dependent upon
something at load time?
-Brian
On Fri, 2003-12-19 at 10:09, Guido Beutler wrote:
Hello,
This is a repost with a better subject, hoping to get a hint.
I build a custom
Hi,
Lance Eason wrote:
It's entirely possible to do this, but in general I think it's a bad design *to* do it.
I never said that it is the best way to do it. :-)
Collection descriptors are used to model relationships, not arbitrary dynamic queries. The role of query customizers is to allow
best regards,
Guido
Daniel.
- Original Message -
From: Guido Beutler [EMAIL PROTECTED]
To: OJB Users List [EMAIL PROTECTED]
Sent: Friday, December 19, 2003 4:07 PM
Subject: Re: How to pass dynamic attribute values to
QueryCustomizerImplementations
Hello,
for a more detailed
Hello,
I had some stange values aut objects since updated to RC5.
After some debuging I found out that I got illegal values at attributes
which does not match with the database. For example I got a attribute
at tahe object with the value 15 where a 0 is stored at the corresponding
database row.
Hello,
I've got a 1:N mapping between classes. I would like to restrict the
entries at the retrieved collection.
I got two Classes A and B with a 1:n mapping between it. B has 17000
entries so I would like
to restrict the collection to a small set of B's by using the primary
key of B.
By
problem.
best regards,
Guido
Armin Waibel wrote:
Hi Guido,
On Thu, 09 Oct 2003 15:17:24 +0200, Guido Beutler
[EMAIL PROTECTED] wrote:
Hi Armin,
just to keep the problem clear:
If I run my standalone tescase (without any jboss around it) and set
eager-release to true the problem occours too!
Only
Waibel wrote:
Hi Guido,
On Wed, 08 Oct 2003 18:17:21 +0200, Guido Beutler
[EMAIL PROTECTED] wrote:
Hi Armin,
took some time but I was able to build the testcase.
snip :-)
great!
...
If I run the standalone testcase with eager-release=true
the test fails. Only one object is selected.
If I set
Hi Armin,
first thanks for your support !!
Armin Waibel wrote:
Hi Guido,
sorry for the late reply!
On Mon, 06 Oct 2003 09:37:26 +0200, Guido Beutler
[EMAIL PROTECTED] wrote:
Hi again,
because I did not get any reply for my postings I'm trying to get
some information.
What mean side
Hi Armin,
took some time but I was able to build the testcase.
snip :-)
Why not all objects are selected and why without throwing any
exception?
Is there a workaround (instead of making a lot of primary key selects)?
as I said in my previous post this can be a side-effect
of eager-release,
,
Armin
- Original Message -
From: Guido Beutler [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 01, 2003 3:27 PM
Subject: Re: OJB RC4 does not select all objects?
Hi,,
I tried a workaround and select all A by a loop with direct primary
key
access like:
select
)
at java.lang.reflect.Method.invoke(Method.java:324)
What's that??
Seems that OJB creates a connection instead using the data source?
best regards,
Guido
Guido Beutler wrote:
Hi Armin, :-)
yes I'm using eager-release = 'true'
with 'false' my connection pool die's when running under load :-(
I'll try 'false' just
Message
Subject:OJB RC4 does not select all objects?
Date: Wed, 01 Oct 2003 14:20:15 +0200
From: Guido Beutler [EMAIL PROTECTED]
To: OJB Users List [EMAIL PROTECTED]
Hello,
I've got a strange problem. I have two Tables A and B with corresponding
classes.
B has a foreign key
Hello,
I've got a strange problem. I have two Tables A and B with corresponding
classes.
B has a foreign key to A and so I have a 1:N between A and B.
A has a reference-descriptor to B and
B has a collection-descriptor to A.
If I try to select all instances of A i only get a few entries
Hello,
I've got a strange problem. I have two Tables A and B with corresponding
classes.
B has a foreign key to A and so I have a 1:N between A and B.
A has a reference-descriptor to B and
B has a collection-descriptor to A.
If I try to select all instances of A i only get a few entries
,
this can be a side-effect of the eager-release
attribute when set 'true'.
Did you tried to run your test with 'false'?
Or is your test successful in standalone OJB?
regards,
Armin
- Original Message -
From: Guido Beutler [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 01
)
at java.lang.reflect.Method.invoke(Method.java:324)
What's that??
Seems that OJB creates a connection instead using the data source?
best regards,
Guido
Guido Beutler wrote:
Hi Armin, :-)
yes I'm using eager-release = 'true'
with 'false' my connection pool die's when running under load
.
regards,
Armin
- Original Message -
From: Guido Beutler [EMAIL PROTECTED]
To: OJB Users List [EMAIL PROTECTED]
Sent: Monday, September 15, 2003 1:13 PM
Subject: Re: query before commit problem
Hi,
how to do it in managed enviroment?
transaction.checkpoint()
throws a not supported
Hi Charles,
Charles Anthony wrote:
Hi,
Someone asked for this recently, and I'm afraid I was too busy to reply.
No problem :-)
When you lock an object (for update), it is *before* you make any changes to
it. How can OJB know when to automatically flush changes to the database ?
It can't; you
Hi,
how to do it in managed enviroment?
transaction.checkpoint()
throws a not supported exception.
best regards,
Guido
Jair da Silva Ferreira JĂșnior wrote:
Hi,
Thank you Thomas and Charles for your fast answers. I think I'll use
transaction.checkpoint() as Charles pointed.
By the way,
Hello,
I'm using OJB 1.0 rc4 inside of jboss3.2.2rc3 and db2.
OJB is running into self generated deadlocks if I access ojb with
concurrent ejb clients when using SequenceManagerNextValImpl
As a workaround I use SequenceManagerInMemoryImpl but I think this won't
work with sequences.
If ojb could
Hi Armin,
Armin Waibel wrote:
Hi Guido,
Hello,
I'm using OJB 1.0 rc4 inside of jboss3.2.2rc3 and db2.
OJB is running into self generated deadlocks if I access ojb with
concurrent ejb clients when using SequenceManagerNextValImpl
As a workaround I use SequenceManagerInMemoryImpl but I think
Hello Alex,
I tried your fix after I debugged into the same problem.
My problem is, that I can invalidate the objects but after that there
still no update is executed after next access
although ojb tells me:
[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] DEBUG:
executeUpdate :[EMAIL
Hi,
I've got a problem during update of objects inside of jboss. I'm using
ojb rc4 and jboss-3.2.2RC3.
My code looks like:
Transaction tx= _impl.currentTransaction();
tx.lock(obj, Transaction.WRITE);
First time the object is inserted.
Then I change a attribute of the object and
Hi,
- Original Message -
From: Farnea Massimiliano [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 06, 2003 12:58 PM
Subject: NEWBIE: cannot update object with ODMG
I'm testing the ODMG layer with this example:
/**
* Update the Traente instance on the database
Hi,
I ran into the same problem. Is there a solution avail?
cheers,
Guido
- Original Message -
From: Ashraf Moosa [EMAIL PROTECTED]
To: OJB Users List [EMAIL PROTECTED]
Sent: Tuesday, February 18, 2003 10:09 AM
Subject: OJB 0.99 writing to the database in jboss! Please help
Hi,
I
Hi,
I'm searching a strange error with the JBoss 3.0.4 TX layer and OJB.
The applcation is working for a while and 'suddenly' JBoss throws a
EJBException (see below).
I'm not realy sure that this has to do with OJB, so I would like to know if
anybody
has seen this before.
thanks, cheers,
Guido
Hi,
during storing an object I get following exception.
I use OJB 0.9.8 and DB2 V7.2 with app driver.
Any Idea whats going on?
cheers,
Guido
13:38:35,082 INFO [STDOUT] [org.apache.ojb.odmg.OJBJ2EE_2] INFO:
13:38:35,083 INFO [STDOUT] beginInternTransaction was called
13:38:35,150 INFO
the Database (JDBC Connect) should be
open already.
I wasn't able t find a sample, so maybe that everything is all right, I'm
just not sure about that.
If it is all right, why do I have to give the name of the repository.xml
every time?
thanks, cheers,
Guido Beutler
64 matches
Mail list logo