Hi Gurus,
If I have a EB with say 15 persistent fields, how do I pass the data from
my SessionBean to it?
1. pass all the fields as individual arguments on the create method call
>> public BeanKey ejbCreate(String arg1, String arg2, String arg3..... ,
String arg15) throws CreateException
2. pass the fields as a String array
>> public BeanKey ejbCreate(String[ ] args) throws CreateException
3. use a "Bulk accessor" which would encapsulate all the Data elements:
>> public class BeanData
>> {
>> public String arg1;
>> public String arg2;
>> public String arg3;
>> ...
>> public String arg15;
>>
>> public BeanData(String arg1, String arg2, String arg3.... , String
arg15)
>> {
>> this.arg1 = arg1;
>> ...
>> this.arg15 = arg15;
>> }
>>}
Then my SessionBean can create a new instance of the BeanData object and
pass it accross to the EB.
Even if I use the Bulk accessor
a. should I use individual setter accessors to set data or should I
pass all the values in the constructor??
b. how should the BeanData object be packaged, should it belong to the
EntityBean component jar file or should it be placed on the
application-server's serverclasses directory?
c. If the same data is coming all the way from the JSP, should the JSP
also pass the data using the BeanData object to the SessionBean?
Anyone has any recommendations?
Regards
Mohit
===========================================================================
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".