beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chad Schoettger" <>
Subject Re: Is it Possible to Dynamically Set Annotation Valuess for EJB Control?
Date Wed, 08 Nov 2006 21:33:30 GMT
Hi Scott,

Both EJBControl.JNDIEnv and EJBControl.EJBHome annotations are defined
as property sets, which means that on the generated EJBControl bean
there will be getters and setters for each of the annotation fields.

However, for the EJB control this doesn't do much good since both of
these annotations are used in the onCreate() method of the control (so
you could change the values but the new values would never be used
since the onCreate() method would have been already been called).

Another option would be to use an annotation override to specify the
new values you want, this may or may not be what you are looking for
depending on how things are packaged.  To do an annotation override,
you would need to do something like this in the control client:

@EJBHome(jndiName=<new value here>)
@JNDIContextEnv(providerURL=<new value here>)
private MyEJBControl _ejbControl;

  - Chad

On 11/8/06, Scott Hammer <> wrote:
> I have a need to access EJBs deployed on a different domain from a Beehive pageflow in
a WebLogic Portal 9.2 application.  I am currently using an EJB control to do so.  As long
as I code the providerURL and credentials at design time, this is not a problem.
> I am interested in a way to set those values at runtime such that I can configure the
values for a deployment of my portal application without having to modify my EAR.  As an alternative,
I could use the ServiceLocator pattern, but I thought I'd test this path first.
> 1. Is it actually possible to specify annotation values for EJB controls at runtime?
 Specifically, the values in the EJBControl.JNDIContextEnv annotation.
> 2. Where in the Beehive control or pageflow lifecycles may I safely set such values?
> Thanks,
> Scott
> PS - I am new to this list, so I apologize if this has been answered in the past.  I
was unable to find a search for the archives.
> Scott Hammer
> Principal Consultant
> BEA Systems, Inc.
> Mobile: 248.990.5648
> YM: hammesc1
> _______________________________________________________________________
> 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