Sahuly, i like to use custom controls as the central place for my business logic. they, generally, aggregate calls to other controls.
this seems to have helped me in 2 ways: 1. i go through the process of deciding what part really belongs in the api (interface), and what part is more just an implementation decision. 2. testing just the business logic is very easy b/c i can mock out the other j2ee layers. i am not advocating this in all cases, pojos are still your friend, but when the business logic cuts across many layers, it seems to have worked well for me. my 2 cents... -scott -----Original Message----- From: Chad Schoettger [mailto:[EMAIL PROTECTED] Sent: Friday, January 26, 2007 10:06 AM To: Beehive Users Subject: Re: how to use reflect in beehive Hi Sahuly, Custom controls are simply controls created by a developer. For example, if you need to access several databases using several JDBC controls, you might choose to create your own custom control which contains both JDBC controls in order to hide that complexity from the user of the control. Typically custom controls are used to access system resources, such as databases, web services, etc. In the end its really up to the controls developer. The control bean and beaninfo classes are generated for a control at build time. The generated bean class acts as a proxy for the control implementation -- the bean is the class you are using from a control client . The beaninfo class is generated to allow for bean introspection by third party code (for example, an IDE which supports Beehive controls). This is a very high overview, but hopefully provides you with some assistance. - Chad On 1/25/07, sahuly <[EMAIL PROTECTED]> wrote: > > hi chad, > First of all i am not clear with the control concepts itself...what > is the exact purpose of customized control... > what is the exact need for that autogenerated bean and beaninfo class...In > the documentation it says like for reducing the J2EE complexity thats > accepted for EJBControl and also for JdbcControl..when we go for the normal > Customized Control...thanks in advance > > > > Chad Schoettger-2 wrote: > > > > Hi Sahuly, > > > > For each control there is a control bean generated at build time. You > > could do something like: > > > > @Control > > private UserControlBean userControl; > > > > Then you could use reflection to find and invoke a method on the bean. > > You can also use the java.beans.Introspector class to get the > > BeanInfo for the control bean for more in depth introspection. > > > > The generated control bean class will have all of the public methods > > defined by your control interface as well as getters and setters for > > property set elements, etc. > > > > Let me know if this answers your question, if not please provide a bit > > more detail on what you are trying to do. > > > > - Chad > > > > > > On 1/25/07, sahuly <[EMAIL PROTECTED]> wrote: > >> > >> public class Controller > >> extends PageFlowController { > >> > >> @Control > >> private UserControl userControl;---> i have to provide this interface > >> at > >> runtime i have to invoke the > >> methods using the reflectin package....not in this way(i.e) by using > >> invoke > >> and getMethods i dont know how to provide this so kindly post ur > >> suggestions.....the code here is partial only > >> > >> public Forward addUser(UserDTO userDTO) { > >> > >> userControl.addUser(userDTO) > >> } > >> -- > >> View this message in context: > >> http://www.nabble.com/how-to-use-reflect-in-beehive-tf3099470.html#a8603 637 > >> Sent from the Beehive - User mailing list archive at Nabble.com. > >> > >> > > > > > > -- > View this message in context: http://www.nabble.com/how-to-use-reflect-in-beehive-tf3099470.html#a8646 471 > Sent from the Beehive - User mailing list archive at Nabble.com. > > _______________________________________________________________________ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.
