I have a need for two separate CMP EJBs, each pointing to a different tables. The tables have IDENTICAL definitions, so all key fields, attributes, etc are identical.
In addition, within code, I need to reference either one or the other, based on input parameters, and the number of operations is substantial ( 20 or more attribute calls. At present, I determine which Home, Remote and Key class to refernce based on the input parameter, then (cast) each remote reference call Object HomeBean = null; Object BeanKey = null; Object RemoteBean = null; if (standard) { // HomeBean = get Standard Bean Home // BeanKey = get Standard Bean Key // RemoteBean = get Standard Bean Remote } else { // HomeBean = get NonStandard Bean Home // BeanKey = get NonStandard Bean Key // RemoteBean = get NonStandard Bean Remote } // typical business call, repeated numerous times..... if ( standard ) { (StandardBean)RemoteBean.someMethodCall(); } else { (NonStandardBean)RemoteBean.someMethodCall(); } Obviously, this is a lot of casting, as well as extra code, which is error prone. I'd like to build "Base" Home, Remote, Bean and Key classes then implement them. I'm using WSAD 4.0.3, don't see an obvious way to do this. Any suggestions? =========================================================================== 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".