Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

EJB does not update table

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I'm using EJB 2.1 on a JBoss 4.0.2 and XDoclet for interface generation. I need to add some new persistent fields to an entity bean that contains a primary key field and some persistent fields like:



I then added new persistent fields like this:


This code compiles fine and the descriptor is updated by XDoclet but the database table ist not.

Is there any way to update the database table at deployment time?

Thanks!
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not that this really helps you, but with Hibernate and the configuration file you could update the table at deployment time, but I don't think you can do the same with EJBs. I think you will have to update the table yourself before you deploy.

Mark
 
Fridolin Egger
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply Mark. But no, it does not help. I personally in general prefer hibernate and other lightweight technologies. But in this case I'm stuck with the EJB 2.1 architecture.

Is there really no way to update a table at deployment time? XDoclet? Some script maybe?
 
Rototillers convert rich soil into dirt. Please note that this tiny ad is not a rototiller:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic