Current CMP specs do not allow dynamic modification of entity bean metadata
(add/remove fields).  HOWEVER, you CAN mock this with BMP if you design your
BMP beans well enough.  And obviously your bean interface will only have
abstract getter/setter/finder (getValue/setValue/findValue) that takes
parameterized constraints.  Once again this is do-able, but require some
careful architecting.

Alternatively you can just use solely session beans and value-objects;  this
way you can change the metadata at any time.

Gene

-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of S. von Knellehekje
Sent: Monday, April 09, 2001 3:53 AM
To: [EMAIL PROTECTED]
Subject: How to allow easy addition of fields to a bean.


'Ello,

I'm writing some support software and want to use EJB and a 3-tier model,
because I think that the best option. I can't, however, figure out how to
allow the users of the software to add fields to the beans in the datalayer
without having them to rewrite my beans.

My first guess was to use extension of my databeans but that means chancing
the type of the variables used to store the home and remote interface's in
my 2nd tier (or doesn't it?) and rewriting the home interface because of the
return types of the create method and some of the findBy methods.

I think this is quite a common problem, but I can't seem to find anything on
how to solve it. Can anybody tell me how to tackle this or point me to some
possible solutions / resources?

Thanks a lot,

Sandigo.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to