Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

My Entity beans are not saved (stored) on data base

 
Neo tnt
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I work with Ejb2.1, oc4j et xdoctlet.
I have a problem with my entity beans CMP:

In this case my bean is created and i can manipulate it but it is not stored on data base.

if i look up for an id in the data base i got this exception



here is the file ejb-jar.xml



Thanks in advance.
 
Neo tnt
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is what it tries to do:

1) Create a bean
2) Find it by primary key
3) Find all beans of that type by primary key
4) Remove all beans of that type by primary key

Here's what happens:

1) Bean is created
2) Bean cannot be found by primary key
3) findAll() returns a Collection of size 0
4) Nothing to remove

Now, if I try to create the bean again, I get an
exception because it's already there. But I can't find
it. So, next step:

1) Is anything is the database?

Answer: no. No database entries have been made. The
database is 100% empty.

This leads me to the conclusion that Entity bean is in
cache but not in the database and that the finders are
looking in the database.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic