[jboss-user] [Beginner's Corner] - Re: EJB Persistence with JBoss 6 v2

Steve Dobson do-not-reply at jboss.com
Mon Mar 7 09:28:55 EST 2011


Steve Dobson [http://community.jboss.org/people/dobbo314] created the discussion

"Re: EJB Persistence with JBoss 6 v2"

To view the discussion, visit: http://community.jboss.org/message/591648#591648

--------------------------------------------------------------
Thanks Wolf-Dieter Fink.

That has fixed the problem.  I hadn't thought that although Emacs saw the XML as valid the DTD might have an order to the tags.  

I also had a problem with the MySQLInnoDialect not working because of a typo and I should have been using "MySQL5InnoDBDialect".

Just for anyone coming a long afterwards there is also two problems with the EJB file:

1). The setUUID(String newUUID) should, of course, be called "setIdentity(String new UUID)" or the parsing of the EJB will fail because hybernate will fail as it can't find a setter for the key.

2). The getUUID() method needs to be marked as "@Transient" so that hybernate doesn't try to map it to a database object.

But with these three little change my test EJB gets deployed and the table created in the database.  I'm now a happy bunny.

Many thanks
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/591648#591648]

Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110307/a4ee32c7/attachment.html 


More information about the jboss-user mailing list