Do you have the transactions set for you entity bean - in ejb-jar.xml?
Make sure you have a trans-attribute Required set:
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>SampleEntity</ejb-name>
...
...
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>SampleEntity</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 30, 2001 8:20 AM
> To: [EMAIL PROTECTED]
> Subject: [JBoss-user] GOING INSANE: CMP and PostgreSQL
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Here's the story:
>
> CMP Entity beans deploy fine, PostgreSQL connection pool
> connects fine, Session beans deploy fine. All works fine EXCEPT!!!
>
> My bean clients can successfully create, make remote calls
> to, and modify. excellent. NO EXCEPTIONS!
>
> HERE'S THE PROBLEM!!!!
>
> NOTHING IS STORED IN THE DATABASE!
>
> So, thinking I am just losing my mind, I run the client a
> second time, this time doing findByPrimaryKeys on the entity
> beans. THEY ALL FIND FINE!!! So, I run over to psql and
> connect to the database, NOTHING THERE! SAME DATABASE NAME,
> SAME USER, SAME PASSWORD, NO DATA! DataSources are correct
> as far as I can tell, straight outta the manual. I know it
> is the right database 'cause it is the only machine, only one
> postmaster running, and only one user with one database and
> it matches EXACTLY in the jboss.jcml. I even have the '-i'
> option on in the postmaster startup scripts.
>
> Hmmm.... I do a kill jboss. Check the database... nothing
> there... Startup jboss, run the findByPrimaryKey again... NO
> BEAN! do a create()... creates fine...check pgsql NO DATA!
> ... do a findByPrimaryKey()... FINDS THE BEAN I CREATED EVEN
> THOUGH NO DATA EXISTS IN THE DATABASE! So, I extract all
> the data from the bean to make sure it is correct... yep,
> everything is there, just like I coded. I wonder how it
> could get there without being persisted (yes, my ejb-jar.xml
> is correct, all cmp fields are there). I would think an
> exception should be thrown somewhere along the line if I
> create a bean and it isn't stored in the database when it should be.
>
> Stared at the problem for seven hours straight... blew away
> entire JBoss installation and started from scratch...
> twice... same problem. Nothing in documentation or mail
> archives suggesting how to actually store data into the
> database when it isn't working "in the real world."
>
>
> Ok, can someone please tell me which
> <magic-freakin-xml-element>turns on ACTUAL DATABASE WRITES
> AND NOT JUST A TEASE!</magic-freakin-xml-element>
>
> There HAS TO BE something I am missing.
>
> I'll buy the first person who answers this correctly a pizza.
> I'm not kidding.
>
> - - - -
> [EMAIL PROTECTED]
> F46A 36F7 3E52 132A 72C5 8628 784A 0877 4D98 27BE
> http://www.sicore.org/publicKeys/damon.txt
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.4 (GNU/Linux)
> Comment: To iterate is human. Recurse, divine.
>
> iEYEARECAAYFAjsUkP0ACgkQeEoId02YJ76BZwCgjTgNQxIzVzZVvdzi41hjIttg
> wGYAoOozwj1MrzuXVjBO05OWlbDJeXGt
> =dwqi
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
