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
buildSta
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()
_a. in this case ojb 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 c
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 an
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 exe
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
Is
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
succee
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 :
Is this correct? Thanks i
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 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 r
Hi,
does RC7 contains the JBoss transaction fix Armin build for me?
The problem was to return the JDBC Connection earlyer to avoid
"returning unknown connection" exceptions
best regards,
Guido
-
To unsubscribe, e-mail: [EMAIL PROTE
u willing to test my 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,
A
seems that the used connection
is not vaild in jboss 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 sessi
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.
The
Hi Armin,
Armin Waibel wrote:
Hi,
Thomas Dudziak wrote:
On Tue, 6 Apr 2004, Guido Beutler wrote:
Can I choose the sequence implementation per class?
There are only a few tables which uses DB sequences. For all other
tables the NextValImpl is ok.
The problem is that only a few tables use DB
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 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. I
regards,
Armin
Thomas Dudziak wrote:
On Mon, 5 Apr 2004, Guido Beutler wrote:
Hi Tom,
Readonly was a usefull hint. I removed the sequence name at the
class descriptor and added a
readonly attribute. I still use nextVal sequence manager. This now
works for me.
Thanks !!
I'm not sure t
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 :
and at the class descriptor :
primarykey="
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 :
and at the class descriptor :
primarykey="true"
autoincrement="true"
sequence-name="TEST_SEQUENCE"
OJB still tries to
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) ob
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
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
Hello,
I set the auto-retrieve attribute at repository to false for a 1:1
relationship.
I need the reference for a query but in most cases I do not want to read
the referenced object.
After reading a instance I tried to store the same unmodified object again.
I run into a SQL error during the u
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().getT
's a new record being inserted. If false, assume that
it's a 0 since there is no NULLs in PKs, and should 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
like Armin should take a look on it. ;-)
I just made 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:
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,
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
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 that the
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 3.2.
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. If the
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
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 t
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 data
Hello,
I'm using ojb rc5 with mysql 4.0.18 under linux.
OJB runs inside of a jboss-3.2.3.
I have a sample table :
create table a (
id int not null,
ref char(3) not null references b,
primary key (id,ref)
)
create table b (
ref char(3) not null,
primary key (ref)
);
at the corresponding class I hav
Daniel Perry wrote:
I completely agree with it being bad design. However, I am using OJB in
struts applications. Lets take the example i gave before. The struts
action would simply load a collection of managers from OJB, and put them
into the request scope. The action would forward to a JSP.
d employee.status=$2"
but it didnt work.
Yes won't works see: http://db.apache.org/ojb/status.html
best regards,
Guido
Daniel.
- Original Message -
From: "Guido Beutler" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Friday
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 y
to
QueryCustomizerImplementations
Saw your original message and am 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,
T
a argument with my
pk value. After that OJB calls the customizeQuery method and again
it looks like there is no way to get my key in there.
Hope this is more readable and a bit more detailed.
best regards,
Guido
-Brian
On Fri, 2003-12-19 at 10:09, Guido Beutler wrote:
Hello,
This is a repost wit
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 d
, 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 q
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 usin
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.
Th
ence for the current 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 tr
ido
Armin 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
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,
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
?
Or is your test successful in standalone OJB?
regards,
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 work
7;?
best regards,
Guido
Armin Waibel wrote:
Hi Guido,
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: "Gui
)
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 run
pl.java:25)
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 conne
7;?
best regards,
Guido
Armin Waibel wrote:
Hi Guido,
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: "Gui
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 instea
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 instea
- Original 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 corresp
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; yo
nection/tx.
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 enviromen
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,
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 t
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
Hello,
I'm running OJB RC4 inside of JBoss 3.2.2RC3.
I always use ODMG interface.
I've got a scenario where I insert data with and select them within the
same transaction context again.
OJB does not find the inserted data, because the inserts are done when
the complete transaction is
committed.
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 PROTECTE
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,
did you trie 0.9.8 ?
I got the same problem with 0.9.9 and 1.0.rc1 and JBoss 3.0.4. with DB/2.
0.9.8 is working well for me.
cheers,
Guido
- Original Message -
From: "Thomas Phan" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>; "Armin Waibel"
<[EMAIL PROTECTED]>
Sent:
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
Hi,
I posted another mail for the same problem a few days ago but did not get
ant reply.
OBJ 0.9.9 doesnt write to my DB2 database inside JBoss 0.9.0.4.
0.9.8 does (with the same JBoss).
The deployment description at the web doesn't match with
the 0.9.9 source code :
JTATransactionManagerClass=or
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
: "Armin Waibel" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Monday, February 24, 2003 4:20 PM
Subject: Fw: OJB Connection pooling problem inside JBOSS
>
> - Original Message -
> From: "Armin Waibel" <[EMAIL PROTEC
sage -----
From: "Guido Beutler" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>; "Armin Waibel"
<[EMAIL PROTECTED]>
Sent: Monday, February 24, 2003 3:27 PM
Subject: Re: OJB Connection pooling problem inside JBOSS
> Hi,
>
> no I
" <[EMAIL PROTECTED]>
Sent: Monday, February 24, 2003 3:26 PM
Subject: Re: OJB Connection pooling problem inside JBOSS
> Hi Guido,
>
> do you set 'eager-release=true' in jdbc-connection-descriptor
> when running within jboss?
>
> regards,
> Armin
>
&
Hi,
I'm using OJB inside a stateless session bean. After some time my
application thows:
15:01:43,979 ERROR [STDERR] Caused by: javax.resource.ResourceException: No
ManagedConnections Available!
15:01:43,979 ERROR [STDERR] at
org.jboss.resource.connectionmanager.InternalManagedConnectionPool.get
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 [STDOUT
DataService inside so 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"
Hi,
thanks!!
I will try this in a few minutes. I got some questions:
I found another sample, which adds OJB as MBEAN at the jboss-service.xml
Your sample seems not to use this. How can I access the OJB stuff inside my
EJB's ? JNDI lookup wont't work or am I wrong?
The documentation uses a jakart
Hi,
I am triying to deploy OJB as a data service with JBoss. I would like to
access the ODMG (or JDO if stable) Interface.
I found some samples at the mailing list but they look different to me.
I tried to add OJB as MBean at jboss-service.xml and put
the OJB jar file to my server/default/lib dire
81 matches
Mail list logo