I'm a little confused. Are you talking about stateless session beans here?
I'll assume you are using a jboss 3 version and know about the jboss mbean
service lifecycle.
I think what you want to do is create a mbean for each stateless session
bean you wish to have access to and include a depends element in the mbean
configuration with the (generated) object name of the container for the
ejb. The jboss dependency management will assure that your mbean is
started only after the ejb is started. I think (but have not tried) that
you can then use the ObjectName of the container to directly invoke ejb
methods without needing to get a local interface. You will have to make
sure you are sending the correct invocation object, just like say the JRMP
invoker does.
I'm not sure how generic you can or would want to make such an mbean. In
any case you'd configure it and deploy it in an *-service.xml file
david jencks
On 2002.07.30 12:40:52 -0400 Michael Stanley wrote:
> Let me add, that I figured the best way to do this would be to listen
> for Deployment Notifications, then I would be able to look up the newly
> registered ObjectNames for the deployed EJB's. This would allow me to
> determine the JNDI name, get a copy of its Local Interface and invoke
> methods based on deployment and undeployment. But as I noted in a
> previous email Deployment Notifications occur prior to actual deployment
> so queryNames returns no results, and therefore this approach isn't
> feasible either (without modifying JBoss).
>
> It would be better to be able to implement the postRegister methods as I
> mention below.
>
> Mike
>
> Michael Stanley wrote:
> > First let me thank you for your help.
> >
> >
> > I'm still a little confused.
> >
> >> Create your own mbean that simply invokes methods on the
> >> EJB through its remote or local interfaces.
> >
> >
> > I still have to manually register this Mbean however correct? Or will
> > it be detected and registered automatically on deployment.
> >
> >> If you want untyped
> >> invocations call the EJB container mbean.
> >
> >
> > I understand the nature of dynamic MBeans, and the untyped invocations,
>
> > etc. I'm slightly confused though as to how I can add additional
> > attributes and operations and/or override/inherit other MBean
> operations.
> >
> > For example, lets say I have an EJB. I want to manage its RW attribute
>
> > widgetType. And be able to invoke operation processWidget.
> >
> > I would also like to invoke the operation automatically during the
> > postRegister() method call.
> >
> > ---
> > public void postRegister(Boolean param1) {
> >
> > if(param1.booleanValue())
> > processWidget();
> >
> > }
> > ---
> >
> > I can create a Standard MBean and register it with the server. I know
> > this works, and I have successfully done this. However, I would like
> to
> > take advantage of the fact that EJBs are registered and unregistered on
>
> > deployment. So I can drop in a new EJB widget, and remove existing EJB
>
> > widgets from my Widget Processing Application.
> >
> > Any suggestions?
> >
> > Thanks,
> > Mike
> >
> > Widgets need automatic processing capabilities on deployment otherwise
> > the world will end... :-)
> >
> >
> >
> >>
> >> xxxxxxxxxxxxxxxxxxxxxxxx
> >> Scott Stark
> >> Chief Technology Officer
> >> JBoss Group, LLC
> >> xxxxxxxxxxxxxxxxxxxxxxxx
> >> ----- Original Message -----
> >> From: "Michael Stanley" <[EMAIL PROTECTED]>
> >> To: <[EMAIL PROTECTED]>
> >> Sent: Tuesday, July 30, 2002 7:24 AM
> >> Subject: Re: [JBoss-user] MBean interfaces to EJBs
> >>
> >>
> >>
> >>>> All EJBs are all ready DynamicMBeans. See the
> org.jboss.ejb.Container
> >>>
> >>>
> >> class.
> >>
> >>> I see..
> >>>
> >>> How can I (or where should I) override the implementation of some of
> >>> these methods like preRegister?
> >>>
> >>> How should I add more attributes and operations?
> >>>
> >>> Mike
> >>>
> >>
> >>
> >>
> >>
> >>
> >> -------------------------------------------------------
> >> This sf.net email is sponsored by: Dice - The leading online job board
> >> for high-tech professionals. Search and apply for tech jobs today!
> >> http://seeker.dice.com/seeker.epl?rel_code=31
> >> _______________________________________________
> >> JBoss-user mailing list
> >> [EMAIL PROTECTED]
> >> https://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> >
> >
>
>
> --
> <Mike/>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: Dice - The leading online job board
> for high-tech professionals. Search and apply for tech jobs today!
> http://seeker.dice.com/seeker.epl?rel_code=31
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user