On Sat, Nov 10, 2001 at 06:33:01PM +0100, Falko Braeutigam wrote:
> On Sat, 10 Nov 2001, Jozsa Kristof wrote:
> > Hi,
> > 
> >   I've built my first custom CMP entity bean (for a sample Personlist-like
> > example), heavily based on the provided CD-CDCollection app (although I did
> > not used a session bean, I operate on the entity bean from the client
> > directly)
> > 
> >   The application deployed into JBoss without any problems. The logs say my
> > Bean has been verified and deployed successfully, however, when I try to use
> > the bean from the client; I get a Java trace with the meaning, that not even
> > the sql table for the bean exists.
> > 
> >   I've checked through the logs (I've installed p6spy), and I see that at
> > deploy-time, the right sql statements are going to execute (CREATE TABLE
> > ..), however, in Hypersonic's default.script file, I see that immediately
> > ttwo ROLLBACKs had been done. 
> > 
> >   The question is now, if my entity bean tries to implement itself on the
> > right way, what or who executes that rollbacks on its sql statements? I've
> > checked the CDCollection example throughoutly, but couldn't find any
> > explicit COMMIT-like statements in it..
> 
> your entity beans probably have transaction SUPPORTS or another type that
> doesn't start a transaction. So the changes to the beans do not reflected in
> the db. This example from where you got the code probably works because the
> sessions (that you are not using) have transaction REQUIRED (or similar). Which
> causes a new tx to start, which is then propagated to the entity beans.
> Well, just an idea. good luck.

Thanks much for your ideas. I've wrote a session bean to handle the entity
bean, but the situation remained the same. I went back to the CDCollection
bean example, and found out, that if I remove its table manually (I used
Squirrel SQL), it's unable to recreate it again, so there's something
serious going on. 

A fresh install of JBoss config files from the tarball cleared up the
problem - both the cdcollection example and my own beans are working exactly
as they should. I know this is not the preferred way of solving the problem,
but I was really tweaking too much with the JBoss database configs, and as a
newbie, it was easier to fallback to the default config, than finding my
errors, which caused all the sql statements rollbacking immediately. Anyway,
I've saved my old config for future investigation :)

Thanks,
Christopher
-- 
.Digital.Yearning.for.Networked.Assassination.and.Xenocide

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to