Dynamic altering of an EJB


EJB design: Dynamic altering of an EJB

  1. Dynamic altering of an EJB (2 messages)

    Hi EJB design gurus,

    I have the following EJB design problem. I have database tables wrapped into EJBs that can be altered during runtime, i.e. new columns might be added. I can, of course, add columns by simply executing 'ALTER TABLE' statement on the database, then correct my EJBs manually, but I need this process to be automatic. Is there any way to do that?

    Thanks a lot in advance.
  2. Dynamic altering of an EJB[ Go to top ]

    That's a bad concept , using ALTER TABLE to dinamically modify structure at runtime.

    So , while technically you can implkement EJB or any pther database related objects that discover database structure dinamically , I think you should rethink your design.

  3. Are you using BMP EJB? Then it should be just a matter of altering your INSERT statements. If you build your INSERT's and UPDATES from External Property files, you get some flexibility.

    But as Costin mentioned, it's not correct to have Dynamically Altered Table structures for a Good Design. Reconsider having additional table(s) that represent changed data structures as Rows.