I developed cmp bean using jdeveloper and using Mysql at backend
Deployed in jboss-3.2.6
I deployed it correctly
I am able to store and load data properly
everything is working perfectly
I am using mysql-front for viewing data in my database
But i am not able to see any of the data in the database
All fields in all tables are null...
Why is it so?
When i add data into tables using mysql-front the values are not refelected in ejb...
Eg:
If i create customer from ejb it is not seen in tables in mysql using mysql-front
If i add data into customer table ,when i call findAll() method ,the value previusly added is not returned...
Pl need in some input and info
Thanx in advance....
-
I cannot see the data Stored.... (4 messages)
- Posted by: Sanket Raut
- Posted on: March 15 2005 06:08 EST
Threaded Messages (4)
- I cannot see the data Stored.... by Zhong ZHENG on March 15 2005 18:45 EST
- I cannot see the data Stored.... by Sanket Raut on March 16 2005 00:29 EST
-
I cannot see the data Stored.... by Zhong ZHENG on March 16 2005 04:03 EST
- I cannot see the data Stored.... by Bhushan Dravid on July 06 2005 02:10 EDT
-
I cannot see the data Stored.... by Zhong ZHENG on March 16 2005 04:03 EST
- I cannot see the data Stored.... by Sanket Raut on March 16 2005 00:29 EST
-
I cannot see the data Stored....[ Go to top ]
- Posted by: Zhong ZHENG
- Posted on: March 15 2005 18:45 EST
- in response to Sanket Raut
Data are stored and loaded automatically by EJB Container. So it is up to the container to decide when to do the work. For performance reason, EJB container may decide to buffer the data in memory and insert them into database later, when necessary. That's why you may not be able to see the data directly. So don't worry. ;-)
I encountered the same problem when using JONAS. After launching the test client (which worked correctly), i couldn't see the data populated in the database. But after undeploying my EJBs, data were inserted.
You may wait for a while (one hour or two, the time depends on your app server), until container decides to passivate your entity beans. Then check your mysql and i think you will be satisfied.
Regards.
ZHENG -
I cannot see the data Stored....[ Go to top ]
- Posted by: Sanket Raut
- Posted on: March 16 2005 00:29 EST
- in response to Zhong ZHENG
Hey thanx for ur reply....
This is the first reply i got on tss....:-)
I am so happy :-)
Actually i deployed my ejb's 2 days back and still not able to see the data....
I even undeployed the ejb's....
But still the problem persists...
Actually i added sop in ejbLoad() ,ejbStore(),ejbActivate() and ejbPassivate() methods to see the lifecycle of the bean....
I could see ejbStore() being called for nearly 20
times...
If ejbStore() is called that means the data must be updated in database.....
Its been a long time since i deployed my beans....
The life is not as easy as it seems ,in ejb ,after all ;-)
Enjoy EJB -
I cannot see the data Stored....[ Go to top ]
- Posted by: Zhong ZHENG
- Posted on: March 16 2005 04:03 EST
- in response to Sanket Raut
Hi,
If you were able to store and load data properly, and ejbStore() was called (nearly 20 times), data must be populated somewhere... So check the configuration file of JBoss, maybe JBoss was using hypersonic, or another database in mySQL, or another table...
In ejb, the life is not as easy as it seems. I agree with you ;-)
Regards
heavyz -
I cannot see the data Stored....[ Go to top ]
- Posted by: Bhushan Dravid
- Posted on: July 06 2005 02:10 EDT
- in response to Zhong ZHENG
Hi ,
I am facing the same problem (using CMP beans), actually JBoss 3.2.6 doesn't store the data back to database untill the transaction is over..
But what if i want that same data in the current transaction..
The work around that I got was to call the
findByPrimaryKey() method so as to get the latest version of Entity Bean. This worked fine in Jboss 3.2.3 , but as I am migrating to Jboss 3.2.6 this solution doesn't work..
Can anyone suggest me the solution to this...
Any help would be really appreciable...
Thanks in advance..
email: bhushandravid@gmail.com