beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Symmank" <>
Subject RE: how to use reflect in beehive
Date Fri, 26 Jan 2007 17:20:11 GMT

i like to use custom controls as the central place for my business
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 

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...


-----Original Message-----
From: Chad Schoettger [] 
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

  - Chad

On 1/25/07, sahuly <> wrote:
> hi chad,
>        First of all i am not clear with the control concepts
> is the exact purpose of customized control...
> what is the exact need for that autogenerated bean and beaninfo
> the documentation it says like for reducing the J2EE complexity thats
> accepted for EJBControl and also for JdbcControl..when we go for the
> Customized Control...thanks in advance
> Chad Schoettger-2 wrote:
> >
> > Hi Sahuly,
> >
> > For each control there is a control bean generated at build time.
> > could do something like:
> >
> > @Control
> > private UserControlBean userControl;
> >
> > Then you could use reflection to find and invoke a method on the
> >  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
> > more detail on what you are trying to do.
> >
> >  - Chad
> >
> >
> > On 1/25/07, sahuly <> wrote:
> >>
> >> public class Controller
> >> extends PageFlowController {
> >>
> >>    @Control
> >>     private UserControl userControl;---> i have to provide this
> >> at
> >> runtime i have to invoke the
> >> methods using the reflectin package....not in this way(i.e) by
> >> 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:
> >>
> >> Sent from the Beehive - User mailing list archive at
> >>
> >>
> >
> >
> --
> View this message in context:
> Sent from the Beehive - User mailing list archive at
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.

View raw message